mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-26 01:51:42 +01:00
Test #614 fix for socialspy
This commit is contained in:
parent
5478a47e25
commit
4c89ef5638
@ -636,14 +636,14 @@ public class EssentialsPlayerListener extends PlayerListener
|
||||
{
|
||||
if (event.isCancelled()) return;
|
||||
User user = ess.getUser(event.getPlayer());
|
||||
String cmd = event.getMessage().toLowerCase();
|
||||
String cmd = event.getMessage().toLowerCase().split(" ")[0].replace("/", "").toLowerCase();
|
||||
if (("msg".equals(cmd) || "r".equals(cmd) || "mail".equals(cmd)))
|
||||
{
|
||||
for (Player player : ess.getServer().getOnlinePlayers())
|
||||
{
|
||||
if (ess.getUser(player).isSocialSpyEnabled())
|
||||
{
|
||||
player.sendMessage(user.getDisplayName() + " : " + cmd);
|
||||
player.sendMessage(user.getDisplayName() + " : " + event.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user