Development Assistance Need help with my Koth plugin

Discussion in 'Plugin Help/Development/Requests' started by across566, Mar 7, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    across566

    No errors in console
    Code:
                        if ((args[0].equalsIgnoreCase("chest")) &&
                                (player.isOp()))
                              {
                                Selection s = getWE().getSelection(player);
                                if (s == null)
                                {
                                  player.sendMessage(ChatColor.RED + "Make a selection first");
                                  return true;
                                }
                                player.sendMessage(ChatColor.GOLD + "[" + ChatColor.YELLOW + "HCFKoth" + ChatColor.GOLD + "]" + ChatColor.GOLD + " Koth chest added");
                                String name = args[1];
                                int x = s.getMinimumPoint().getBlockX();
                                int z = s.getMinimumPoint().getBlockZ();
                                int y = s.getMinimumPoint().getBlockY();
                                getConfig().set("Koth." + name + ".xChest", Integer.valueOf(x));
                                getConfig().set("Koth." + name + ".zChest", Integer.valueOf(z));
                                getConfig().set("Koth." + name + ".yChest", Integer.valueOf(y));
                                saveConfig();
                              }
                            }
                          }
                        }
                        return false;
            }
    
    The command isn't doing anything... please help!
     
  2. Online

    timtower Administrator Administrator Moderator

    @across566 Did you register the command in the plugin.yml?
     
  3. Offline

    across566

    @timtower yes I did /koth in it as all the other commands work.
     
  4. Offline

    across566

  5. Online

    timtower Administrator Administrator Moderator

    Could you show that code then?
     
    bwfcwalshy likes this.
  6. Offline

    across566

    Last edited by a moderator: Mar 7, 2015
Thread Status:
Not open for further replies.

Share This Page