diff --git a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java index 92e7e806..c0887bff 100644 --- a/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java +++ b/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlayerListener.java @@ -182,14 +182,21 @@ public void onPlayerMove(PlayerMoveEvent event) { Boolean notifyEnter = set.getFlag(DefaultFlag.NOTIFY_ENTER); Boolean notifyLeave = set.getFlag(DefaultFlag.NOTIFY_LEAVE); + if (state.lastFarewell != null && (farewell == null + || !state.lastFarewell.equals(farewell))) { + player.sendMessage(ChatColor.AQUA + " ** " + state.lastFarewell); + } + if (greeting != null && (state.lastGreeting == null || !state.lastGreeting.equals(greeting))) { player.sendMessage(ChatColor.AQUA + " ** " + greeting); } - if (state.lastFarewell != null && (farewell == null - || !state.lastFarewell.equals(farewell))) { - player.sendMessage(ChatColor.AQUA + " ** " + state.lastFarewell); + if ((notifyLeave == null || !notifyLeave) + && state.notifiedForLeave != null && state.notifiedForLeave) { + plugin.broadcastNotification(ChatColor.GRAY + "WG: " + + ChatColor.LIGHT_PURPLE + player.getName() + + ChatColor.GOLD + " left NOTIFY region"); } if (notifyEnter != null && notifyEnter && (state.notifiedForEnter == null @@ -209,13 +216,6 @@ public void onPlayerMove(PlayerMoveEvent event) { + ChatColor.WHITE + regionList); } - - if ((notifyLeave == null || !notifyLeave) - && state.notifiedForLeave != null && state.notifiedForLeave) { - plugin.broadcastNotification(ChatColor.GRAY + "WG: " - + ChatColor.LIGHT_PURPLE + player.getName() - + ChatColor.GOLD + " left NOTIFY region"); - } state.lastGreeting = greeting; state.lastFarewell = farewell;