mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-18 15:17:36 +01:00
Fixed a few movement flag related issues.
WG no longer prefixes greeting/farewell flags with '**', allowing people to customize the message. (Adding &c** to the beginning of the message will give previous behavior) Removed the "game mode locked" message since it returns false gamemodes when being called inside a player move event.
This commit is contained in:
parent
39bb522051
commit
6283382837
@ -221,7 +221,7 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
String replacedFarewell = plugin.replaceMacros(
|
String replacedFarewell = plugin.replaceMacros(
|
||||||
player, BukkitUtil.replaceColorMacros(state.lastFarewell));
|
player, BukkitUtil.replaceColorMacros(state.lastFarewell));
|
||||||
for (String line : replacedFarewell.split("\n")) {
|
for (String line : replacedFarewell.split("\n")) {
|
||||||
player.sendMessage(ChatColor.AQUA + " ** " + line);
|
player.sendMessage(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,7 +230,7 @@ public void onPlayerMove(PlayerMoveEvent event) {
|
|||||||
String replacedGreeting = plugin.replaceMacros(
|
String replacedGreeting = plugin.replaceMacros(
|
||||||
player, BukkitUtil.replaceColorMacros(greeting));
|
player, BukkitUtil.replaceColorMacros(greeting));
|
||||||
for (String line : replacedGreeting.split("\n")) {
|
for (String line : replacedGreeting.split("\n")) {
|
||||||
player.sendMessage(ChatColor.AQUA + " ** " + line);
|
player.sendMessage(line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,8 +298,6 @@ public void onPlayerGameModeChange(PlayerGameModeChangeEvent event) {
|
|||||||
if (plugin.getFlagStateManager().getState(player).lastGameMode != null
|
if (plugin.getFlagStateManager().getState(player).lastGameMode != null
|
||||||
&& gameMode != null && event.getNewGameMode() != gameMode) {
|
&& gameMode != null && event.getNewGameMode() != gameMode) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
player.sendMessage(ChatColor.RED + "Your game mode is locked to "
|
|
||||||
+ gameMode + "in this region!");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user