mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 03:53:41 +00:00
Chat spy, should show otherworld chat.
This commit is contained in:
parent
6a75d6fe86
commit
6504c88bf7
1 changed files with 8 additions and 9 deletions
|
@ -125,6 +125,12 @@ public abstract class EssentialsChatPlayer implements Listener
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!onlineUser.equals(sender))
|
if (!onlineUser.equals(sender))
|
||||||
|
{
|
||||||
|
if (onlineUser.isAuthorized("essentials.chat.spy"))
|
||||||
|
{
|
||||||
|
type = type.concat(_("chatTypeSpy"));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
final Location playerLoc = onlineUser.getLocation();
|
final Location playerLoc = onlineUser.getLocation();
|
||||||
if (playerLoc.getWorld() != world)
|
if (playerLoc.getWorld() != world)
|
||||||
|
@ -132,14 +138,7 @@ public abstract class EssentialsChatPlayer implements Listener
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
final double delta = playerLoc.distanceSquared(loc);
|
final double delta = playerLoc.distanceSquared(loc);
|
||||||
|
|
||||||
if (delta > chatStore.getRadius())
|
if (delta > chatStore.getRadius())
|
||||||
{
|
|
||||||
if (onlineUser.isAuthorized("essentials.chat.spy"))
|
|
||||||
{
|
|
||||||
type = type.concat(_("chatTypeSpy"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue