mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-09 16:17:37 +02:00
Players should not be able to ignore Console
Also implement chat exempt permission in other commands.
This commit is contained in:
@@ -63,7 +63,7 @@ public abstract class EssentialsChatPlayer implements Listener
|
||||
case '?':
|
||||
return "question";
|
||||
//case '@':
|
||||
//return "admin";
|
||||
//return "admin";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
@@ -121,32 +121,34 @@ public abstract class EssentialsChatPlayer implements Listener
|
||||
{
|
||||
String type = _("chatTypeLocal");
|
||||
final User onlineUser = ess.getUser(onlinePlayer);
|
||||
if (onlineUser.isIgnoredPlayer(sender.getName()) && !sender.isAuthorized("essentials.chat.ignoreexempt"))
|
||||
if (onlineUser.isIgnoredPlayer(sender))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!onlineUser.equals(sender))
|
||||
{
|
||||
boolean abort = false;
|
||||
final Location playerLoc = onlineUser.getLocation();
|
||||
if (playerLoc.getWorld() != world)
|
||||
boolean abort = false;
|
||||
final Location playerLoc = onlineUser.getLocation();
|
||||
if (playerLoc.getWorld() != world)
|
||||
{
|
||||
abort = true;
|
||||
}
|
||||
final double delta = playerLoc.distanceSquared(loc);
|
||||
if (delta > chatStore.getRadius())
|
||||
{
|
||||
abort = true;
|
||||
}
|
||||
if (abort)
|
||||
{
|
||||
if (onlineUser.isAuthorized("essentials.chat.spy"))
|
||||
{
|
||||
abort = true;
|
||||
}
|
||||
final double delta = playerLoc.distanceSquared(loc);
|
||||
if (delta > chatStore.getRadius())
|
||||
{
|
||||
abort = true;
|
||||
}
|
||||
if (abort) {
|
||||
if (onlineUser.isAuthorized("essentials.chat.spy"))
|
||||
{
|
||||
type = type.concat(_("chatTypeSpy"));
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String message = String.format(event.getFormat(), type.concat(sender.getDisplayName()), event.getMessage());
|
||||
|
Reference in New Issue
Block a user