Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- }else if(args.length == 3 && args[0].equalsIgnoreCase("set")) {
- if(this.getServer().getPlayer(args[1]) != null) {
- if(args[1].equalsIgnoreCase(sender.getName())) {
- final Player pl2 = this.getServer().getPlayer(args[1]);
- if(this.isDouble(args[2])) {
- double amount = Double.parseDouble(args[2]);
- if(amount >= 500) {
- if(this.bounties.containsKey(pl2.getUniqueId())) {
- this.bounties.put(pl2.getUniqueId(), this.bounties.get(pl2.getUniqueId()) + Integer.parseInt(args[2]));
- }else {
- this.bounties.put(pl2.getUniqueId(), Double.parseDouble(args[2]));
- }
- sender.sendMessage(String.valueOf(this.s) + "§eYou have successfully set a bounty on §6" + pl2.getName());
- sender.sendMessage("§c§l- $" + NumberFormat.getNumberInstance().format(Double.parseDouble(args[2])));
- }else {
- sender.sendMessage("§cNot 500");
- }
- }
- }else{
- sender.sendMessage("Can't place on your head.");
- }
- }else {
- sender.sendMessage(String.valueOf(this.s) + "§6" + args[2] + " §eis not a valid amount.");
- }
- }else {
- sender.sendMessage(String.valueOf(this.s) + "§6" + args[1] + " §eis not online.");
- }
- }else {
- this.getServer().dispatchCommand(sender, "bounty help");
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement