+ Added disabling and re-enabling commands live

This commit is contained in:
Matthew Cech
2019-06-29 23:11:34 -07:00
parent cfa8d7acee
commit 07613b3144
2 changed files with 29 additions and 13 deletions
+6 -6
View File
@@ -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)
{