Summoning mobs on schedual

Discussion in 'Plugin Development' started by JKLM35, Nov 17, 2017.

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


    I am trying to use a scheduler to summon a custom mob into the world at a hard coded co-ordinate. The problem is I cannot locate the overworld world in order to spawn the mob. This is what I've tried previously:

    Location loc = new Location(Bukkit.getServer().getWorld("world"),0,0,0);
    EntityZombie zom = new EntityZombie((World) Bukkit.getServer().getWorld("world"));
    zom.setLocation(0, 0, 0, 0, 0);
    World w = (World) Bukkit.getServer().getWorld("world");

    Any suggestions?
  2. Offline


    Zombie zombie = world.spawn(new Location(world, 0D, 0D, 0D), Zombie.class);
    Last edited: Nov 20, 2017
  3. Offline


    umm, u set it to a world, not where in the world, so that wouldent work. Also, do a entity
    no entitiy zombie, that wont work
  4. Offline


    Didnt you take a look on which type of arguments setLocation takes? definetely not 5 ints
  5. Offline


    @JustRendering please tag people you answer to with @name. I didn't noticed that you answered. You can change the coordinates. Please clearly say what you want.
    Last edited: Nov 20, 2017
  6. Offline


    do you want a timer? and then spawn?

    use a bukkit runnable after a command or on an event?
Thread Status:
Not open for further replies.

Share This Page