Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Commit

Permalink
Bugfix -> forget to add something
Browse files Browse the repository at this point in the history
  • Loading branch information
EinfacheSache committed Aug 29, 2023
1 parent eee14ce commit 8c874ad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ChatListener(NeoProtectBungee instance) {
public void onChat(ChatEvent event) {
CommandSender sender = (CommandSender) event.getSender();

if (!sender.hasPermission("neoprotect.admin") || !instance.getCore().getPlayerInSetup().contains(sender) || event.isCommand())
if ((!sender.hasPermission("neoprotect.admin") && !instance.getCore().isPlayerMaintainer((((ProxiedPlayer) sender).getUniqueId()), instance.getProxy().getConfig().isOnlineMode())) || !instance.getCore().getPlayerInSetup().contains(sender) || event.isCommand())
return;

event.setCancelled(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public ChatListener(NeoProtectSpigot instance) {
public void onChat(AsyncPlayerChatEvent event) {
Player player = event.getPlayer();

if (!player.hasPermission("neoprotect.admin") || !instance.getCore().getPlayerInSetup().contains(player))
if ((!player.hasPermission("neoprotect.admin") && !instance.getCore().isPlayerMaintainer(event.getPlayer().getUniqueId(), instance.getServer().getOnlineMode())) || !instance.getCore().getPlayerInSetup().contains(player))
return;

event.setCancelled(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public void onChat(PlayerChatEvent event) {

Player player = event.getPlayer();

if (!player.hasPermission("neoprotect.admin") || !instance.getCore().getPlayerInSetup().contains(player))
if ((!player.hasPermission("neoprotect.admin") && !instance.getCore().isPlayerMaintainer(player.getUniqueId(), instance.getProxy().getConfiguration().isOnlineMode())) || !instance.getCore().getPlayerInSetup().contains(player))
return;

event.setResult(PlayerChatEvent.ChatResult.denied());
Expand Down

0 comments on commit 8c874ad

Please sign in to comment.