in addXp boolean. Make it check if the skill level is 99 then add the yell code and c2.<col=255>[Server]</col>: Code here....
|
How do I make one so when some reaches a 99 in any skill, it announces it to the whole server. Here is the text I want
<col=255>[Server]</col>: Code here....
Where do I add it, and can someone give me the code.
in addXp boolean. Make it check if the skill level is 99 then add the yell code and c2.<col=255>[Server]</col>: Code here....
That won't work.
Code:public void sendAnnouncement(String m){ for(Player player : players){ player.sendMessage("<col=255>[Server]</col>:" + m); } }
Where to put it, and do I need to edit anything in it?
Well I'm stupid and don't know how to make it check.
You should really check if the player is null or not or this could cause issues.Code:public void sendAnnouncement(String m){ for(Player player : players){ player.sendMessage("<col=255>[Server]</col>:" + m); } }
Code:public void sendAnnouncement(String m){ for(Player player : players){ if (player != null) { Client all = (Client) player; all.sendMessage("<col=255>[Server]</col>:" + m); } } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |