// Path: src/main/java/com/panicnot42/warpbook/core/WarpColors.java
// public enum WarpColors {
// 	
// 	UNBOUND(0xC3C36A, 0xC3C36A),//The default tawny color of a warp page
// 	BOUND(0x098C76, 0x6CF4DC),//The color of an ender pearl
// 	//0x9F1CE5 The original ugly purple player page
// 	PLAYER(0x8e0000, 0xE13232),//Red color.. blood maybe?
// 	HYPER(0x09AA38, 0x53FF41),//Hyper Green
// 	DEATHLY(0x131313, 0x686868),//Near Black
// 	LEATHER(0x654b17, 0x654b17);//The color of vanilla books
// 	
// 	private int	color;
// 	private int specColor;
// 	
// 	WarpColors(int color, int specColor) {
// 		this.color = color;
// 		this.specColor = specColor;
// 	}
// 	
// 	public int getColor() {
// 		return color;
// 	}
// 	
// 	public int getSpecColor() {
// 		return specColor;
// 	}
// }
// 
// Path: src/main/java/com/panicnot42/warpbook/util/MathUtils.java
// public class MathUtils {
// 	public static int round(double value, RoundingMode mode) {
// 		return new BigDecimal(value).setScale(0, mode).intValue();
// 	}
// }
// 
// Path: src/main/java/com/panicnot42/warpbook/util/Waypoint.java
// public class Waypoint implements INBTSerializable {
// 	public String friendlyName, name;
// 	public int x, y, z, dim;
// 	
// 	public Waypoint(String friendlyName, String name, int x, int y, int z, int dim) {
// 		this.friendlyName = friendlyName;
// 		this.name = name;
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 		this.dim = dim;
// 	}
// 	
// 	public Waypoint(NBTTagCompound var1) {
// 		readFromNBT(var1);
// 	}
// 	
// 	@Override
// 	public void readFromNBT(NBTTagCompound var1) {
// 		this.friendlyName = var1.getString("friendlyName");
// 		this.x = var1.getInteger("x");
// 		this.y = var1.getInteger("y");
// 		this.z = var1.getInteger("z");
// 		this.dim = var1.getInteger("dim");
// 		this.name = var1.getString("name");
// 	}
// 	
// 	@Override
// 	public void writeToNBT(NBTTagCompound var1) {
// 		var1.setString("friendlyName", this.friendlyName);
// 		var1.setInteger("x", this.x);
// 		var1.setInteger("y", this.y);
// 		var1.setInteger("z", this.z);
// 		var1.setInteger("dim", this.dim);
// 		var1.setString("name", this.name);
// 	}
// 
// }


import java.math.RoundingMode;
import java.util.List;
import java.util.UUID;
import com.panicnot42.warpbook.core.WarpColors;
import com.panicnot42.warpbook.util.MathUtils;
import com.panicnot42.warpbook.util.Waypoint;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
package com.panicnot42.warpbook.warps;




public class WarpPlayer extends Warp {

	@Override
	public String getName(World world, ItemStack stack) {
		if (hasValidData(stack)) {
			String name = stack.getTagCompound().getString("player");
			if(name != null) {
				return name;
			}
		}
		return unbound;
	}
	
