diff --git a/com/ne0nx3r0/betteralias/BetterAlias.java b/com/ne0nx3r0/betteralias/BetterAlias.java index f6b28b4..19b414a 100644 --- a/com/ne0nx3r0/betteralias/BetterAlias.java +++ b/com/ne0nx3r0/betteralias/BetterAlias.java @@ -20,8 +20,5 @@ public class BetterAlias extends JavaPlugin 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); } } diff --git a/com/ne0nx3r0/betteralias/listener/BetterAliasCommandListener.java b/com/ne0nx3r0/betteralias/listener/BetterAliasCommandListener.java index 1a9110d..5c9a73f 100644 --- a/com/ne0nx3r0/betteralias/listener/BetterAliasCommandListener.java +++ b/com/ne0nx3r0/betteralias/listener/BetterAliasCommandListener.java @@ -71,7 +71,7 @@ public class BetterAliasCommandListener implements Listener { if(plugin.aliasManager.sendAliasCommands(alias,e.getSender(),sCommand)) { - e.setCommand("badonothing"); + e.setCommand("bareload donothing"); } } } diff --git a/com/ne0nx3r0/betteralias/listener/command/BetterAliasCommandExecutor.java b/com/ne0nx3r0/betteralias/listener/command/BetterAliasCommandExecutor.java index da4d004..a2b352d 100644 --- a/com/ne0nx3r0/betteralias/listener/command/BetterAliasCommandExecutor.java +++ b/com/ne0nx3r0/betteralias/listener/command/BetterAliasCommandExecutor.java @@ -17,14 +17,16 @@ public class BetterAliasCommandExecutor implements CommandExecutor @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()) diff --git a/plugin.yml b/plugin.yml index 8d3d7f2..ea857d1 100644 --- a/plugin.yml +++ b/plugin.yml @@ -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 \ No newline at end of file