Fix loading NPCs from database
This commit is contained in:
parent
87b977706d
commit
64065f432c
@ -44,7 +44,6 @@ public class NPCBuilder
|
||||
|
||||
npc = new PlayerNPC(
|
||||
-1,
|
||||
EntityType.ARMOR_STAND,
|
||||
_name,
|
||||
location,
|
||||
inHand,
|
||||
|
@ -62,9 +62,9 @@ class NewNPCRepository extends RepositoryBase
|
||||
continue;
|
||||
}
|
||||
|
||||
if (skinValue != null && skinSignature != null)
|
||||
if (entityType == EntityType.PLAYER)
|
||||
{
|
||||
npc = new PlayerNPC(id, entityType, name, new Location(world, x, y, z, yaw, pitch), inHand, helmet, chestplate, leggings, boots, metadata, skinValue, skinSignature);
|
||||
npc = new PlayerNPC(id, name, new Location(world, x, y, z, yaw, pitch), inHand, helmet, chestplate, leggings, boots, metadata, skinValue, skinSignature);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -28,9 +28,9 @@ public class PlayerNPC extends NPC
|
||||
|
||||
private DisguisePlayer _disguise;
|
||||
|
||||
public PlayerNPC(int id, EntityType entityType, String name, Location spawn, Material inHand, Material helmet, Material chestplate, Material leggings, Material boots, String metadata, String skinValue, String skinSignature)
|
||||
public PlayerNPC(int id, String name, Location spawn, Material inHand, Material helmet, Material chestplate, Material leggings, Material boots, String metadata, String skinValue, String skinSignature)
|
||||
{
|
||||
super(id, entityType, name, spawn, inHand, helmet, chestplate, leggings, boots, metadata);
|
||||
super(id, EntityType.ARMOR_STAND, name, spawn, inHand, helmet, chestplate, leggings, boots, metadata);
|
||||
|
||||
_skinData = new SkinData(skinValue, skinSignature);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user