1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-12 09:35:26 +02:00

Stripping vanilla colours from /msg

This commit is contained in:
KHobbits
2012-01-16 19:42:15 +00:00
parent 9cb1e28654
commit 717766b6f9
2 changed files with 24 additions and 20 deletions

View File

@@ -112,7 +112,7 @@ public abstract class EssentialsChatPlayer extends PlayerListener
logger.info(_("localFormat", sender.getName(), event.getMessage()));
final Location loc = sender.getLocation();
final World world = loc.getWorld();
for (Player onlinePlayer : server.getOnlinePlayers())
{
String type = "[L]";
@@ -123,11 +123,14 @@ public abstract class EssentialsChatPlayer extends PlayerListener
continue;
}
if (!user.equals(sender))
{
{
final Location playerLoc = user.getLocation();
if (playerLoc.getWorld() != world) { continue; }
if (playerLoc.getWorld() != world)
{
continue;
}
final double delta = playerLoc.distanceSquared(loc);
if (delta > radius)
{
if (user.isAuthorized("essentials.chat.spy"))