mirror of
https://github.com/Ne0nx3r0/BetterAlias.git
synced 2024-11-23 12:05:40 +01:00
Removing badonothing, in favor of an argument on bareload
This commit is contained in:
parent
58cb889998
commit
d4ae745e59
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ public class BetterAliasCommandListener implements Listener
|
||||
{
|
||||
if(plugin.aliasManager.sendAliasCommands(alias,e.getSender(),sCommand))
|
||||
{
|
||||
e.setCommand("badonothing");
|
||||
e.setCommand("bareload donothing");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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())
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user