// Path: src/protocolsupportpocketstuff/api/skins/SkinUtils.java
// public static class SkinDataWrapper {
// 
// 	private static final String PROPERTY_NAME = "textures";
// 	private String signature;
// 	private String value;
// 
// 	/***
// 	 * Creates a new SkinDataWrapper using its base64 value and signature.
// 	 * @param value
// 	 * @param signature
// 	 */
// 	public SkinDataWrapper(String value, String signature) {
// 		this.value = value;
// 		this.signature = signature;
// 	}
// 
// 	/***
// 	 * @return the skin texture value.
// 	 */
// 	public String getValue() {
// 		return value;
// 	}
// 
// 	/***
// 	 * @return the skin's mojang signature.
// 	 */
// 	public String getSignature() {
// 		return signature;
// 	}
// 
// 	/**
// 	 * @return a profile property containing the wrapped data.
// 	 */
// 	public ProfileProperty toProfileProperty() {
// 		return new ProfileProperty(PROPERTY_NAME, getValue(), getSignature());
// 	}
// 
// }
// 
// Path: src/protocolsupportpocketstuff/zplatform/impl/spigot/SpigotStuff.java
// public class SpigotStuff extends PlatformThings {
// 
// 	@Override
// 	public void setSkinProperties(Player player, SkinDataWrapper skindata) {
// 		CraftPlayer craftPlayer = ((CraftPlayer) player);
// 		EntityHuman entityHuman = craftPlayer.getHandle();
// 		try {
// 			Field gp2 = EntityHuman.class.getDeclaredField("h");
// 			gp2.setAccessible(true);
// 			GameProfile profile = (GameProfile) gp2.get(entityHuman);
// 			profile.getProperties().removeAll("textures");
// 			profile.getProperties().put("textures", new Property("textures", skindata.getValue(), skindata.getSignature()));
// 			gp2.set(entityHuman, profile);
// 		} catch (Exception e) {
// 			e.printStackTrace();
// 			return;
// 		}
// 	}
// 
// 	@SuppressWarnings("deprecation")
// 	@Override
// 	public void sendPlayerSkin(Player player, SkinDataWrapper skindata) {
// 		Connection connection = ProtocolSupportAPI.getConnection(player);
// 		EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
// 		connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, entityPlayer));
// 		DimensionManager dimThing = null;
// 		switch (player.getWorld().getEnvironment()) {
// 		case NETHER:
// 			dimThing = DimensionManager.NETHER;
// 			break;
// 		case NORMAL:
// 			dimThing = DimensionManager.OVERWORLD;
// 			break;
// 		case THE_END:
// 			dimThing = DimensionManager.THE_END;
// 			break;
// 		}
// 		connection.sendPacket(new PacketPlayOutRespawn(dimThing, entityPlayer.world.getDifficulty(), WorldType.NORMAL, EnumGamemode.getById(player.getGameMode().getValue())));
// 		player.setHealth(player.getHealth());
// 		player.setMaxHealth(player.getMaxHealth());
// 		player.setFlying(player.isFlying());
// 		player.teleport(player.getLocation());
// 		player.setLevel(player.getLevel());
// 		player.setExp(player.getExp());
// 		player.updateInventory();
// 		connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, entityPlayer));
// 	}
// 
// }


import org.bukkit.entity.Player;
import protocolsupport.api.ServerPlatformIdentifier;
import protocolsupportpocketstuff.api.skins.SkinUtils.SkinDataWrapper;
import protocolsupportpocketstuff.zplatform.impl.spigot.SpigotStuff;
package protocolsupportpocketstuff.zplatform;



public abstract class PlatformThings {

	public abstract void setSkinProperties(Player player, SkinDataWrapper skindata);

	public abstract void sendPlayerSkin(Player player, SkinDataWrapper skindata);

	private static PlatformThings stuff;

