Guest User

Untitled

a guest
Apr 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. if (playerCommand.startsWith("item") && c.playerRights >= 0) {
  2. try {
  3. String[] args = playerCommand.split(" ");
  4. if(c.inWild())
  5.  
  6. if(System.currentTimeMillis() - c.Delay > 150) {
  7. {
  8. c.sendMessage("You cant spawn in this area.");
  9. return;
  10. } else if (args.length == 3) {
  11. int newItemID = Integer.parseInt(args[1]);
  12. int newItemAmount = Integer.parseInt(args[2]);
  13. if ((newItemID <= 20000) && (newItemID >= 0)) {
  14. c.getItems().addItem(newItemID, newItemAmount);
  15. } else {
  16. c.sendMessage("No item found.");
  17. }
  18. } else {
  19. c.sendMessage("Invalid useage. Use as; ::item 391 1");
  20. }
  21. } catch(Exception e) {
  22.  
  23. }
Add Comment
Please, Sign In to add comment