mirror of
https://github.com/songoda/UltimateModeration.git
synced 2024-11-26 12:15:14 +01:00
fix commandspy to wrong players, don't spy on own commands (SD-3439, SD-3421)
This commit is contained in:
parent
0ff769ca4b
commit
7e0bcc2e9d
@ -50,11 +50,11 @@ public class CommandListener implements Listener {
|
||||
|
||||
if (!player.hasPermission("um.commandspy.immune")) {
|
||||
for (Player pl : Bukkit.getOnlinePlayers()) {
|
||||
if (pl.hasPermission("um.commandspy") && CommandCommandSpy.isSpying(pl))
|
||||
if (pl != player && pl.hasPermission("um.commandspy") && CommandCommandSpy.isSpying(pl))
|
||||
instance.getLocale().getMessage("command.commandspy.deny")
|
||||
.processPlaceholder("player", player.getName())
|
||||
.processPlaceholder("command", StringEscapeUtils.escapeJava(command))
|
||||
.sendPrefixedMessage(player);
|
||||
.sendPrefixedMessage(pl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user