예제 #1
0
 @Override
 public String help(Player p) {
   return "/sg resetspawns <id> - "
       + SettingsManager.getInstance()
           .getMessageConfig()
           .getString("messages.help.resetspawns", "Resets spawns for Arena <id>");
 }
예제 #2
0
  public boolean onCommand(Player player, String[] args) {

    if (!player.hasPermission(permission()) && !player.isOp()) {
      MessageManager.getInstance().sendFMessage(PrefixType.ERROR, "error.nopermission", player);
      return true;
    }
    try {
      SettingsManager.getInstance().getSpawns().set("spawns." + Integer.parseInt(args[0]), null);
      return true;
    } catch (NumberFormatException e) {
      MessageManager.getInstance()
          .sendFMessage(MessageManager.PrefixType.ERROR, "error.notanumber", player, "input-Arena");
    } catch (NullPointerException e) {
      MessageManager.getInstance()
          .sendMessage(MessageManager.PrefixType.ERROR, "error.gamenoexist", player);
    }
    return true;
  }