mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Added override permission for commandspy.
This commit is contained in:
parent
8a6a4d61f2
commit
704b724b9e
@ -47,6 +47,7 @@ public class CommandListener implements CommandExecutor, Listener {
|
|||||||
ConfigurationSection cs = plugin.getConfig().getConfigurationSection("commandspy");
|
ConfigurationSection cs = plugin.getConfig().getConfigurationSection("commandspy");
|
||||||
Boolean wec = cs.getBoolean("worldeditcommands", true);
|
Boolean wec = cs.getBoolean("worldeditcommands", true);
|
||||||
MineverseChatPlayer mcp = MineverseChatAPI.getOnlineMineverseChatPlayer(event.getPlayer());
|
MineverseChatPlayer mcp = MineverseChatAPI.getOnlineMineverseChatPlayer(event.getPlayer());
|
||||||
|
if(!mcp.getPlayer().hasPermission("venturechat.commandspy.override")) {
|
||||||
for(MineverseChatPlayer p : MineverseChatAPI.getOnlineMineverseChatPlayers()) {
|
for(MineverseChatPlayer p : MineverseChatAPI.getOnlineMineverseChatPlayers()) {
|
||||||
if(p.hasCommandSpy()) {
|
if(p.hasCommandSpy()) {
|
||||||
if(wec) {
|
if(wec) {
|
||||||
@ -64,6 +65,7 @@ public class CommandListener implements CommandExecutor, Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String[] blocked = event.getMessage().split(" ");
|
String[] blocked = event.getMessage().split(" ");
|
||||||
if(mcp.getBlockedCommands().contains(blocked[0])) {
|
if(mcp.getBlockedCommands().contains(blocked[0])) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user