mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-09-30 07:37:31 +02:00
Add colorification to entry and exit messages as well.
This commit is contained in:
parent
972ccaed7e
commit
5111d40aaf
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user