Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (playerCommand.equalsIgnoreCase("giveitem")) {
- String name = playerCommand.substring(8);
- for (int i = 0; i < Config.MAX_PLAYERS; i++) {
- if(Server.playerHandler.players[i] != null) {
- String[] args = playerCommand.split(" ");
- if (args.length == 3) {
- int newItemID = Integer.parseInt(args[1]);
- int newItemAmount = Integer.parseInt(args[2]);
- if ((newItemID <= 20000) && (newItemID >= 0)) {
- c.getItems().addItem(newItemID, newItemAmount);
- c.sendMessage("You have just gave: "+Server.playerHandler.players[i].playerName+" An item of: "+newItemID+".");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement