Advertisement
Kicjow1

Untitled

Feb 25th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. }else if(args.length == 3 && args[0].equalsIgnoreCase("set")) {
  2. if(this.getServer().getPlayer(args[1]) != null) {
  3. if(args[1].equalsIgnoreCase(sender.getName())) {
  4. final Player pl2 = this.getServer().getPlayer(args[1]);
  5. if(this.isDouble(args[2])) {
  6. double amount = Double.parseDouble(args[2]);
  7. if(amount >= 500) {
  8. if(this.bounties.containsKey(pl2.getUniqueId())) {
  9. this.bounties.put(pl2.getUniqueId(), this.bounties.get(pl2.getUniqueId()) + Integer.parseInt(args[2]));
  10. }else {
  11. this.bounties.put(pl2.getUniqueId(), Double.parseDouble(args[2]));
  12. }
  13. sender.sendMessage(String.valueOf(this.s) + "§eYou have successfully set a bounty on §6" + pl2.getName());
  14. sender.sendMessage("§c§l- $" + NumberFormat.getNumberInstance().format(Double.parseDouble(args[2])));
  15. }else {
  16. sender.sendMessage("§cNot 500");
  17. }
  18. }
  19. }else{
  20. sender.sendMessage("Can't place on your head.");
  21. }
  22. }else {
  23. sender.sendMessage(String.valueOf(this.s) + "§6" + args[2] + " §eis not a valid amount.");
  24. }
  25. }else {
  26. sender.sendMessage(String.valueOf(this.s) + "§6" + args[1] + " §eis not online.");
  27. }
  28. }else {
  29. this.getServer().dispatchCommand(sender, "bounty help");
  30. }
  31. return true;
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement