iDisguis plugin usage

Discussion in 'Spigot Plugin Development' started by kadesa, Apr 16, 2017.

  1. 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.
     
  2. BUMP!

    Any help would be appreciated.
     
  3. 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!
     
  4. 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();
            }
     
  5. 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()));
    }