Tutorial by Examples

Entity entity; //The entity you want to teleport Entity teleportTo; //The entity where you want <entity> to be teleported to boolean success = entity.teleport(teleportTo); //Attempting to teleport. if(success) { //Teleport was successful }else { //Teleport wasn't successful } ...
Entity toBeTeleported; //The entity you want to teleport Location teleportTo = new Location(world,x,y,z,yaw,pitch); //The location to teleport to boolean success = toBeTeleported.teleport(teleportTo); if(success) { //Teleport was successful }else { //Teleport wasn't success...
The EntityType enum represents all the entities from Bukkit/Spigot. All its values can be found below. ValueDescriptionAREA_EFFECT_CLOUDN/AARMOR_STANDMechanical entity with an inventory for placing weapons / armor into.ARROWAn arrow projectile; may get stuck in the ground.BATN/ABLAZEN/ABOATA place...
Entities can have passengers. A good example of a passenger is a Player riding a saddled pig, or a zombie inside a minecart. Although there are specific vehicles, any entity can be a vehicle for any other entity with the SetPassenger method. Entity vehicle; Entity passenger; boolean result = veh...
To retrieve a list of nearby entities of an entity, one can use List<Entity> nearby = entity.getNearbyEntities(double x, double y, double z); Bukkit will then calculate a bounding box centered around entity, having as parameters: x: 1/2 the size of the box along x axis y: 1/2 the size ...

Page 1 of 1