How hard is it to Copy & paste...?
Post it under playerRights 1, 2 or 3, you choose.
|
Base: Project Insanity
Problem: Players can ::checkbank other players bank's
Errors(Compiling Errors):
Other Information/Media(Pictures, etc): I don't know where to put my code. My code is:
And my commands.java contains:Code:if (playerCommand.startsWith("checkbank")) { try { String[] args = playerCommand.split(" ", 2); for(int i = 0; i < Config.MAX_PLAYERS; i++) { Client o = (Client) Server.playerHandler.players[i]; if(Server.playerHandler.players[i] != null) { if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) { c.getPA().otherBank(c, o); break; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } }
PasteBin
I took it out, and where exactly should I place it?
Thanks,
Dynasty
How hard is it to Copy & paste...?
Post it under playerRights 1, 2 or 3, you choose.
Yea, after the last }.
Though I've seen that you may need to declare a couple of things before pasting the command in.
Add the code like this:
Code:if (playerCommand.startsWith("checkbank") && c.playerRights >= 3) { try { String[] args = playerCommand.split(" ", 2); for(int i = 0; i < Config.MAX_PLAYERS; i++) { Client o = (Client) Server.playerHandler.players[i]; if(Server.playerHandler.players[i] != null) { if(Server.playerHandler.players[i].playerName.equalsIgnoreCase(args[1])) { c.getPA().otherBank(c, o); break; } } } } catch(Exception e) { c.sendMessage("Player Must Be Offline."); } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
Tags for this Thread |