Get Entity From EntityType

Discussion in 'Plugin Development' started by ericejs123, Dec 3, 2018.

  1. Offline


    Is there any way to get an Entity object from an EntityType? Example, if I have EntityType.ZOMBIE, how can I convert that into an Entity object to spawn into the world?
  2. Offline


    I believe the syntax is
    world.spawnEntity(location, entityType);
    This returns an instance of the spawned mob class which inherits from the class entity
    But if you only want to spawn the entity you just have to use the line from above

Share This Page