Base: Project Insanity/317
Problem: Commands interfere with the yell command
Errors(Compiling Errors): none
Other Information/Media(Pictures, etc):
Atm, I'm working on a project and almost done but I have this one problem
When I try to do any command, it says it over yell and doesnt even do the command.
Here is my yell command
Code:
if (playerCommand.startsWith("/") && c.playerRights >= 1 || c.isDonator == 1) {
String text = playerCommand.substring(1);
/* if (c.clanId >= 0) {
// System.out.println(playerCommand);
playerCommand = playerCommand.substring(1);
Server.clanChat.playerMessageToClan(c.playerId, playerCommand, c.clanId);
} else {
if (c.clanId != -1)
c.clanId = -1;
c.sendMessage("You are not in a clan.");
}
return; */
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
c2.sendClan(c.playerName, Character.toUpperCase(text.charAt(0)) + text.substring(1), "PrayScape", c.playerRights);
}
}
}
Does anyone know how to fix this? If you do, it would be nice to share
EDIT: I added
Code:
playerCommand.length() > 5
and the commands work now but it still says them over yell.