From d40e331c8a97491b810ccbb9dfd5b14be96066ac Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Sat, 7 Dec 2013 14:20:51 +1100 Subject: [PATCH] Disable the login message hooks automatically --- .../earth2me/essentials/EssentialsPlayerListener.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 99cf233da..1382fa4a5 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -195,7 +195,10 @@ public class EssentialsPlayerListener implements Listener delayedJoin(event.getPlayer(), joinMessage); } }); - event.setJoinMessage(null); + if(ess.getSettings().allowSilentJoinQuit() || ess.getSettings().isCustomJoinMessage()) + { + event.setJoinMessage(null); + } } public void delayedJoin(final Player player, final String message) @@ -261,10 +264,6 @@ public class EssentialsPlayerListener implements Listener .replace("{USERNAME}", player.getName()) ); } - else - { - ess.getServer().broadcastMessage(message); - } if (!ess.getSettings().isCommandDisabled("motd") && user.isAuthorized("essentials.motd")) {