Change getCustomDisguise in DisguiseAPI to getRawCustomDisguise, add getCustomDisguise to DisguiseAPI which returns Disguise
This commit is contained in:
		| @@ -26,7 +26,7 @@ import java.util.Map; | ||||
| public class DisguiseAPI { | ||||
|     private static int selfDisguiseId = ReflectionManager.getNewEntityId(true); | ||||
|  | ||||
|     public static String getCustomDisguise(String disguiseName) { | ||||
|     public static String getRawCustomDisguise(String disguiseName) { | ||||
|         Map.Entry<DisguisePerm, String> entry = DisguiseConfig.getRawCustomDisguise(disguiseName); | ||||
|  | ||||
|         if (entry == null) | ||||
| @@ -35,6 +35,16 @@ public class DisguiseAPI { | ||||
|         return entry.getValue(); | ||||
|     } | ||||
|  | ||||
|     public static Disguise getCustomDisguise(String disguiseName) { | ||||
|         Map.Entry<DisguisePerm, Disguise> disguise = DisguiseConfig.getCustomDisguise(disguiseName); | ||||
|  | ||||
|         if (disguise == null) { | ||||
|             return null; | ||||
|         } | ||||
|  | ||||
|         return disguise.getValue(); | ||||
|     } | ||||
|  | ||||
|     public static Disguise constructDisguise(Entity entity) { | ||||
|         return constructDisguise(entity, true, true, true); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user