+ Added disabling and re-enabling commands live
This commit is contained in:
@@ -36,12 +36,6 @@ public class CommandManager
|
||||
if(pair == null || pair.Second == null)
|
||||
return;
|
||||
|
||||
// If we haven't already split a multisplit command (or even assessed that),
|
||||
// then verify if we even need to register the commands at all. If it's
|
||||
// not enabled, don't register it.
|
||||
if(pair.First != null && !commandEnabler.isEnabled(pair.First))
|
||||
return;
|
||||
|
||||
String key = pair.Second;
|
||||
|
||||
if(key.contains(","))
|
||||
@@ -80,6 +74,12 @@ public class CommandManager
|
||||
if(input == null || !input.isValid())
|
||||
return false;
|
||||
|
||||
// If we haven't already split a multisplit command (or even assessed that),
|
||||
// then verify if we even need to register the commands at all. If it's
|
||||
// not enabled, don't register it.
|
||||
if(input.key != null && !commandEnabler.isEnabled(input.key))
|
||||
return false;
|
||||
|
||||
Command command = commands.get(input.key);
|
||||
if(command != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user