Revert "Unpushed work."

This reverts commit ddf90fe005.
This commit is contained in:
Jitse Boonstra
2018-12-14 14:44:37 +01:00
parent ddf90fe005
commit d741db78de
67 changed files with 105 additions and 1719 deletions
@@ -4,6 +4,8 @@
package net.jitse.npclib.api;
import com.mojang.authlib.GameProfile;
import com.mojang.authlib.properties.Property;
import net.jitse.npclib.NPCManager;
import net.jitse.npclib.events.NPCDestroyEvent;
import net.jitse.npclib.events.NPCSpawnEvent;
@@ -37,6 +39,7 @@ public abstract class NPC implements PacketHandler, ActionHandler {
protected final List<String> lines;
protected JavaPlugin plugin;
protected GameProfile gameProfile;
protected Location location;
public NPC(JavaPlugin plugin, Skin skin, double autoHideDistance, List<String> lines) {
@@ -48,6 +51,17 @@ public abstract class NPC implements PacketHandler, ActionHandler {
NPCManager.add(this);
}
protected GameProfile generateGameProfile(UUID uuid, String name) {
GameProfile gameProfile = new GameProfile(uuid, name);
if (skin != null) {
gameProfile.getProperties().put("textures", new Property("textures", skin.getValue(), skin.getSignature()));
}
return gameProfile;
}
public void destroy() {
destroy(true);
}