diff options
author | md_5 <git@md-5.net> | 2018-01-09 08:32:37 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2018-01-09 08:35:50 +1100 |
commit | a45afbadf578d9f3e4e8e82b5379ac4e1f98fed6 (patch) | |
tree | 925d9c8adf5f4ba0a1f48a322b51749822e610c6 /src | |
parent | 5043fb1d0ed8a125302719ca31cadd2bb1c5fdb2 (diff) | |
download | bukkit-a45afbadf578d9f3e4e8e82b5379ac4e1f98fed6.tar bukkit-a45afbadf578d9f3e4e8e82b5379ac4e1f98fed6.tar.gz bukkit-a45afbadf578d9f3e4e8e82b5379ac4e1f98fed6.tar.lz bukkit-a45afbadf578d9f3e4e8e82b5379ac4e1f98fed6.tar.xz bukkit-a45afbadf578d9f3e4e8e82b5379ac4e1f98fed6.zip |
SPIGOT-3748: Throw error message if executing disabled command
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/command/PluginCommand.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/command/PluginCommand.java b/src/main/java/org/bukkit/command/PluginCommand.java index 3bfa31fc..2abe1208 100644 --- a/src/main/java/org/bukkit/command/PluginCommand.java +++ b/src/main/java/org/bukkit/command/PluginCommand.java @@ -33,7 +33,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo boolean success = false; if (!owningPlugin.isEnabled()) { - return false; + throw new CommandException("Cannot execute command '" + commandLabel + "' in plugin " + owningPlugin.getDescription().getFullName() + " - plugin is disabled."); } if (!testPermission(sender)) { |