mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-05 07:57:59 +01: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:
parent
cd51d718ba
commit
fc63f63de6
@ -246,11 +246,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
final List<String> mail = user.getMails();
|
final List<String> mail = user.getMails();
|
||||||
if (mail.isEmpty())
|
if (mail.isEmpty())
|
||||||
{
|
{
|
||||||
final String msg = _("noNewMail");
|
user.sendMessage(_("noNewMail"));
|
||||||
if (!msg.isEmpty())
|
|
||||||
{
|
|
||||||
user.sendMessage(msg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -783,4 +783,11 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es
|
|||||||
{
|
{
|
||||||
this.recipeSee = recipeSee;
|
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);
|
spyList.add(onlinePlayer);
|
||||||
}
|
}
|
||||||
outList.remove(onlinePlayer);
|
it.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (outList.size() < 2) {
|
if (outList.size() < 2) {
|
||||||
event.getPlayer().sendMessage(_("localNoOne"));
|
user.sendMessage(_("localNoOne"));
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalChatSpyEvent spyEvent = new LocalChatSpyEvent(event.isAsynchronous(), event.getPlayer(), event.getFormat(), event.getMessage(), spyList);
|
LocalChatSpyEvent spyEvent = new LocalChatSpyEvent(event.isAsynchronous(), event.getPlayer(), event.getFormat(), event.getMessage(), spyList);
|
||||||
|
Loading…
Reference in New Issue
Block a user