mirror of
https://github.com/essentials/Essentials.git
synced 2025-07-31 03:40:52 +02:00
Fix local message when no players are in the area
Allow any translation key to be silenced by blanking it in locale file
This commit is contained in:
@@ -246,11 +246,7 @@ public class EssentialsPlayerListener implements Listener
|
||||
final List<String> mail = user.getMails();
|
||||
if (mail.isEmpty())
|
||||
{
|
||||
final String msg = _("noNewMail");
|
||||
if (!msg.isEmpty())
|
||||
{
|
||||
user.sendMessage(msg);
|
||||
}
|
||||
user.sendMessage(_("noNewMail"));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -783,4 +783,11 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
|
||||
{
|
||||
this.recipeSee = recipeSee;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessage(String message) {
|
||||
if (!message.isEmpty()) {
|
||||
base.sendMessage(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -130,13 +130,13 @@ public class EssentialsChatPlayerListenerNormal extends EssentialsChatPlayer
|
||||
{
|
||||
spyList.add(onlinePlayer);
|
||||
}
|
||||
outList.remove(onlinePlayer);
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (outList.size() < 2) {
|
||||
event.getPlayer().sendMessage(_("localNoOne"));
|
||||
user.sendMessage(_("localNoOne"));
|
||||
}
|
||||
|
||||
LocalChatSpyEvent spyEvent = new LocalChatSpyEvent(event.isAsynchronous(), event.getPlayer(), event.getFormat(), event.getMessage(), spyList);
|
||||
|
Reference in New Issue
Block a user