so i have the command finally working, but when you first shout it still says the timer like in the picture
Screenshot by Lightshot
heres the command:
Code:
if (playerCommand.startsWith("shout")) {
if (Connection.isMuted(c)) {
c.sendMessage("Sorry but you can't yell because you are muted.");
return;
}
for (int j = 0; j < PlayerHandler.players.length; j++) {
if (PlayerHandler.players[j] != null) {
Client c2 = (Client) PlayerHandler.players[j];
long delta = System.currentTimeMillis();
if ((delta - c.lastYell) < Config.GLOBAL_YELL_TIMER * 1000) {
c.sendMessage("You have to wait " + (Config.GLOBAL_YELL_TIMER - (delta - c.lastYell) / 1000) + " more seconds before yelling again.");
return;
} if (c.playerRights == 0) {
c.lastYell = delta;
c2.sendMessage("<shad=255>[Player]</shad>"+ Misc.optimizeText(c.playerName) + ": "
+ playerCommand.substring(6)+ "");
}
}
}
}
ALSO: i was just wondering if anyone knows how to make a self organizing bank i seen it on a server and it worked ... it organizes your bank everytime you exit bank and come bank in