Remove c.
|
So when I tried to add a login message it worked!
This is the code I used
if(playerRights == 1) {
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
c2.sendMessage("<shad=65535>[MOD] " +playerName+ " has just logged in.");
}
}
}
But now instead of it being the playerrights i want it to be by username.
This is the code I used
if (c.playerName.equalsIgnoreCase("Keith511")) {
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
c2.sendMessage("<shad=65535>[MOD] " +playerName+ " has just logged in.");
}
}
}
But I got this error!
Can anyone fix this code? And tell me what i did wrong?
if (c.playerName.equalsIgnoreCase("Keith511")) {
for (int j = 0; j < Server.playerHandler.players.length; j++) {
if (Server.playerHandler.players[j] != null) {
Client c2 = (Client)Server.playerHandler.players[j];
c2.sendMessage("<shad=65535>[MOD] " +playerName+ " has just logged in.");
}
}
}
Remove c.
Wow, Thanks man! +rep +thank! good job bro!
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |