Getting CreatureType from CreatureSpawnEvent

Discussion in 'Plugin Development' started by oliverw92, Mar 6, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    oliverw92

    Hey guys,

    Looking in the javadocs, i see there is the 'getMobType()' function in the CreatureSpawnEvent that returns a MobType. However i thought MobType was deprecated and CreatureType is supposed to be used instead? Just wondering if this is someone missed out when changing over?

    Oli
     
  2. Offline

    Gandalf

    Yes you are correct, use CreatureType, the Javadoc is wrong. The Mob type itself has been deprecated.
     
  3. Offline

    oliverw92

    I'm confused though, because if i load the latest crafbukkit jar into eclipse as a referenced lib and then use
    CreatureType cType = event.getMobType();
    eclipse highlights it and tells me that it can't convert from MobType to CreatureType. Then if i do what it says to fix it (change CreatureType to MobType as the variable type), it then tells me that MobType is deprecated and to use something else. Should i just ignore eclipse?
     
  4. Offline

    Gandalf

    event.getCreatureType();

    I don't have eclipse open, but try that. I am guessing Javadoc's haven't been properly updated.
     
Thread Status:
Not open for further replies.

Share This Page