Add colorification to entry and exit messages as well.

This commit is contained in:
wizjany 2015-01-19 14:23:04 -05:00
parent 972ccaed7e
commit 5111d40aaf
2 changed files with 4 additions and 2 deletions

View File

@ -20,6 +20,7 @@
package com.sk89q.worldguard.session.handler;
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.bukkit.commands.CommandUtils;
import com.sk89q.worldguard.protection.ApplicableRegionSet;
import com.sk89q.worldguard.protection.flags.DefaultFlag;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
@ -49,7 +50,7 @@ public boolean onCrossBoundary(Player player, Location from, Location to, Applic
long now = System.currentTimeMillis();
if ((now - lastMessage) > MESSAGE_THRESHOLD && message != null && !message.isEmpty()) {
player.sendMessage(message);
player.sendMessage(CommandUtils.replaceColorMacros(message));
lastMessage = now;
}

View File

@ -20,6 +20,7 @@
package com.sk89q.worldguard.session.handler;
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.bukkit.commands.CommandUtils;
import com.sk89q.worldguard.protection.ApplicableRegionSet;
import com.sk89q.worldguard.protection.flags.DefaultFlag;
import com.sk89q.worldguard.protection.flags.StateFlag;
@ -49,7 +50,7 @@ private void sendMessage(Player player) {
long now = System.currentTimeMillis();
if ((now - lastMessage) > MESSAGE_THRESHOLD && storedMessage != null && !storedMessage.isEmpty()) {
player.sendMessage(storedMessage);
player.sendMessage(CommandUtils.replaceColorMacros(storedMessage));
lastMessage = now;
}
}