mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Add more commenting, add addEntityAnimations to flagwatcher clone
This commit is contained in:
parent
063b916c25
commit
c6ff4dafe7
@ -10,6 +10,9 @@ public enum AnimalColor {
|
|||||||
value = newValue;
|
value = newValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The color ID as defined by nms internals.
|
||||||
|
*/
|
||||||
public int getId() {
|
public int getId() {
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
|
@ -48,12 +48,15 @@ public abstract class Disguise {
|
|||||||
@Override
|
@Override
|
||||||
public abstract Disguise clone();
|
public abstract Disguise clone();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Seems I do this method so I can make cleaner constructors on disguises..
|
||||||
|
*/
|
||||||
protected void createDisguise(DisguiseType newType, boolean doSounds) {
|
protected void createDisguise(DisguiseType newType, boolean doSounds) {
|
||||||
if (getWatcher() != null)
|
if (getWatcher() != null)
|
||||||
return;
|
return;
|
||||||
if (newType.getEntityType() == null) {
|
if (newType.getEntityType() == null) {
|
||||||
throw new RuntimeException("DisguiseType " + newType
|
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
|
// Set the disguise type
|
||||||
disguiseType = newType;
|
disguiseType = newType;
|
||||||
|
@ -67,6 +67,7 @@ public class FlagWatcher {
|
|||||||
cloned.entityValues = (HashMap<Integer, Object>) entityValues.clone();
|
cloned.entityValues = (HashMap<Integer, Object>) entityValues.clone();
|
||||||
cloned.items = items.clone();
|
cloned.items = items.clone();
|
||||||
cloned.modifiedEntityAnimations = (HashSet) modifiedEntityAnimations.clone();
|
cloned.modifiedEntityAnimations = (HashSet) modifiedEntityAnimations.clone();
|
||||||
|
cloned.addEntityAnimations = addEntityAnimations;
|
||||||
return cloned;
|
return cloned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user