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;
}
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
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