From a45afbadf578d9f3e4e8e82b5379ac4e1f98fed6 Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 9 Jan 2018 08:32:37 +1100 Subject: SPIGOT-3748: Throw error message if executing disabled command --- src/main/java/org/bukkit/command/PluginCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- cgit v1.2.3