Skip to content

Commit

Permalink
Removing badonothing, in favor of an argument on bareload
Browse files Browse the repository at this point in the history
  • Loading branch information
Ne0nx3r0 committed Feb 6, 2013
1 parent 58cb889 commit d4ae745
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions com/ne0nx3r0/betteralias/BetterAlias.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,5 @@ public void onEnable()
BetterAliasCommandExecutor betterAliasCommandExecutor = new BetterAliasCommandExecutor(this);

this.getCommand("bareload").setExecutor(betterAliasCommandExecutor);

//Filler command to null things to since console commands are not cancellable
this.getCommand("badonothing").setExecutor(betterAliasCommandExecutor);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void onConsoleCommand(ServerCommandEvent e)
{
if(plugin.aliasManager.sendAliasCommands(alias,e.getSender(),sCommand))
{
e.setCommand("badonothing");
e.setCommand("bareload donothing");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,16 @@ public BetterAliasCommandExecutor(BetterAlias plugin)

@Override
public boolean onCommand(CommandSender cs, Command cmnd, String alias, String[] args)
{
if(cmnd.getName().equalsIgnoreCase("badonothing"))
{
// To allow nulling server commands out
if(args.length == 1 && args[0].equalsIgnoreCase("donothing"))
{
return true;
}

if(cs.hasPermission("BetterAlias.reload") || cs.isOp())
{

cs.sendMessage(ChatColor.GOLD+"Reloading aliases...");

if(plugin.aliasManager.loadAliases())
Expand Down
4 changes: 1 addition & 3 deletions plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ database: false
description: Command alias system
commands:
bareload:
description: Reloads the aliases.yml file
badonothing:
description: Filler command, since console commands are not cancellable
description: Reloads the aliases.yml file
permissions:
BetterAlias.reload:
description: Allows reloading BetterAlias

0 comments on commit d4ae745

Please sign in to comment.