From 28dad1fdb7ce6e9698879070ba96e07792f0ee98 Mon Sep 17 00:00:00 2001 From: Josvth Date: Sat, 4 Aug 2012 10:41:49 +0200 Subject: [PATCH] Added custom colored messages. --- .../src/me/Josvth/RandomSpawn/Listeners/RespawnListener.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/randomspawn-paper/Random Spawn/src/me/Josvth/RandomSpawn/Listeners/RespawnListener.java b/plugins/randomspawn-paper/Random Spawn/src/me/Josvth/RandomSpawn/Listeners/RespawnListener.java index 45233daea..3917b7a2c 100644 --- a/plugins/randomspawn-paper/Random Spawn/src/me/Josvth/RandomSpawn/Listeners/RespawnListener.java +++ b/plugins/randomspawn-paper/Random Spawn/src/me/Josvth/RandomSpawn/Listeners/RespawnListener.java @@ -4,6 +4,7 @@ import java.util.List; import me.Josvth.RandomSpawn.RandomSpawn; +import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.World; import org.bukkit.entity.Player; @@ -52,6 +53,8 @@ public class RespawnListener implements Listener{ Location spawnLocation = plugin.chooseSpawn(world); + //player.sendMessage("You should be random spawned at: " + spawnLocation.getX() + "," + spawnLocation.getY() + "," + spawnLocation.getZ()); + plugin.sendGround(player, spawnLocation); event.setRespawnLocation(spawnLocation); @@ -63,7 +66,7 @@ public class RespawnListener implements Listener{ } if (plugin.yamlHandler.config.getString("messages.randomspawned") != null){ - player.sendMessage(plugin.yamlHandler.config.getString("messages.randomspawned")); + player.sendMessage(ChatColor.translateAlternateColorCodes('&', plugin.yamlHandler.config.getString("messages.randomspawned"))); } } }