From 4cc9a1bec45e3ec430d11c18f3e88141620a146f Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 9 Dec 2012 00:19:55 -0600 Subject: [PATCH] An executor set to null will now use the plugin. Fixes BUKKIT-3127 By: feildmaster --- 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 d34140c303..ec66c28a60 100644 --- a/paper-api/src/main/java/org/bukkit/command/PluginCommand.java +++ b/paper-api/src/main/java/org/bukkit/command/PluginCommand.java @@ -61,7 +61,7 @@ public final class PluginCommand extends Command implements PluginIdentifiableCo * @param executor New executor to run */ public void setExecutor(CommandExecutor executor) { - this.executor = executor; + this.executor = executor == null ? owningPlugin : executor; } /**