EntityType.fromId() deprecated?

Discussion in 'Plugin Development' started by Quantum64, Nov 15, 2013.

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

    Quantum64

    Why is the method fromId(int) from the type EntityType is deprecated? It is a crucial part to my plugin. Will it be removed any time soon, and if so will there be a suitable replacement for it?
     
  2. Offline

    RealDope

    Bukkit's shifting away from using id's for things, including items and entities. Just use the EntityType enums.
     
  3. Offline

    Quantum64

    The way I have it set up is the user sets a mob id in the config file, so am I going to have to have them set a string and then have a super mega awful switch statement to cycle through all the entities?
     
  4. Offline

    Darq

    No, EntityType has a method (valueOf(String)) that lets you retrieve an EntityType using its name :)
     
  5. Offline

    Quantum64

    OK thanks!
     
    Darq likes this.
Thread Status:
Not open for further replies.

Share This Page