	@Override
	public Waypoint getWaypoint(EntityPlayer player, ItemStack stack) {

		if (!player.world.isRemote) {
			if(hasValidData(stack)) {
				UUID playerID = UUID.fromString(stack.getTagCompound().getString("playeruuid"));
				EntityPlayerMP playerTo = null;
				List<EntityPlayerMP> allPlayers = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayers();
				for (EntityPlayerMP playerS : allPlayers) {
					if (playerS.getUniqueID().equals(playerID)) {
						playerTo = playerS;
					}
				}
				if (player != playerTo && playerTo != null) {
					return new Waypoint("", "",
// Path: src/main/java/com/panicnot42/warpbook/core/WarpColors.java
// public enum WarpColors {
// 	
// 	UNBOUND(0xC3C36A, 0xC3C36A),//The default tawny color of a warp page
// 	BOUND(0x098C76, 0x6CF4DC),//The color of an ender pearl
// 	//0x9F1CE5 The original ugly purple player page
// 	PLAYER(0x8e0000, 0xE13232),//Red color.. blood maybe?
// 	HYPER(0x09AA38, 0x53FF41),//Hyper Green
// 	DEATHLY(0x131313, 0x686868),//Near Black
// 	LEATHER(0x654b17, 0x654b17);//The color of vanilla books
// 	
// 	private int	color;
// 	private int specColor;
// 	
// 	WarpColors(int color, int specColor) {
// 		this.color = color;
// 		this.specColor = specColor;
// 	}
// 	
// 	public int getColor() {
// 		return color;
// 	}
// 	
// 	public int getSpecColor() {
// 		return specColor;
// 	}
// }
// 
// Path: src/main/java/com/panicnot42/warpbook/util/MathUtils.java
// public class MathUtils {
// 	public static int round(double value, RoundingMode mode) {
// 		return new BigDecimal(value).setScale(0, mode).intValue();
// 	}
// }
// 
// Path: src/main/java/com/panicnot42/warpbook/util/Waypoint.java
// public class Waypoint implements INBTSerializable {
// 	public String friendlyName, name;
// 	public int x, y, z, dim;
// 	
// 	public Waypoint(String friendlyName, String name, int x, int y, int z, int dim) {
// 		this.friendlyName = friendlyName;
// 		this.name = name;
// 		this.x = x;
// 		this.y = y;
// 		this.z = z;
// 		this.dim = dim;
// 	}
// 	
// 	public Waypoint(NBTTagCompound var1) {
// 		readFromNBT(var1);
// 	}
// 	
// 	@Override
// 	public void readFromNBT(NBTTagCompound var1) {
// 		this.friendlyName = var1.getString("friendlyName");
// 		this.x = var1.getInteger("x");
// 		this.y = var1.getInteger("y");
// 		this.z = var1.getInteger("z");
// 		this.dim = var1.getInteger("dim");
// 		this.name = var1.getString("name");
// 	}
// 	
// 	@Override
// 	public void writeToNBT(NBTTagCompound var1) {
// 		var1.setString("friendlyName", this.friendlyName);
// 		var1.setInteger("x", this.x);
// 		var1.setInteger("y", this.y);
// 		var1.setInteger("z", this.z);
// 		var1.setInteger("dim", this.dim);
// 		var1.setString("name", this.name);
// 	}
// 
// }


// Path: src/main/java/com/panicnot42/warpbook/warps/WarpPlayer.java
import java.math.RoundingMode;
import java.util.List;
import java.util.UUID;
import com.panicnot42.warpbook.core.WarpColors;
import com.panicnot42.warpbook.util.MathUtils;
import com.panicnot42.warpbook.util.Waypoint;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

package com.panicnot42.warpbook.warps;




public class WarpPlayer extends Warp {

	@Override
	public String getName(World world, ItemStack stack) {
		if (hasValidData(stack)) {
			String name = stack.getTagCompound().getString("player");
			if(name != null) {
				return name;
			}
		}
		return unbound;
	}
	
	@Override
	public Waypoint getWaypoint(EntityPlayer player, ItemStack stack) {

		if (!player.world.isRemote) {
			if(hasValidData(stack)) {
				UUID playerID = UUID.fromString(stack.getTagCompound().getString("playeruuid"));
				EntityPlayerMP playerTo = null;
				List<EntityPlayerMP> allPlayers = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayers();
				for (EntityPlayerMP playerS : allPlayers) {
					if (playerS.getUniqueID().equals(playerID)) {
						playerTo = playerS;
					}
				}
				if (player != playerTo && playerTo != null) {
					return new Waypoint("", "",
							MathUtils.round(playerTo.posX, RoundingMode.DOWN),