mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-16 09:06:53 +02:00
Changed leave messages to be printed BEFORE enter messages. Suggested by Protected.
This commit is contained in:
parent
7059fdfd9e
commit
2188690d20
@ -182,14 +182,21 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
Boolean notifyEnter = set.getFlag(DefaultFlag.NOTIFY_ENTER);
|
Boolean notifyEnter = set.getFlag(DefaultFlag.NOTIFY_ENTER);
|
||||||
Boolean notifyLeave = set.getFlag(DefaultFlag.NOTIFY_LEAVE);
|
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
|
if (greeting != null && (state.lastGreeting == null
|
||||||
|| !state.lastGreeting.equals(greeting))) {
|
|| !state.lastGreeting.equals(greeting))) {
|
||||||
player.sendMessage(ChatColor.AQUA + " ** " + greeting);
|
player.sendMessage(ChatColor.AQUA + " ** " + greeting);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.lastFarewell != null && (farewell == null
|
if ((notifyLeave == null || !notifyLeave)
|
||||||
|| !state.lastFarewell.equals(farewell))) {
|
&& state.notifiedForLeave != null && state.notifiedForLeave) {
|
||||||
player.sendMessage(ChatColor.AQUA + " ** " + state.lastFarewell);
|
plugin.broadcastNotification(ChatColor.GRAY + "WG: "
|
||||||
|
+ ChatColor.LIGHT_PURPLE + player.getName()
|
||||||
|
+ ChatColor.GOLD + " left NOTIFY region");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (notifyEnter != null && notifyEnter && (state.notifiedForEnter == null
|
if (notifyEnter != null && notifyEnter && (state.notifiedForEnter == null
|
||||||
@ -210,13 +217,6 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
+ regionList);
|
+ 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.lastGreeting = greeting;
|
||||||
state.lastFarewell = farewell;
|
state.lastFarewell = farewell;
|
||||||
state.notifiedForEnter = notifyEnter;
|
state.notifiedForEnter = notifyEnter;
|
||||||
|
Loading…
Reference in New Issue
Block a user