Add #983 - disabled commands for players only.
This commit is contained in:
parent
dc2da29c16
commit
66a70fef5b
@ -27,6 +27,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import net.md_5.bungee.api.ChatColor;
|
import net.md_5.bungee.api.ChatColor;
|
||||||
import net.md_5.bungee.api.CommandSender;
|
import net.md_5.bungee.api.CommandSender;
|
||||||
import net.md_5.bungee.api.ProxyServer;
|
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.EventBus;
|
||||||
import net.md_5.bungee.event.EventHandler;
|
import net.md_5.bungee.event.EventHandler;
|
||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
@ -122,7 +123,7 @@ public class PluginManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
String commandName = split[0].toLowerCase();
|
String commandName = split[0].toLowerCase();
|
||||||
if ( proxy.getDisabledCommands().contains( commandName ) )
|
if ( sender instanceof ProxiedPlayer && proxy.getDisabledCommands().contains( commandName ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user