mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-01-26 10:01:21 +01:00
Fix color codes in greeting/farewell messages.
Fixes WORLDGUARD-3319.
This commit is contained in:
parent
91353d6b01
commit
8073945af0
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldguard.session.handler;
|
package com.sk89q.worldguard.session.handler;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
import com.sk89q.worldguard.bukkit.commands.CommandUtils;
|
||||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||||
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||||
@ -65,7 +66,9 @@ public boolean onCrossBoundary(Player player, Location from, Location to, Applic
|
|||||||
|
|
||||||
for (String message : lastMessageStack) {
|
for (String message : lastMessageStack) {
|
||||||
if (!messages.contains(message)) {
|
if (!messages.contains(message)) {
|
||||||
player.sendMessage(getPlugin().replaceMacros(player, message).replaceAll("\\\\n", "\n").split("\\n"));
|
String effective = CommandUtils.replaceColorMacros(message);
|
||||||
|
effective = getPlugin().replaceMacros(player, effective);
|
||||||
|
player.sendMessage(effective.replaceAll("\\\\n", "\n").split("\\n"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
package com.sk89q.worldguard.session.handler;
|
package com.sk89q.worldguard.session.handler;
|
||||||
|
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
|
import com.sk89q.worldguard.bukkit.commands.CommandUtils;
|
||||||
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
import com.sk89q.worldguard.protection.ApplicableRegionSet;
|
||||||
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
import com.sk89q.worldguard.protection.flags.DefaultFlag;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||||
@ -46,7 +47,9 @@ public boolean onCrossBoundary(Player player, Location from, Location to, Applic
|
|||||||
|
|
||||||
for (String message : messages) {
|
for (String message : messages) {
|
||||||
if (!lastMessageStack.contains(message)) {
|
if (!lastMessageStack.contains(message)) {
|
||||||
player.sendMessage(getPlugin().replaceMacros(player, message).replaceAll("\\\\n", "\n").split("\\n"));
|
String effective = CommandUtils.replaceColorMacros(message);
|
||||||
|
effective = getPlugin().replaceMacros(player, effective);
|
||||||
|
player.sendMessage(effective.replaceAll("\\\\n", "\n").split("\\n"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user