Pulling all pending Bukkit-JavaDoc changes
A special thanks goes to @aerouk for almost all of the changes found here. By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
@@ -19,7 +19,8 @@ public interface Ageable extends Creature {
|
||||
public void setAge(int age);
|
||||
|
||||
/**
|
||||
* Lock the age of the animal, setting this will prevent the animal from maturing or getting ready for mating.
|
||||
* Lock the age of the animal, setting this will prevent the animal from
|
||||
* maturing or getting ready for mating.
|
||||
*
|
||||
* @param lock new lock
|
||||
*/
|
||||
@@ -57,7 +58,8 @@ public interface Ageable extends Creature {
|
||||
public boolean canBreed();
|
||||
|
||||
/**
|
||||
* Set breedability of the animal, if the animal is a baby and set to breed it will instantly grow up.
|
||||
* Set breedability of the animal, if the animal is a baby and set to
|
||||
* breed it will instantly grow up.
|
||||
*
|
||||
* @param breed breedability of the animal
|
||||
*/
|
||||
|
||||
@@ -6,7 +6,8 @@ package org.bukkit.entity;
|
||||
public interface Boat extends Vehicle {
|
||||
|
||||
/**
|
||||
* Gets the maximum speed of a boat. The speed is unrelated to the velocity.
|
||||
* Gets the maximum speed of a boat. The speed is unrelated to the
|
||||
* velocity.
|
||||
*
|
||||
* @return The max speed.
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,8 @@ package org.bukkit.entity;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* Represents a complex living entity - one that is made up of various smaller parts
|
||||
* Represents a complex living entity - one that is made up of various smaller
|
||||
* parts
|
||||
*/
|
||||
public interface ComplexLivingEntity extends LivingEntity {
|
||||
/**
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a Creature. Creatures are non-intelligent monsters or animals which
|
||||
* have very simple abilities.
|
||||
* Represents a Creature. Creatures are non-intelligent monsters or animals
|
||||
* which have very simple abilities.
|
||||
*/
|
||||
public interface Creature extends LivingEntity {
|
||||
|
||||
/**
|
||||
* Instructs this Creature to set the specified LivingEntity as its target.
|
||||
* Instructs this Creature to set the specified LivingEntity as its
|
||||
* target.
|
||||
* <p>
|
||||
* Hostile creatures may attack their target, and friendly creatures may
|
||||
* follow their target.
|
||||
*
|
||||
|
||||
@@ -20,7 +20,8 @@ public interface Damageable extends Entity {
|
||||
void _INVALID_damage(int amount);
|
||||
|
||||
/**
|
||||
* Deals the given amount of damage to this entity, from a specified entity.
|
||||
* Deals the given amount of damage to this entity, from a specified
|
||||
* entity.
|
||||
*
|
||||
* @param amount Amount of damage to deal
|
||||
* @param source Entity which to attribute this damage from
|
||||
@@ -51,10 +52,12 @@ public interface Damageable extends Entity {
|
||||
int _INVALID_getHealth();
|
||||
|
||||
/**
|
||||
* Sets the entity's health from 0 to {@link #getMaxHealth()}, where 0 is dead.
|
||||
* Sets the entity's health from 0 to {@link #getMaxHealth()}, where 0 is
|
||||
* dead.
|
||||
*
|
||||
* @param health New health represented from 0 to max
|
||||
* @throws IllegalArgumentException Thrown if the health is < 0 or > {@link #getMaxHealth()}
|
||||
* @throws IllegalArgumentException Thrown if the health is < 0 or >
|
||||
* {@link #getMaxHealth()}
|
||||
*/
|
||||
void setHealth(double health);
|
||||
|
||||
@@ -84,9 +87,11 @@ public interface Damageable extends Entity {
|
||||
/**
|
||||
* Sets the maximum health this entity can have.
|
||||
* <p>
|
||||
* If the health of the entity is above the value provided it will be set to that value.
|
||||
* If the health of the entity is above the value provided it will be set
|
||||
* to that value.
|
||||
* <p>
|
||||
* Note: An entity with a health bar ({@link Player}, {@link EnderDragon}, {@link Wither}, etc...} will have their bar scaled accordingly.
|
||||
* Note: An entity with a health bar ({@link Player}, {@link EnderDragon},
|
||||
* {@link Wither}, etc...} will have their bar scaled accordingly.
|
||||
*
|
||||
* @param health amount of health to set the maximum to
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents an Ender Signal, which is often created upon throwing an ender eye
|
||||
* Represents an Ender Signal, which is often created upon throwing an ender
|
||||
* eye
|
||||
*/
|
||||
public interface EnderSignal extends Entity {
|
||||
|
||||
|
||||
@@ -25,8 +25,10 @@ public interface Entity extends Metadatable {
|
||||
public Location getLocation();
|
||||
|
||||
/**
|
||||
* Stores the entity's current position in the provided Location object.<br />
|
||||
* If the provided Location is null this method does nothing and returns null.
|
||||
* Stores the entity's current position in the provided Location object.
|
||||
* <p>
|
||||
* If the provided Location is null this method does nothing and returns
|
||||
* null.
|
||||
*
|
||||
* @return The Location object provided or null
|
||||
*/
|
||||
@@ -47,8 +49,9 @@ public interface Entity extends Metadatable {
|
||||
public Vector getVelocity();
|
||||
|
||||
/**
|
||||
* Returns true if the entity is supported by a block. This value is a state
|
||||
* updated by the server and is not recalculated unless the entity moves.
|
||||
* Returns true if the entity is supported by a block. This value is a
|
||||
* state updated by the server and is not recalculated unless the entity
|
||||
* moves.
|
||||
*
|
||||
* @return True if entity is on ground.
|
||||
*/
|
||||
@@ -96,7 +99,8 @@ public interface Entity extends Metadatable {
|
||||
public boolean teleport(Entity destination, TeleportCause cause);
|
||||
|
||||
/**
|
||||
* Returns a list of entities within a bounding box centered around this entity
|
||||
* Returns a list of entities within a bounding box centered around this
|
||||
* entity
|
||||
*
|
||||
* @param x 1/2 the size of the box along x axis
|
||||
* @param y 1/2 the size of the box along y axis
|
||||
@@ -113,7 +117,8 @@ public interface Entity extends Metadatable {
|
||||
public int getEntityId();
|
||||
|
||||
/**
|
||||
* Returns the entity's current fire ticks (ticks before the entity stops being on fire).
|
||||
* Returns the entity's current fire ticks (ticks before the entity stops
|
||||
* being on fire).
|
||||
*
|
||||
* @return int fireTicks
|
||||
*/
|
||||
@@ -127,7 +132,8 @@ public interface Entity extends Metadatable {
|
||||
public int getMaxFireTicks();
|
||||
|
||||
/**
|
||||
* Sets the entity's current fire ticks (ticks before the entity stops being on fire).
|
||||
* Sets the entity's current fire ticks (ticks before the entity stops
|
||||
* being on fire).
|
||||
*
|
||||
* @param ticks Current ticks remaining
|
||||
*/
|
||||
@@ -148,6 +154,7 @@ public interface Entity extends Metadatable {
|
||||
/**
|
||||
* Returns false if the entity has died or been despawned for some other
|
||||
* reason.
|
||||
*
|
||||
* @return True if valid.
|
||||
*/
|
||||
public boolean isValid();
|
||||
@@ -211,9 +218,11 @@ public interface Entity extends Metadatable {
|
||||
public void setLastDamageCause(EntityDamageEvent event);
|
||||
|
||||
/**
|
||||
* Retrieve the last {@link EntityDamageEvent} inflicted on this entity. This event may have been cancelled.
|
||||
* Retrieve the last {@link EntityDamageEvent} inflicted on this entity.
|
||||
* This event may have been cancelled.
|
||||
*
|
||||
* @return the last known {@link EntityDamageEvent} or null if hitherto unharmed
|
||||
* @return the last known {@link EntityDamageEvent} or null if hitherto
|
||||
* unharmed
|
||||
*/
|
||||
public EntityDamageEvent getLastDamageCause();
|
||||
|
||||
@@ -236,7 +245,8 @@ public interface Entity extends Metadatable {
|
||||
/**
|
||||
* Sets the amount of ticks this entity has lived for.
|
||||
* <p>
|
||||
* This is the equivalent to "age" in entities. May not be less than one tick.
|
||||
* This is the equivalent to "age" in entities. May not be less than one
|
||||
* tick.
|
||||
*
|
||||
* @param value Age of entity
|
||||
*/
|
||||
@@ -253,6 +263,7 @@ public interface Entity extends Metadatable {
|
||||
|
||||
/**
|
||||
* Get the type of the entity.
|
||||
*
|
||||
* @return The entity type.
|
||||
*/
|
||||
public EntityType getType();
|
||||
@@ -265,9 +276,9 @@ public interface Entity extends Metadatable {
|
||||
public boolean isInsideVehicle();
|
||||
|
||||
/**
|
||||
* Leave the current vehicle. If the entity is currently in a vehicle
|
||||
* (and is removed from it), true will be returned, otherwise false will
|
||||
* be returned.
|
||||
* Leave the current vehicle. If the entity is currently in a vehicle (and
|
||||
* is removed from it), true will be returned, otherwise false will be
|
||||
* returned.
|
||||
*
|
||||
* @return True if the entity was in a vehicle.
|
||||
*/
|
||||
|
||||
@@ -20,8 +20,8 @@ public enum EntityType {
|
||||
/**
|
||||
* An item resting on the ground.
|
||||
* <p>
|
||||
* Spawn with {@link World#dropItem(Location, ItemStack)}
|
||||
* or {@link World#dropItemNaturally(Location, ItemStack)}
|
||||
* Spawn with {@link World#dropItem(Location, ItemStack)} or {@link
|
||||
* World#dropItemNaturally(Location, ItemStack)}
|
||||
*/
|
||||
DROPPED_ITEM("Item", Item.class, 1, false),
|
||||
/**
|
||||
@@ -158,7 +158,7 @@ public enum EntityType {
|
||||
FISHING_HOOK(null, Fish.class, -1, false),
|
||||
/**
|
||||
* A bolt of lightning.
|
||||
*
|
||||
* <p>
|
||||
* Spawn with {@link World#strikeLightning(Location)}.
|
||||
*/
|
||||
LIGHTNING(null, LightningStrike.class, -1, false),
|
||||
@@ -250,9 +250,10 @@ public enum EntityType {
|
||||
}
|
||||
|
||||
/**
|
||||
* Some entities cannot be spawned using {@link World#spawnEntity(Location, EntityType)}
|
||||
* or {@link World#spawn(Location, Class)}, usually
|
||||
* because they require additional information in order to spawn.
|
||||
* Some entities cannot be spawned using {@link
|
||||
* World#spawnEntity(Location, EntityType)} or {@link
|
||||
* World#spawn(Location, Class)}, usually because they require additional
|
||||
* information in order to spawn.
|
||||
*
|
||||
* @return False if the entity type cannot be spawned
|
||||
*/
|
||||
|
||||
@@ -10,8 +10,7 @@ public interface Fireball extends Projectile, Explosive {
|
||||
/**
|
||||
* Fireballs fly straight and do not take setVelocity(...) well.
|
||||
*
|
||||
* @param direction
|
||||
* the direction this fireball is flying toward
|
||||
* @param direction the direction this fireball is flying toward
|
||||
*/
|
||||
public void setDirection(Vector direction);
|
||||
|
||||
|
||||
@@ -22,7 +22,8 @@ public interface Fish extends Projectile {
|
||||
* 1.0 = Instant catch.
|
||||
*
|
||||
* @param chance the bite chance
|
||||
* @throws IllegalArgumentException if the bite chance is not between 0 and 1
|
||||
* @throws IllegalArgumentException if the bite chance is not between 0
|
||||
* and 1
|
||||
*/
|
||||
public void setBiteChance(double chance) throws IllegalArgumentException;
|
||||
}
|
||||
|
||||
@@ -9,12 +9,14 @@ import org.bukkit.material.Attachable;
|
||||
public interface Hanging extends Entity, Attachable {
|
||||
|
||||
/**
|
||||
* Sets the direction of the hanging entity, potentially overriding rules of placement. Note that if the result
|
||||
* is not valid the object would normally drop as an item.
|
||||
* Sets the direction of the hanging entity, potentially overriding rules
|
||||
* of placement. Note that if the result is not valid the object would
|
||||
* normally drop as an item.
|
||||
*
|
||||
* @param face The new direction.
|
||||
* @param force Whether to force it.
|
||||
* @return False if force was false and there was no block for it to attach to in order to face the given direction.
|
||||
* @return False if force was false and there was no block for it to
|
||||
* attach to in order to face the given direction.
|
||||
*/
|
||||
public boolean setFacingDirection(BlockFace face, boolean force);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,8 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv
|
||||
/**
|
||||
* Get the player's inventory.
|
||||
*
|
||||
* @return The inventory of the player, this also contains the armor slots.
|
||||
* @return The inventory of the player, this also contains the armor
|
||||
* slots.
|
||||
*/
|
||||
public PlayerInventory getInventory();
|
||||
|
||||
@@ -36,8 +37,8 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv
|
||||
public Inventory getEnderChest();
|
||||
|
||||
/**
|
||||
* If the player currently has an inventory window open, this method will set a
|
||||
* property of that window, such as the state of a progress bar.
|
||||
* If the player currently has an inventory window open, this method will
|
||||
* set a property of that window, such as the state of a progress bar.
|
||||
*
|
||||
* @param prop The property.
|
||||
* @param value The value to set the property to.
|
||||
@@ -46,16 +47,16 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv
|
||||
public boolean setWindowProperty(InventoryView.Property prop, int value);
|
||||
|
||||
/**
|
||||
* Gets the inventory view the player is currently viewing. If they do not have
|
||||
* an inventory window open, it returns their internal crafting view.
|
||||
* Gets the inventory view the player is currently viewing. If they do not
|
||||
* have an inventory window open, it returns their internal crafting view.
|
||||
*
|
||||
* @return The inventory view.
|
||||
*/
|
||||
public InventoryView getOpenInventory();
|
||||
|
||||
/**
|
||||
* Opens an inventory window with the specified inventory on the top and the player's inventory
|
||||
* on the bottom.
|
||||
* Opens an inventory window with the specified inventory on the top and
|
||||
* the player's inventory on the bottom.
|
||||
*
|
||||
* @param inventory The inventory to open
|
||||
* @return The newly opened inventory view
|
||||
@@ -63,22 +64,28 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv
|
||||
public InventoryView openInventory(Inventory inventory);
|
||||
|
||||
/**
|
||||
* Opens an empty workbench inventory window with the player's inventory on the bottom.
|
||||
* Opens an empty workbench inventory window with the player's inventory
|
||||
* on the bottom.
|
||||
*
|
||||
* @param location The location to attach it to. If null, the player's location is used.
|
||||
* @param force If false, and there is no workbench block at the location, no inventory will be
|
||||
* opened and null will be returned.
|
||||
* @return The newly opened inventory view, or null if it could not be opened.
|
||||
* @param location The location to attach it to. If null, the player's
|
||||
* location is used.
|
||||
* @param force If false, and there is no workbench block at the location,
|
||||
* no inventory will be opened and null will be returned.
|
||||
* @return The newly opened inventory view, or null if it could not be
|
||||
* opened.
|
||||
*/
|
||||
public InventoryView openWorkbench(Location location, boolean force);
|
||||
|
||||
/**
|
||||
* Opens an empty enchanting inventory window with the player's inventory on the bottom.
|
||||
* Opens an empty enchanting inventory window with the player's inventory
|
||||
* on the bottom.
|
||||
*
|
||||
* @param location The location to attach it to. If null, the player's location is used.
|
||||
* @param force If false, and there is no enchanting table at the location, no inventory will be
|
||||
* opened and null will be returned.
|
||||
* @return The newly opened inventory view, or null if it could not be opened.
|
||||
* @param location The location to attach it to. If null, the player's
|
||||
* location is used.
|
||||
* @param force If false, and there is no enchanting table at the
|
||||
* location, no inventory will be opened and null will be returned.
|
||||
* @return The newly opened inventory view, or null if it could not be
|
||||
* opened.
|
||||
*/
|
||||
public InventoryView openEnchanting(Location location, boolean force);
|
||||
|
||||
@@ -110,8 +117,8 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv
|
||||
public void setItemInHand(ItemStack item);
|
||||
|
||||
/**
|
||||
* Returns the ItemStack currently on your cursor, can be empty.
|
||||
* Will always be empty if the player currently has no open window.
|
||||
* Returns the ItemStack currently on your cursor, can be empty. Will
|
||||
* always be empty if the player currently has no open window.
|
||||
*
|
||||
* @return The ItemStack of the item you are currently moving around.
|
||||
*/
|
||||
@@ -119,7 +126,8 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, Permissible, Inv
|
||||
|
||||
/**
|
||||
* Sets the item to the given ItemStack, this will replace whatever the
|
||||
* user was moving. Will always be empty if the player currently has no open window.
|
||||
* user was moving. Will always be empty if the player currently has no
|
||||
* open window.
|
||||
*
|
||||
* @param item The ItemStack which will end up in the hand
|
||||
*/
|
||||
|
||||
@@ -15,9 +15,8 @@ public interface IronGolem extends Golem {
|
||||
/**
|
||||
* Sets whether this iron golem was built by a player or not.
|
||||
*
|
||||
* @param playerCreated
|
||||
* true if you want to set the iron golem as being player created,
|
||||
* false if you want it to be a natural village golem.
|
||||
* @param playerCreated true if you want to set the iron golem as being
|
||||
* player created, false if you want it to be a natural village golem.
|
||||
*/
|
||||
public void setPlayerCreated(boolean playerCreated);
|
||||
}
|
||||
|
||||
@@ -25,15 +25,14 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
/**
|
||||
* Gets the height of the living entity's eyes above its Location.
|
||||
*
|
||||
* @param ignoreSneaking if set to true, the effects of sneaking
|
||||
* will be ignored
|
||||
* @param ignoreSneaking if set to true, the effects of sneaking will be
|
||||
* ignored
|
||||
* @return height of the living entity's eyes above its location
|
||||
*/
|
||||
public double getEyeHeight(boolean ignoreSneaking);
|
||||
|
||||
/**
|
||||
* Get a Location detailing the current eye position of the living
|
||||
* entity.
|
||||
* Get a Location detailing the current eye position of the living entity.
|
||||
*
|
||||
* @return a location at the eyes of the living entity
|
||||
*/
|
||||
@@ -42,15 +41,15 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
/**
|
||||
* Gets all blocks along the living entity's line of sight.
|
||||
* <p>
|
||||
* This list contains all blocks from the living entity's eye position
|
||||
* to target inclusive.
|
||||
* This list contains all blocks from the living entity's eye position to
|
||||
* target inclusive.
|
||||
*
|
||||
* @param transparent HashSet containing all transparent block IDs
|
||||
* (set to null for only air)
|
||||
* @param maxDistance this is the maximum distance to scan (may be
|
||||
* limited by server by at least 100 blocks, no less)
|
||||
* @return list containing all blocks along the living entity's line
|
||||
* of sight
|
||||
* @param transparent HashSet containing all transparent block IDs (set to
|
||||
* null for only air)
|
||||
* @param maxDistance this is the maximum distance to scan (may be limited
|
||||
* by server by at least 100 blocks, no less)
|
||||
* @return list containing all blocks along the living entity's line of
|
||||
* sight
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@Deprecated
|
||||
@@ -59,10 +58,10 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
/**
|
||||
* Gets the block that the living entity has targeted.
|
||||
*
|
||||
* @param transparent HashSet containing all transparent block IDs
|
||||
* (set to null for only air)
|
||||
* @param maxDistance this is the maximum distance to scan
|
||||
* (may be limited by server by at least 100 blocks, no less)
|
||||
* @param transparent HashSet containing all transparent block IDs (set to
|
||||
* null for only air)
|
||||
* @param maxDistance this is the maximum distance to scan (may be limited
|
||||
* by server by at least 100 blocks, no less)
|
||||
* @return block that the living entity has targeted
|
||||
* @deprecated Magic value
|
||||
*/
|
||||
@@ -74,8 +73,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
* <p>
|
||||
* The target block will be the last block in the list.
|
||||
*
|
||||
* @param transparent HashSet containing all transparent block IDs
|
||||
* (set to null for only air)
|
||||
* @param transparent HashSet containing all transparent block IDs (set to
|
||||
* null for only air)
|
||||
* @param maxDistance this is the maximum distance to scan. This may be
|
||||
* further limited by the server, but never to less than 100 blocks
|
||||
* @return list containing the last 2 blocks along the living entity's
|
||||
@@ -129,16 +128,14 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
public int getRemainingAir();
|
||||
|
||||
/**
|
||||
* Sets the amount of air that the living entity has remaining, in
|
||||
* ticks.
|
||||
* Sets the amount of air that the living entity has remaining, in ticks.
|
||||
*
|
||||
* @param ticks amount of air remaining
|
||||
*/
|
||||
public void setRemainingAir(int ticks);
|
||||
|
||||
/**
|
||||
* Returns the maximum amount of air the living entity can
|
||||
* have, in ticks.
|
||||
* Returns the maximum amount of air the living entity can have, in ticks.
|
||||
*
|
||||
* @return maximum amount of air
|
||||
*/
|
||||
@@ -154,8 +151,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
/**
|
||||
* Returns the living entity's current maximum no damage ticks.
|
||||
* <p>
|
||||
* This is the maximum duration in which the living entity will not
|
||||
* take damage.
|
||||
* This is the maximum duration in which the living entity will not take
|
||||
* damage.
|
||||
*
|
||||
* @return maximum no damage ticks
|
||||
*/
|
||||
@@ -169,8 +166,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
public void setMaximumNoDamageTicks(int ticks);
|
||||
|
||||
/**
|
||||
* Returns the living entity's last damage taken in the current no
|
||||
* damage ticks time.
|
||||
* Returns the living entity's last damage taken in the current no damage
|
||||
* ticks time.
|
||||
* <p>
|
||||
* Only damage higher than this amount will further damage the living
|
||||
* entity.
|
||||
@@ -228,8 +225,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
/**
|
||||
* Adds the given {@link PotionEffect} to the living entity.
|
||||
* <p>
|
||||
* Only one potion effect can be present for a given
|
||||
* {@link PotionEffectType}.
|
||||
* Only one potion effect can be present for a given {@link
|
||||
* PotionEffectType}.
|
||||
*
|
||||
* @param effect PotionEffect to be added
|
||||
* @return whether the effect could be added
|
||||
@@ -239,8 +236,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
/**
|
||||
* Adds the given {@link PotionEffect} to the living entity.
|
||||
* <p>
|
||||
* Only one potion effect can be present for a given
|
||||
* {@link PotionEffectType}.
|
||||
* Only one potion effect can be present for a given {@link
|
||||
* PotionEffectType}.
|
||||
*
|
||||
* @param effect PotionEffect to be added
|
||||
* @param force whether conflicting effects should be removed
|
||||
@@ -262,8 +259,7 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
* the given {@link PotionEffectType} applied to it.
|
||||
*
|
||||
* @param type the potion type to check
|
||||
* @return whether the living entity has this potion effect active
|
||||
* on them
|
||||
* @return whether the living entity has this potion effect active on them
|
||||
*/
|
||||
public boolean hasPotionEffect(PotionEffectType type);
|
||||
|
||||
@@ -275,8 +271,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
public void removePotionEffect(PotionEffectType type);
|
||||
|
||||
/**
|
||||
* Returns all currently active {@link PotionEffect}s on the
|
||||
* living entity.
|
||||
* Returns all currently active {@link PotionEffect}s on the living
|
||||
* entity.
|
||||
*
|
||||
* @return a collection of {@link PotionEffect}s
|
||||
*/
|
||||
@@ -285,8 +281,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
/**
|
||||
* Checks whether the living entity has block line of sight to another.
|
||||
* <p>
|
||||
* This uses the same algorithm that hostile mobs use to find the
|
||||
* closest player.
|
||||
* This uses the same algorithm that hostile mobs use to find the closest
|
||||
* player.
|
||||
*
|
||||
* @param other the entity to determine line of sight to
|
||||
* @return true if there is a line of sight, false if not
|
||||
@@ -303,8 +299,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
public boolean getRemoveWhenFarAway();
|
||||
|
||||
/**
|
||||
* Sets whether or not the living entity despawns when away from
|
||||
* players or not.
|
||||
* Sets whether or not the living entity despawns when away from players
|
||||
* or not.
|
||||
*
|
||||
* @param remove the removal status
|
||||
*/
|
||||
@@ -332,8 +328,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
public boolean getCanPickupItems();
|
||||
|
||||
/**
|
||||
* Sets a custom name on a mob. This name will be used in death
|
||||
* messages and can be sent to the client as a nameplate over the mob.
|
||||
* Sets a custom name on a mob. This name will be used in death messages
|
||||
* and can be sent to the client as a nameplate over the mob.
|
||||
* <p>
|
||||
* Setting the name to null or an empty string will clear it.
|
||||
* <p>
|
||||
@@ -356,8 +352,8 @@ public interface LivingEntity extends Entity, Damageable {
|
||||
public String getCustomName();
|
||||
|
||||
/**
|
||||
* Sets whether or not to display the mob's custom name client side.
|
||||
* The name will be displayed above the mob similarly to a player.
|
||||
* Sets whether or not to display the mob's custom name client side. The
|
||||
* name will be displayed above the mob similarly to a player.
|
||||
* <p>
|
||||
* This value has no effect on players, they will always display their
|
||||
* name.
|
||||
|
||||
@@ -8,9 +8,9 @@ import org.bukkit.util.Vector;
|
||||
public interface Minecart extends Vehicle {
|
||||
|
||||
/**
|
||||
* This method exists for legacy reasons to provide backwards compatibility.
|
||||
* It will not exist at runtime and should not be used under any
|
||||
* circumstances.
|
||||
* This method exists for legacy reasons to provide backwards
|
||||
* compatibility. It will not exist at runtime and should not be used
|
||||
* under any circumstances.
|
||||
*/
|
||||
@Deprecated
|
||||
public void _INVALID_setDamage(int damage);
|
||||
@@ -23,9 +23,9 @@ public interface Minecart extends Vehicle {
|
||||
public void setDamage(double damage);
|
||||
|
||||
/**
|
||||
* This method exists for legacy reasons to provide backwards compatibility.
|
||||
* It will not exist at runtime and should not be used under any
|
||||
* circumstances.
|
||||
* This method exists for legacy reasons to provide backwards
|
||||
* compatibility. It will not exist at runtime and should not be used
|
||||
* under any circumstances.
|
||||
*/
|
||||
@Deprecated
|
||||
public int _INVALID_getDamage();
|
||||
@@ -38,51 +38,58 @@ public interface Minecart extends Vehicle {
|
||||
public double getDamage();
|
||||
|
||||
/**
|
||||
* Gets the maximum speed of a minecart. The speed is unrelated to the velocity.
|
||||
* Gets the maximum speed of a minecart. The speed is unrelated to the
|
||||
* velocity.
|
||||
*
|
||||
* @return The max speed
|
||||
*/
|
||||
public double getMaxSpeed();
|
||||
|
||||
/**
|
||||
* Sets the maximum speed of a minecart. Must be nonnegative. Default is 0.4D.
|
||||
* Sets the maximum speed of a minecart. Must be nonnegative. Default is
|
||||
* 0.4D.
|
||||
*
|
||||
* @param speed The max speed
|
||||
*/
|
||||
public void setMaxSpeed(double speed);
|
||||
|
||||
/**
|
||||
* Returns whether this minecart will slow down faster without a passenger occupying it
|
||||
* Returns whether this minecart will slow down faster without a passenger
|
||||
* occupying it
|
||||
*
|
||||
* @return Whether it decelerates faster
|
||||
*/
|
||||
public boolean isSlowWhenEmpty();
|
||||
|
||||
/**
|
||||
* Sets whether this minecart will slow down faster without a passenger occupying it
|
||||
* Sets whether this minecart will slow down faster without a passenger
|
||||
* occupying it
|
||||
*
|
||||
* @param slow Whether it will decelerate faster
|
||||
*/
|
||||
public void setSlowWhenEmpty(boolean slow);
|
||||
|
||||
/**
|
||||
* Gets the flying velocity modifier. Used for minecarts that are in mid-air.
|
||||
* A flying minecart's velocity is multiplied by this factor each tick.
|
||||
* Gets the flying velocity modifier. Used for minecarts that are in
|
||||
* mid-air. A flying minecart's velocity is multiplied by this factor each
|
||||
* tick.
|
||||
*
|
||||
* @return The vector factor
|
||||
*/
|
||||
public Vector getFlyingVelocityMod();
|
||||
|
||||
/**
|
||||
* Sets the flying velocity modifier. Used for minecarts that are in mid-air.
|
||||
* A flying minecart's velocity is multiplied by this factor each tick.
|
||||
* Sets the flying velocity modifier. Used for minecarts that are in
|
||||
* mid-air. A flying minecart's velocity is multiplied by this factor each
|
||||
* tick.
|
||||
*
|
||||
* @param flying velocity modifier vector
|
||||
*/
|
||||
public void setFlyingVelocityMod(Vector flying);
|
||||
|
||||
/**
|
||||
* Gets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.
|
||||
* Gets the derailed velocity modifier. Used for minecarts that are on the
|
||||
* ground, but not on rails.
|
||||
* <p>
|
||||
* A derailed minecart's velocity is multiplied by this factor each tick.
|
||||
*
|
||||
@@ -91,8 +98,9 @@ public interface Minecart extends Vehicle {
|
||||
public Vector getDerailedVelocityMod();
|
||||
|
||||
/**
|
||||
* Sets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.
|
||||
* A derailed minecart's velocity is multiplied by this factor each tick.
|
||||
* Sets the derailed velocity modifier. Used for minecarts that are on the
|
||||
* ground, but not on rails. A derailed minecart's velocity is multiplied
|
||||
* by this factor each tick.
|
||||
*
|
||||
* @param derailed visible speed
|
||||
*/
|
||||
|
||||
@@ -28,8 +28,8 @@ public interface Ocelot extends Animals, Tameable {
|
||||
public boolean isSitting();
|
||||
|
||||
/**
|
||||
* Sets if this ocelot is sitting
|
||||
* Will remove any path that the ocelot was following beforehand.
|
||||
* Sets if this ocelot is sitting. Will remove any path that the ocelot
|
||||
* was following beforehand.
|
||||
*
|
||||
* @param sitting true if sitting
|
||||
*/
|
||||
|
||||
@@ -19,7 +19,8 @@ public interface Painting extends Hanging {
|
||||
* Set the art on this painting
|
||||
*
|
||||
* @param art The new art
|
||||
* @return False if the new art won't fit at the painting's current location
|
||||
* @return False if the new art won't fit at the painting's current
|
||||
* location
|
||||
*/
|
||||
public boolean setArt(Art art);
|
||||
|
||||
@@ -27,10 +28,12 @@ public interface Painting extends Hanging {
|
||||
* Set the art on this painting
|
||||
*
|
||||
* @param art The new art
|
||||
* @param force If true, force the new art regardless of whether it fits at the current location
|
||||
* Note that forcing it where it can't fit normally causes it to drop as an item unless you override
|
||||
* this by catching the {@link PaintingBreakEvent}.
|
||||
* @return False if force was false and the new art won't fit at the painting's current location
|
||||
* @param force If true, force the new art regardless of whether it fits
|
||||
* at the current location. Note that forcing it where it can't fit
|
||||
* normally causes it to drop as an item unless you override this by
|
||||
* catching the {@link PaintingBreakEvent}.
|
||||
* @return False if force was false and the new art won't fit at the
|
||||
* painting's current location
|
||||
*/
|
||||
public boolean setArt(Art art, boolean force);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,8 @@ public interface PigZombie extends Zombie {
|
||||
/**
|
||||
* Set the pig zombie's current anger level.
|
||||
*
|
||||
* @param level The anger level. Higher levels of anger take longer to wear off.
|
||||
* @param level The anger level. Higher levels of anger take longer to
|
||||
* wear off.
|
||||
*/
|
||||
void setAnger(int level);
|
||||
|
||||
|
||||
@@ -25,20 +25,22 @@ import org.bukkit.scoreboard.Scoreboard;
|
||||
public interface Player extends HumanEntity, Conversable, CommandSender, OfflinePlayer, PluginMessageRecipient {
|
||||
|
||||
/**
|
||||
* Gets the "friendly" name to display of this player. This may include color.
|
||||
* Gets the "friendly" name to display of this player. This may include
|
||||
* color.
|
||||
* <p>
|
||||
* Note that this name will not be displayed in game, only in chat and places
|
||||
* defined by plugins
|
||||
* Note that this name will not be displayed in game, only in chat and
|
||||
* places defined by plugins.
|
||||
*
|
||||
* @return the friendly name
|
||||
*/
|
||||
public String getDisplayName();
|
||||
|
||||
/**
|
||||
* Sets the "friendly" name to display of this player. This may include color.
|
||||
* Sets the "friendly" name to display of this player. This may include
|
||||
* color.
|
||||
* <p>
|
||||
* Note that this name will not be displayed in game, only in chat and places
|
||||
* defined by plugins
|
||||
* Note that this name will not be displayed in game, only in chat and
|
||||
* places defined by plugins.
|
||||
*
|
||||
* @param name The new display name.
|
||||
*/
|
||||
@@ -54,20 +56,22 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
/**
|
||||
* Sets the name that is shown on the in-game player list.
|
||||
* <p>
|
||||
* The name cannot be longer than 16 characters, but {@link ChatColor} is supported.
|
||||
* The name cannot be longer than 16 characters, but {@link ChatColor} is
|
||||
* supported.
|
||||
* <p>
|
||||
* If the value is null, the name will be identical to {@link #getName()}.
|
||||
* <p>
|
||||
* This name is case sensitive and unique, two names with different casing will
|
||||
* appear as two different people. If a player joins afterwards with
|
||||
* a name that conflicts with a player's custom list name, the
|
||||
* joining player's player list name will have a random number appended to it
|
||||
* (1-2 characters long in the default implementation). If the joining
|
||||
* player's name is 15 or 16 characters long, part of the name will
|
||||
* be truncated at the end to allow the addition of the two digits.
|
||||
* This name is case sensitive and unique, two names with different casing
|
||||
* will appear as two different people. If a player joins afterwards with
|
||||
* a name that conflicts with a player's custom list name, the joining
|
||||
* player's player list name will have a random number appended to it (1-2
|
||||
* characters long in the default implementation). If the joining player's
|
||||
* name is 15 or 16 characters long, part of the name will be truncated at
|
||||
* the end to allow the addition of the two digits.
|
||||
*
|
||||
* @param name new player list name
|
||||
* @throws IllegalArgumentException if the name is already used by someone else
|
||||
* @throws IllegalArgumentException if the name is already used by someone
|
||||
* else
|
||||
* @throws IllegalArgumentException if the length of the name is too long
|
||||
*/
|
||||
public void setPlayerListName(String name);
|
||||
@@ -151,14 +155,19 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public void setSprinting(boolean sprinting);
|
||||
|
||||
/**
|
||||
* Saves the players current location, health, inventory, motion, and other information into the username.dat file, in the world/player folder
|
||||
* Saves the players current location, health, inventory, motion, and
|
||||
* other information into the username.dat file, in the world/player
|
||||
* folder
|
||||
*/
|
||||
public void saveData();
|
||||
|
||||
/**
|
||||
* Loads the players current location, health, inventory, motion, and other information from the username.dat file, in the world/player folder
|
||||
* Loads the players current location, health, inventory, motion, and
|
||||
* other information from the username.dat file, in the world/player
|
||||
* folder.
|
||||
* <p>
|
||||
* Note: This will overwrite the players current inventory, health, motion, etc, with the state from the saved dat file.
|
||||
* Note: This will overwrite the players current inventory, health,
|
||||
* motion, etc, with the state from the saved dat file.
|
||||
*/
|
||||
public void loadData();
|
||||
|
||||
@@ -253,8 +262,8 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public <T> void playEffect(Location loc, Effect effect, T data);
|
||||
|
||||
/**
|
||||
* Send a block change. This fakes a block change packet for a user at
|
||||
* a certain location. This will not actually change the world in any way.
|
||||
* Send a block change. This fakes a block change packet for a user at a
|
||||
* certain location. This will not actually change the world in any way.
|
||||
*
|
||||
* @param loc The location of the changed block
|
||||
* @param material The new block
|
||||
@@ -265,13 +274,13 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public void sendBlockChange(Location loc, Material material, byte data);
|
||||
|
||||
/**
|
||||
* Send a chunk change. This fakes a chunk change packet for a user at
|
||||
* a certain location. The updated cuboid must be entirely within a single
|
||||
* Send a chunk change. This fakes a chunk change packet for a user at a
|
||||
* certain location. The updated cuboid must be entirely within a single
|
||||
* chunk. This will not actually change the world in any way.
|
||||
* <p>
|
||||
* At least one of the dimensions of the cuboid must be even. The size of the
|
||||
* data buffer must be 2.5*sx*sy*sz and formatted in accordance with the Packet51
|
||||
* format.
|
||||
* At least one of the dimensions of the cuboid must be even. The size of
|
||||
* the data buffer must be 2.5*sx*sy*sz and formatted in accordance with
|
||||
* the Packet51 format.
|
||||
*
|
||||
* @param loc The location of the cuboid
|
||||
* @param sx The x size of the cuboid
|
||||
@@ -285,8 +294,8 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public boolean sendChunkChange(Location loc, int sx, int sy, int sz, byte[] data);
|
||||
|
||||
/**
|
||||
* Send a block change. This fakes a block change packet for a user at
|
||||
* a certain location. This will not actually change the world in any way.
|
||||
* Send a block change. This fakes a block change packet for a user at a
|
||||
* certain location. This will not actually change the world in any way.
|
||||
*
|
||||
* @param loc The location of the changed block
|
||||
* @param material The new block ID
|
||||
@@ -297,8 +306,8 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public void sendBlockChange(Location loc, int material, byte data);
|
||||
|
||||
/**
|
||||
* Render a map and send it to the player in its entirety. This may be used
|
||||
* when streaming the map in the normal manner is not desirable.
|
||||
* Render a map and send it to the player in its entirety. This may be
|
||||
* used when streaming the map in the normal manner is not desirable.
|
||||
*
|
||||
* @param map The map to be sent
|
||||
*/
|
||||
@@ -307,7 +316,8 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
/**
|
||||
* Forces an update of the player's entire inventory.
|
||||
*
|
||||
* @deprecated This method should not be relied upon as it is a temporary work-around for a larger, more complicated issue.
|
||||
* @deprecated This method should not be relied upon as it is a temporary
|
||||
* work-around for a larger, more complicated issue.
|
||||
*/
|
||||
@Deprecated
|
||||
public void updateInventory();
|
||||
@@ -352,14 +362,19 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public void incrementStatistic(Statistic statistic, Material material, int amount);
|
||||
|
||||
/**
|
||||
* Sets the current time on the player's client. When relative is true the player's time
|
||||
* will be kept synchronized to its world time with the specified offset.
|
||||
* Sets the current time on the player's client. When relative is true the
|
||||
* player's time will be kept synchronized to its world time with the
|
||||
* specified offset.
|
||||
* <p>
|
||||
* When using non relative time the player's time will stay fixed at the specified time parameter. It's up to
|
||||
* the caller to continue updating the player's time. To restore player time to normal use resetPlayerTime().
|
||||
* When using non relative time the player's time will stay fixed at the
|
||||
* specified time parameter. It's up to the caller to continue updating
|
||||
* the player's time. To restore player time to normal use
|
||||
* resetPlayerTime().
|
||||
*
|
||||
* @param time The current player's perceived time or the player's time offset from the server time.
|
||||
* @param relative When true the player time is kept relative to its world time.
|
||||
* @param time The current player's perceived time or the player's time
|
||||
* offset from the server time.
|
||||
* @param relative When true the player time is kept relative to its world
|
||||
* time.
|
||||
*/
|
||||
public void setPlayerTime(long time, boolean relative);
|
||||
|
||||
@@ -371,23 +386,26 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public long getPlayerTime();
|
||||
|
||||
/**
|
||||
* Returns the player's current time offset relative to server time, or the current player's fixed time
|
||||
* if the player's time is absolute.
|
||||
* Returns the player's current time offset relative to server time, or
|
||||
* the current player's fixed time if the player's time is absolute.
|
||||
*
|
||||
* @return The player's time
|
||||
*/
|
||||
public long getPlayerTimeOffset();
|
||||
|
||||
/**
|
||||
* Returns true if the player's time is relative to the server time, otherwise the player's time is absolute and
|
||||
* will not change its current time unless done so with setPlayerTime().
|
||||
* Returns true if the player's time is relative to the server time,
|
||||
* otherwise the player's time is absolute and will not change its current
|
||||
* time unless done so with setPlayerTime().
|
||||
*
|
||||
* @return true if the player's time is relative to the server time.
|
||||
*/
|
||||
public boolean isPlayerTimeRelative();
|
||||
|
||||
/**
|
||||
* Restores the normal condition where the player's time is synchronized with the server time.
|
||||
* Restores the normal condition where the player's time is synchronized
|
||||
* with the server time.
|
||||
* <p>
|
||||
* Equivalent to calling setPlayerTime(0, true).
|
||||
*/
|
||||
public void resetPlayerTime();
|
||||
@@ -405,7 +423,7 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
* Returns the type of weather the player is currently experiencing.
|
||||
*
|
||||
* @return The WeatherType that the player is currently experiencing or
|
||||
* null if player is seeing server weather.
|
||||
* null if player is seeing server weather.
|
||||
*/
|
||||
public WeatherType getPlayerWeather();
|
||||
|
||||
@@ -423,7 +441,8 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public void giveExp(int amount);
|
||||
|
||||
/**
|
||||
* Gives the player the amount of experience levels specified. Levels can be taken by specifying a negative amount.
|
||||
* Gives the player the amount of experience levels specified. Levels can
|
||||
* be taken by specifying a negative amount.
|
||||
*
|
||||
* @param amount amount of experience levels to give or take
|
||||
*/
|
||||
@@ -478,9 +497,9 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
/**
|
||||
* Gets the players current exhaustion level.
|
||||
* <p>
|
||||
* Exhaustion controls how fast the food level drops. While you have a certain
|
||||
* amount of exhaustion, your saturation will drop to zero, and then your food
|
||||
* will drop to zero.
|
||||
* Exhaustion controls how fast the food level drops. While you have a
|
||||
* certain amount of exhaustion, your saturation will drop to zero, and
|
||||
* then your food will drop to zero.
|
||||
*
|
||||
* @return Exhaustion level
|
||||
*/
|
||||
@@ -496,8 +515,8 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
/**
|
||||
* Gets the players current saturation level.
|
||||
* <p>
|
||||
* Saturation is a buffer for food level. Your food level will not drop if you
|
||||
* are saturated > 0.
|
||||
* Saturation is a buffer for food level. Your food level will not drop if
|
||||
* you are saturated > 0.
|
||||
*
|
||||
* @return Saturation level
|
||||
*/
|
||||
@@ -525,7 +544,8 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public void setFoodLevel(int value);
|
||||
|
||||
/**
|
||||
* Gets the Location where the player will spawn at their bed, null if they have not slept in one or their current bed spawn is invalid.
|
||||
* Gets the Location where the player will spawn at their bed, null if
|
||||
* they have not slept in one or their current bed spawn is invalid.
|
||||
*
|
||||
* @return Bed Spawn Location if bed exists, otherwise null.
|
||||
*/
|
||||
@@ -542,19 +562,22 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
* Sets the Location where the player will spawn at their bed.
|
||||
*
|
||||
* @param location where to set the respawn location
|
||||
* @param force whether to forcefully set the respawn location even if a valid bed is not present
|
||||
* @param force whether to forcefully set the respawn location even if a
|
||||
* valid bed is not present
|
||||
*/
|
||||
public void setBedSpawnLocation(Location location, boolean force);
|
||||
|
||||
/**
|
||||
* Determines if the Player is allowed to fly via jump key double-tap like in creative mode.
|
||||
* Determines if the Player is allowed to fly via jump key double-tap like
|
||||
* in creative mode.
|
||||
*
|
||||
* @return True if the player is allowed to fly.
|
||||
*/
|
||||
public boolean getAllowFlight();
|
||||
|
||||
/**
|
||||
* Sets if the Player is allowed to fly via jump key double-tap like in creative mode.
|
||||
* Sets if the Player is allowed to fly via jump key double-tap like in
|
||||
* creative mode.
|
||||
*
|
||||
* @param flight If flight should be allowed.
|
||||
*/
|
||||
@@ -578,16 +601,19 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
* Checks to see if a player has been hidden from this player
|
||||
*
|
||||
* @param player Player to check
|
||||
* @return True if the provided player is not being hidden from this player
|
||||
* @return True if the provided player is not being hidden from this
|
||||
* player
|
||||
*/
|
||||
public boolean canSee(Player player);
|
||||
|
||||
/**
|
||||
* Checks to see if this player is currently standing on a block. This information may
|
||||
* not be reliable, as it is a state provided by the client, and may therefore not be accurate.
|
||||
* Checks to see if this player is currently standing on a block. This
|
||||
* information may not be reliable, as it is a state provided by the
|
||||
* client, and may therefore not be accurate.
|
||||
*
|
||||
* @return True if the player standing on a solid block, else false.
|
||||
* @deprecated Inconsistent with {@link org.bukkit.entity.Entity#isOnGround()}
|
||||
* @deprecated Inconsistent with {@link
|
||||
* org.bukkit.entity.Entity#isOnGround()}
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean isOnGround();
|
||||
@@ -607,18 +633,22 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
public void setFlying(boolean value);
|
||||
|
||||
/**
|
||||
* Sets the speed at which a client will fly. Negative values indicate reverse directions.
|
||||
* Sets the speed at which a client will fly. Negative values indicate
|
||||
* reverse directions.
|
||||
*
|
||||
* @param value The new speed, from -1 to 1.
|
||||
* @throws IllegalArgumentException If new speed is less than -1 or greater than 1
|
||||
* @throws IllegalArgumentException If new speed is less than -1 or
|
||||
* greater than 1
|
||||
*/
|
||||
public void setFlySpeed(float value) throws IllegalArgumentException;
|
||||
|
||||
/**
|
||||
* Sets the speed at which a client will walk. Negative values indicate reverse directions.
|
||||
* Sets the speed at which a client will walk. Negative values indicate
|
||||
* reverse directions.
|
||||
*
|
||||
* @param value The new speed, from -1 to 1.
|
||||
* @throws IllegalArgumentException If new speed is less than -1 or greater than 1
|
||||
* @throws IllegalArgumentException If new speed is less than -1 or
|
||||
* greater than 1
|
||||
*/
|
||||
public void setWalkSpeed(float value) throws IllegalArgumentException;
|
||||
|
||||
@@ -639,21 +669,26 @@ public interface Player extends HumanEntity, Conversable, CommandSender, Offline
|
||||
/**
|
||||
* Request that the player's client download and switch texture packs.
|
||||
* <p>
|
||||
* The player's client will download the new texture pack asynchronously in the background, and
|
||||
* will automatically switch to it once the download is complete. If the client has downloaded
|
||||
* and cached the same texture pack in the past, it will perform a quick timestamp check over
|
||||
* the network to determine if the texture pack has changed and needs to be downloaded again.
|
||||
* When this request is sent for the very first time from a given server, the client will first
|
||||
* display a confirmation GUI to the player before proceeding with the download.
|
||||
* The player's client will download the new texture pack asynchronously
|
||||
* in the background, and will automatically switch to it once the
|
||||
* download is complete. If the client has downloaded and cached the same
|
||||
* texture pack in the past, it will perform a quick timestamp check over
|
||||
* the network to determine if the texture pack has changed and needs to
|
||||
* be downloaded again. When this request is sent for the very first time
|
||||
* from a given server, the client will first display a confirmation GUI
|
||||
* to the player before proceeding with the download.
|
||||
* <p>
|
||||
* Notes:
|
||||
* <ul>
|
||||
* <li>Players can disable server textures on their client, in which case this method will have no affect on them.</li>
|
||||
* <li>There is no concept of resetting texture packs back to default within Minecraft, so players will have to relog to do so.</li>
|
||||
* </ul>
|
||||
* <ul>
|
||||
* <li>Players can disable server textures on their client, in which
|
||||
* case this method will have no affect on them.
|
||||
* <li>There is no concept of resetting texture packs back to default
|
||||
* within Minecraft, so players will have to relog to do so.
|
||||
* </ul>
|
||||
*
|
||||
* @param url The URL from which the client will download the texture pack. The string must contain
|
||||
* only US-ASCII characters and should be encoded as per RFC 1738.
|
||||
* @param url The URL from which the client will download the texture
|
||||
* pack. The string must contain only US-ASCII characters and should
|
||||
* be encoded as per RFC 1738.
|
||||
* @throws IllegalArgumentException Thrown if the URL is null.
|
||||
* @throws IllegalArgumentException Thrown if the URL is too long.
|
||||
*/
|
||||
|
||||
@@ -32,7 +32,8 @@ public interface Projectile extends Entity {
|
||||
public boolean doesBounce();
|
||||
|
||||
/**
|
||||
* Set whether or not this projectile should bounce or not when it hits something.
|
||||
* Set whether or not this projectile should bounce or not when it hits
|
||||
* something.
|
||||
*
|
||||
* @param doesBounce whether or not it should bounce.
|
||||
*/
|
||||
|
||||
@@ -22,16 +22,15 @@ public interface TNTPrimed extends Explosive {
|
||||
|
||||
/**
|
||||
* Gets the source of this primed TNT. The source is the entity
|
||||
* responsible for the creation of this primed TNT.
|
||||
* (I.E. player ignites TNT with flint and steel.) Take note
|
||||
* that this can be null if there is no suitable source.
|
||||
* (created by the {@link org.bukkit.World#spawn(Location, Class)}
|
||||
* method, for example.)
|
||||
* responsible for the creation of this primed TNT. (I.E. player ignites
|
||||
* TNT with flint and steel.) Take note that this can be null if there is
|
||||
* no suitable source. (created by the {@link
|
||||
* org.bukkit.World#spawn(Location, Class)} method, for example.)
|
||||
* <p>
|
||||
* The source will become null if the chunk this primed TNT is in
|
||||
* is unloaded then reloaded. If the source Entity becomes invalidated
|
||||
* for any reason, such being removed from the world, the returned value
|
||||
* will be null.
|
||||
* The source will become null if the chunk this primed TNT is in is
|
||||
* unloaded then reloaded. If the source Entity becomes invalidated for
|
||||
* any reason, such being removed from the world, the returned value will
|
||||
* be null.
|
||||
*
|
||||
* @return the source of this primed TNT
|
||||
*/
|
||||
|
||||
@@ -5,16 +5,19 @@ public interface Tameable {
|
||||
/**
|
||||
* Check if this is tamed
|
||||
* <p>
|
||||
* If something is tamed then a player can not tame it through normal methods, even if it does not belong to anyone in particular.
|
||||
* If something is tamed then a player can not tame it through normal
|
||||
* methods, even if it does not belong to anyone in particular.
|
||||
*
|
||||
* @return true if this has been tamed
|
||||
*/
|
||||
public boolean isTamed();
|
||||
|
||||
/**
|
||||
* Sets if this has been tamed. Not necessary if the method setOwner has been used, as it tames automatically.
|
||||
* Sets if this has been tamed. Not necessary if the method setOwner has
|
||||
* been used, as it tames automatically.
|
||||
* <p>
|
||||
* If something is tamed then a player can not tame it through normal methods, even if it does not belong to anyone in particular.
|
||||
* If something is tamed then a player can not tame it through normal
|
||||
* methods, even if it does not belong to anyone in particular.
|
||||
*
|
||||
* @param tame true if tame
|
||||
*/
|
||||
@@ -29,8 +32,10 @@ public interface Tameable {
|
||||
|
||||
/**
|
||||
* Set this to be owned by given AnimalTamer.
|
||||
* If the owner is not null, this will be tamed and will have any current path it is following removed.
|
||||
* If the owner is set to null, this will be untamed, and the current owner removed.
|
||||
* <p>
|
||||
* If the owner is not null, this will be tamed and will have any current
|
||||
* path it is following removed. If the owner is set to null, this will be
|
||||
* untamed, and the current owner removed.
|
||||
*
|
||||
* @param tamer the AnimalTamer who should own this
|
||||
*/
|
||||
|
||||
@@ -15,8 +15,10 @@ public interface Wolf extends Animals, Tameable {
|
||||
public boolean isAngry();
|
||||
|
||||
/**
|
||||
* Sets the anger of this wolf
|
||||
* An angry wolf can not be fed or tamed, and will actively look for targets to attack.
|
||||
* Sets the anger of this wolf.
|
||||
* <p>
|
||||
* An angry wolf can not be fed or tamed, and will actively look for
|
||||
* targets to attack.
|
||||
*
|
||||
* @param angry true if angry
|
||||
*/
|
||||
@@ -30,7 +32,8 @@ public interface Wolf extends Animals, Tameable {
|
||||
public boolean isSitting();
|
||||
|
||||
/**
|
||||
* Sets if this wolf is sitting
|
||||
* Sets if this wolf is sitting.
|
||||
* <p>
|
||||
* Will remove any path that the wolf was following beforehand.
|
||||
*
|
||||
* @param sitting true if sitting
|
||||
|
||||
Reference in New Issue
Block a user