	public static void bakeStuff() {
		switch(ServerPlatformIdentifier.get()) {
		case SPIGOT:
// Path: src/protocolsupportpocketstuff/api/skins/SkinUtils.java
// public static class SkinDataWrapper {
// 
// 	private static final String PROPERTY_NAME = "textures";
// 	private String signature;
// 	private String value;
// 
// 	/***
// 	 * Creates a new SkinDataWrapper using its base64 value and signature.
// 	 * @param value
// 	 * @param signature
// 	 */
// 	public SkinDataWrapper(String value, String signature) {
// 		this.value = value;
// 		this.signature = signature;
// 	}
// 
// 	/***
// 	 * @return the skin texture value.
// 	 */
// 	public String getValue() {
// 		return value;
// 	}
// 
// 	/***
// 	 * @return the skin's mojang signature.
// 	 */
// 	public String getSignature() {
// 		return signature;
// 	}
// 
// 	/**
// 	 * @return a profile property containing the wrapped data.
// 	 */
// 	public ProfileProperty toProfileProperty() {
// 		return new ProfileProperty(PROPERTY_NAME, getValue(), getSignature());
// 	}
// 
// }
// 
// Path: src/protocolsupportpocketstuff/zplatform/impl/spigot/SpigotStuff.java
// public class SpigotStuff extends PlatformThings {
// 
// 	@Override
// 	public void setSkinProperties(Player player, SkinDataWrapper skindata) {
// 		CraftPlayer craftPlayer = ((CraftPlayer) player);
// 		EntityHuman entityHuman = craftPlayer.getHandle();
// 		try {
// 			Field gp2 = EntityHuman.class.getDeclaredField("h");
// 			gp2.setAccessible(true);
// 			GameProfile profile = (GameProfile) gp2.get(entityHuman);
// 			profile.getProperties().removeAll("textures");
// 			profile.getProperties().put("textures", new Property("textures", skindata.getValue(), skindata.getSignature()));
// 			gp2.set(entityHuman, profile);
// 		} catch (Exception e) {
// 			e.printStackTrace();
// 			return;
// 		}
// 	}
// 
// 	@SuppressWarnings("deprecation")
// 	@Override
// 	public void sendPlayerSkin(Player player, SkinDataWrapper skindata) {
// 		Connection connection = ProtocolSupportAPI.getConnection(player);
// 		EntityPlayer entityPlayer = ((CraftPlayer) player).getHandle();
// 		connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.REMOVE_PLAYER, entityPlayer));
// 		DimensionManager dimThing = null;
// 		switch (player.getWorld().getEnvironment()) {
// 		case NETHER:
// 			dimThing = DimensionManager.NETHER;
// 			break;
// 		case NORMAL:
// 			dimThing = DimensionManager.OVERWORLD;
// 			break;
// 		case THE_END:
// 			dimThing = DimensionManager.THE_END;
// 			break;
// 		}
// 		connection.sendPacket(new PacketPlayOutRespawn(dimThing, entityPlayer.world.getDifficulty(), WorldType.NORMAL, EnumGamemode.getById(player.getGameMode().getValue())));
// 		player.setHealth(player.getHealth());
// 		player.setMaxHealth(player.getMaxHealth());
// 		player.setFlying(player.isFlying());
// 		player.teleport(player.getLocation());
// 		player.setLevel(player.getLevel());
// 		player.setExp(player.getExp());
// 		player.updateInventory();
// 		connection.sendPacket(new PacketPlayOutPlayerInfo(PacketPlayOutPlayerInfo.EnumPlayerInfoAction.ADD_PLAYER, entityPlayer));
// 	}
// 
// }


// Path: src/protocolsupportpocketstuff/zplatform/PlatformThings.java
import org.bukkit.entity.Player;
import protocolsupport.api.ServerPlatformIdentifier;
import protocolsupportpocketstuff.api.skins.SkinUtils.SkinDataWrapper;
import protocolsupportpocketstuff.zplatform.impl.spigot.SpigotStuff;

package protocolsupportpocketstuff.zplatform;



public abstract class PlatformThings {

	public abstract void setSkinProperties(Player player, SkinDataWrapper skindata);

	public abstract void sendPlayerSkin(Player player, SkinDataWrapper skindata);

	private static PlatformThings stuff;

	public static void bakeStuff() {
		switch(ServerPlatformIdentifier.get()) {
		case SPIGOT:
			stuff = new SpigotStuff();