Solved Dragon Respawn

Discussion in 'Plugin Development' started by thomas12000, Jun 6, 2016.

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

    thomas12000

    Hello i wanna know if someone can help me with the plugin i wanna spawn the ender dragon on the previous ender dragon location :)
    Code:
        @EventHandler
        public void onEnderDragonDeath(EntityDeathEvent event){
            if(event.getEntity() instanceof EnderDragon){
                event.getEntity().getWorld().spawn(EntityType.ENDER_DRAGON, location);
            }
        }
    
    Here i my code ... help please ;) Thanks
     
    Last edited: Jun 6, 2016
  2. Offline

    Xerox262

    @thomas12000 Check if the the entity that died was actually the dragon.
     
  3. Offline

    thomas12000

    check again :) ... i wanna get the location of the died dragon somehow ...
     
  4. Offline

    Xerox262

    @thomas12000 get the entity from the event, then get the location from the entity

    Entity#getLocation();
     
    bennie3211 likes this.
Thread Status:
Not open for further replies.

Share This Page