From 9d7599793bee9fa617f6478c3f7c9bcc0b172f81 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 9 Jan 2018 08:32:37 +1100 Subject: [PATCH] SPIGOT-3748: Throw error message if executing disabled command By: md_5 --- paper-api/src/main/java/org/bukkit/command/PluginCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/command/PluginCommand.java b/paper-api/src/main/java/org/bukkit/command/PluginCommand.java index 3bfa31fc81..2abe1208f2 100644 --- a/paper-api/src/main/java/org/bukkit/command/PluginCommand.java +++ b/paper-api/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)) {