package com.lesserhydra.secondchance;

import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.entity.Player;

public class DeathpointMessage {
	
	private final String messageString;
	
	public DeathpointMessage(String messageString) {
		this.messageString = messageString.replace('&', ChatColor.COLOR_CHAR);//.replace("\\n", "\n");
	}
	
	public void sendMessage(Player player, Deathpoint deathpoint) {
		if (messageString.isEmpty()) return;
		Location location = deathpoint.getLocation();
		player.sendMessage(messageString.replace("<x>", "" + location.getBlockX())
										.replace("<y>", "" + location.getBlockX())
										.replace("<z>", "" + location.getBlockX())
										.replace("<player>", player.getName()));
	}
	
}

@@ -323,32 +323,8 @@
 AR);
-//.replace(%22%5C%5Cn%22, %22%5Cn%22);
 %0A%09%7D%0A
@@ -594,33 +594,33 @@
 ocation.getBlock
-X
+Y
 ())%0A%09%09%09%09%09%09%09%09%09%09.r
@@ -647,33 +647,33 @@
 ocation.getBlock
-X
+Z
 ())%0A%09%09%09%09%09%09%09%09%09%09.r

Fix message coordinate tokens all resolving to x coordinate