Skip to content

Commit

Permalink
Default to fail a toggle test if no valid selection is made.
Browse files Browse the repository at this point in the history
  • Loading branch information
ElgarL committed Mar 26, 2012
1 parent cebc9b0 commit b1b024e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/com/palmergames/bukkit/towny/command/PlotCommand.java
Expand Up @@ -477,6 +477,8 @@ private void toggleTest(Player player, TownBlock townBlock, String split) throws
if (townBlock.getType().equals(TownBlockType.ARENA))
throw new TownyException(TownySettings.getLangString("msg_plot_pvp"));
}

throw new TownyException(TownySettings.getLangString("msg_err_command_disable"));
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/com/palmergames/bukkit/towny/command/TownCommand.java
Expand Up @@ -400,6 +400,8 @@ private void toggleTest(Player player, Town town, String split) throws TownyExce
if (plugin.isPermissions() && (!TownyUniverse.getPermissionSource().hasPermission(player, PermissionNodes.TOWNY_TOGGLE_PVP.getNode())))
throw new TownyException(TownySettings.getLangString("msg_err_command_disable"));
}

throw new TownyException(TownySettings.getLangString("msg_err_command_disable"));
}

public void townSet(Player player, String[] split) {
Expand Down

0 comments on commit b1b024e

Please sign in to comment.