How would i set a Var as a certain mob disguise. here is what i am trying to do but i cant figure it out, i imagine it to be something like this. Code (Text): private Disguise disguiseType = null; public void getDisguiseType() { if (instance.getConfigManager().disguiseAs.equalsIgnoreCase("Enderman")) { disguiseType = api.disguise(player, ED); } ... but i cant find anything to do with mob type.
https://github.com/robingrether/iDi...ther/idisguise/disguise/EndermanDisguise.java This class is one of many, and extends the "MobDisguise" class. Therefore, you can store it as a variable type MobDisguise, something like this: Code (Text): MobDisguise enderDisguise = <insert initialization of variable here>
You add the idisguise jar to your build path as an external jar. You are then able to import objects such as the MobDisguise class. Presto!
ya, ok i may have sounded like a dumb [email protected]# and im sorry, i have everything in my build path, i think i figured it out. how does this look? Code (Text): private Disguise disguiseType = null; public Disguise getDisguiseType() { if (instance.getConfigManager().disguiseAs.equalsIgnoreCase("Enderman")) { disguiseType = DisguiseType.ENDERMAN.newInstance(); }
iDisguise is pretty easy on the API front (thankfully!) If you want a specific Disguise, just use the extended MobDisguise. Code (Text): public Disguise getDisguise(EntityType disguise) { return new MobDisguise(DisguiseType.valueOf(disguise.toString())); }