mirror of
https://github.com/Aust1n46/VentureChat.git
synced 2025-05-23 10:39:05 +00:00
Added new permission 'venturechat.commandspy.hide'
This commit is contained in:
parent
8bd020359e
commit
afdc0bb323
@ -53,6 +53,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.hide")) {
|
||||||
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
|
for(MineverseChatPlayer p : MineverseChat.onlinePlayers) {
|
||||||
if(p.hasCommandSpy()) {
|
if(p.hasCommandSpy()) {
|
||||||
if(wec) {
|
if(wec) {
|
||||||
@ -65,6 +66,7 @@ public class CommandListener implements CommandExecutor, Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(!event.getMessage().startsWith("/afk")) {
|
if(!event.getMessage().startsWith("/afk")) {
|
||||||
if(mcp.isAFK()) {
|
if(mcp.isAFK()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user