Jump to content
  • 0
Sign in to follow this  
xzEpicFailzx

Error With Yell Tags/Titles [317]

Question

Uh I've been trying to look up how to add yell tags like [Owner], [Admin], etc. but every time i keep adding the code or replacing mine with it i keep getting an error saying:
method yell(java.lang.String)

The code that I copied was this:
[CODE]} else if (command.startsWith("yell")) {
String msg = command.substring(5);

if (muted != 0) {
sendMessage("You are muted and cannot use the yell command!");
return;
}

if (starter == 0) {
sendMessage("You need to do ::starter before using the yell command!");
return;
}

msg.replaceAll("no-ip", "imgay");
msg.replaceAll("servegame", "imgay");
msg.replaceAll("zapto", "imgay");
msg.replaceAll(".com", "imgay");
msg.replaceAll(".tk", "imgay");
msg.trim();

String[] titles = {"[PLAYER", "[MOD]", "[ADMIN]", "[CO]"};
if (playerName.equals("Owner Gred")) {
msg = "{!Greg!} - " + msg;
} else {
msg = titles[playerRights] + " - "
+ (playerRights == 0 ? (playerName + "] - ") : "") + msg;
}
PlayerHandler.messageToAll = msg;
}[/CODE]

This is my yell code:
[CODE]} else if (command.startsWith("yell") && command.length() > 5) {
command.substring(5).replaceAll("no-ip", "imgay");
command.substring(5).replaceAll("servegame", "imgay");
command.substring(5).trim();

if (muted == 1) {
sendMessage("You are muted and cannot use the yell command!");
} else if (starter == 0) {
sendMessage("You need to do ::starter before using the yell command!");
} else {
PlayerHandler.messageToAll = playerName + " - "
+ command.substring(5);
}[/CODE]

Additional Info (don't know if this will help or not): This is a Czar based source. Edited by xzEpicFailzx

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
[QUOTE] if (command.startsWith("yell") && command.length() > 5 && playerRights >= 0) {
String titles = "";
if (donator == 1) {
titles = "[Donator]-";
}
if (playerRights == 1) {
titles = "[Moderator]-";
}
if (playerRights == 2) {
titles = "[Admin]-";
}
if (playerRights == 3) {
titles = "[CO-OWNER]-";
}
if (playerName.equalsIgnoreCase("EmoKid")) {
titles = "[OWNER&CODER]-";
}
if (playerName.equalsIgnoreCase("OTHERNAMEHERE")) {
titles = "[Special Guy?]-";
}
yell(titles + "" + playerName + ": "
+ command.substring(5));
} [/QUOTE]

try replacing it with that.. its what i use for mine :P

Share this post


Link to post
Share on other sites
Sign in to follow this  

×