From 66a70fef5b6a2761fcf1e676643d8f58e6685330 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 14 Apr 2014 16:24:16 +1000 Subject: [PATCH] Add #983 - disabled commands for players only. --- .../main/java/net/md_5/bungee/api/plugin/PluginManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java index 5e21db4c..fbd2cf3d 100644 --- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java +++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java @@ -27,6 +27,7 @@ import lombok.RequiredArgsConstructor; import net.md_5.bungee.api.ChatColor; import net.md_5.bungee.api.CommandSender; import net.md_5.bungee.api.ProxyServer; +import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.event.EventBus; import net.md_5.bungee.event.EventHandler; import org.yaml.snakeyaml.Yaml; @@ -122,7 +123,7 @@ public class PluginManager } String commandName = split[0].toLowerCase(); - if ( proxy.getDisabledCommands().contains( commandName ) ) + if ( sender instanceof ProxiedPlayer && proxy.getDisabledCommands().contains( commandName ) ) { return false; }