Added rudimentary support for disguising Custom Entities and Modded Entities
Added the DisguiseType 'Unknown', obviously can't be used by players Cleaned up code
This commit is contained in:
@@ -345,6 +345,9 @@ public abstract class BaseDisguiseCommand implements CommandExecutor {
|
||||
throw new DisguiseParseException(ChatColor.RED + "Error! The disguise " + ChatColor.GREEN + args[0]
|
||||
+ ChatColor.RED + " doesn't exist!");
|
||||
}
|
||||
if (disguiseType.isUnknown()) {
|
||||
throw new DisguiseParseException(ChatColor.RED + "Error! You cannot disguise as " + ChatColor.GREEN + "Unknown!");
|
||||
}
|
||||
if (disguiseType.getEntityType() == null) {
|
||||
throw new DisguiseParseException(ChatColor.RED + "Error! This version of minecraft does not have that disguise!");
|
||||
}
|
||||
|
@@ -970,6 +970,7 @@ public class DisguiseUtilities {
|
||||
|
||||
/**
|
||||
* Setup it so he can see himself when disguised
|
||||
* @param disguise
|
||||
*/
|
||||
public static void setupFakeDisguise(final Disguise disguise) {
|
||||
Entity e = disguise.getEntity();
|
||||
|
@@ -52,6 +52,7 @@ public class DisguiseValues {
|
||||
private HashMap<Integer, Object> metaValues = new HashMap<>();
|
||||
private Class nmsEntityClass;
|
||||
|
||||
@SuppressWarnings("LeakingThisInConstructor")
|
||||
public DisguiseValues(DisguiseType type, Class classType, int entitySize, double maxHealth) {
|
||||
values.put(type, this);
|
||||
enumEntitySize = entitySize;
|
||||
|
Reference in New Issue
Block a user