From c6ff4dafe79d927321c4e5c8a280a1bf7068277f Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Wed, 4 Dec 2013 07:44:33 +1300 Subject: [PATCH] Add more commenting, add addEntityAnimations to flagwatcher clone --- src/me/libraryaddict/disguise/disguisetypes/AnimalColor.java | 3 +++ src/me/libraryaddict/disguise/disguisetypes/Disguise.java | 5 ++++- src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/me/libraryaddict/disguise/disguisetypes/AnimalColor.java b/src/me/libraryaddict/disguise/disguisetypes/AnimalColor.java index c1021d00..08a1fa5a 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/AnimalColor.java +++ b/src/me/libraryaddict/disguise/disguisetypes/AnimalColor.java @@ -10,6 +10,9 @@ public enum AnimalColor { value = newValue; } + /** + * The color ID as defined by nms internals. + */ public int getId() { return value; } diff --git a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java index 0647bf0b..b4e4dca7 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -48,12 +48,15 @@ public abstract class Disguise { @Override public abstract Disguise clone(); + /** + * Seems I do this method so I can make cleaner constructors on disguises.. + */ protected void createDisguise(DisguiseType newType, boolean doSounds) { if (getWatcher() != null) return; if (newType.getEntityType() == null) { throw new RuntimeException("DisguiseType " + newType - + " was used to attempt to construct a disguise, but this version of craftbukkit does not have that entity"); + + " was used in a futile attempt to construct a disguise, but this version of craftbukkit does not have that entity"); } // Set the disguise type disguiseType = newType; diff --git a/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java b/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java index 18bc51aa..80591207 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java +++ b/src/me/libraryaddict/disguise/disguisetypes/FlagWatcher.java @@ -67,6 +67,7 @@ public class FlagWatcher { cloned.entityValues = (HashMap) entityValues.clone(); cloned.items = items.clone(); cloned.modifiedEntityAnimations = (HashSet) modifiedEntityAnimations.clone(); + cloned.addEntityAnimations = addEntityAnimations; return cloned; }