mirror of
https://github.com/Ne0nx3r0/BetterAlias.git
synced 2024-11-24 12:15:44 +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);
|
BetterAliasCommandExecutor betterAliasCommandExecutor = new BetterAliasCommandExecutor(this);
|
||||||
|
|
||||||
this.getCommand("bareload").setExecutor(betterAliasCommandExecutor);
|
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))
|
if(plugin.aliasManager.sendAliasCommands(alias,e.getSender(),sCommand))
|
||||||
{
|
{
|
||||||
e.setCommand("badonothing");
|
e.setCommand("bareload donothing");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,13 +18,15 @@ public class BetterAliasCommandExecutor implements CommandExecutor
|
|||||||
@Override
|
@Override
|
||||||
public boolean onCommand(CommandSender cs, Command cmnd, String alias, String[] args)
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cs.hasPermission("BetterAlias.reload") || cs.isOp())
|
if(cs.hasPermission("BetterAlias.reload") || cs.isOp())
|
||||||
{
|
{
|
||||||
|
|
||||||
cs.sendMessage(ChatColor.GOLD+"Reloading aliases...");
|
cs.sendMessage(ChatColor.GOLD+"Reloading aliases...");
|
||||||
|
|
||||||
if(plugin.aliasManager.loadAliases())
|
if(plugin.aliasManager.loadAliases())
|
||||||
|
@ -6,8 +6,6 @@ description: Command alias system
|
|||||||
commands:
|
commands:
|
||||||
bareload:
|
bareload:
|
||||||
description: Reloads the aliases.yml file
|
description: Reloads the aliases.yml file
|
||||||
badonothing:
|
|
||||||
description: Filler command, since console commands are not cancellable
|
|
||||||
permissions:
|
permissions:
|
||||||
BetterAlias.reload:
|
BetterAlias.reload:
|
||||||
description: Allows reloading BetterAlias
|
description: Allows reloading BetterAlias
|
Loading…
Reference in New Issue
Block a user