diff --git a/pom.xml b/pom.xml index f35c88b4..46ccb202 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ UTF-8 - 1.15-R0.1-SNAPSHOT + 1.15.1-R0.1-SNAPSHOT 1.4.12 Unknown diff --git a/src/main/java/net/citizensnpcs/api/npc/AbstractNPC.java b/src/main/java/net/citizensnpcs/api/npc/AbstractNPC.java index 334693e6..0ba95b0e 100644 --- a/src/main/java/net/citizensnpcs/api/npc/AbstractNPC.java +++ b/src/main/java/net/citizensnpcs/api/npc/AbstractNPC.java @@ -121,6 +121,11 @@ public void addTrait(Trait trait) { @Override public NPC clone() { + return copy(); + } + + @Override + public NPC copy() { NPC copy = registry.createNPC(getTrait(MobType.class).getType(), getFullName()); DataKey key = new MemoryDataKey(); save(key); @@ -133,6 +138,7 @@ public NPC clone() { return copy; } + @Override public MetadataStore data() { return this.metadata; diff --git a/src/main/java/net/citizensnpcs/api/npc/NPC.java b/src/main/java/net/citizensnpcs/api/npc/NPC.java index 4071a958..7d133786 100644 --- a/src/main/java/net/citizensnpcs/api/npc/NPC.java +++ b/src/main/java/net/citizensnpcs/api/npc/NPC.java @@ -47,6 +47,11 @@ public interface NPC extends Agent, Cloneable { * @return A clone of the NPC. May not be an exact copy depending on the {@link Trait}s installed. */ public NPC clone(); + + /** + * @return A clone of the NPC. May not be an exact copy depending on the {@link Trait}s installed. + */ + public NPC copy(); /** * @return The metadata store of this NPC.