More JavaDoc improvements.
This commit is contained in:
@@ -6,7 +6,9 @@ import org.bukkit.Location;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Stores data for damage events
|
||||
* Called when a creature is spawned into a world.
|
||||
*<p />
|
||||
* If a Creature Spawn event is cancelled, the creature will not spawn.
|
||||
*/
|
||||
public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
@@ -23,18 +25,22 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the cancellation state of this event. A canceled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* Gets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins.
|
||||
*<p />
|
||||
* If a Creature Spawn event is cancelled, the creature will not spawn.
|
||||
*
|
||||
* @return true if this event is canceled
|
||||
* @return true if this event is cancelled
|
||||
*/
|
||||
public boolean isCancelled() {
|
||||
return canceled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the cancellation state of this event. A canceled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* Sets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins.
|
||||
*<p />
|
||||
* If a Creature Spawn event is cancelled, the creature will not spawn.
|
||||
*
|
||||
* @param cancel true if you wish to cancel this event
|
||||
*/
|
||||
@@ -44,6 +50,7 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the location at which the creature is spawning.
|
||||
*
|
||||
* @return The location at which the creature is spawning
|
||||
*/
|
||||
public Location getLocation() {
|
||||
|
||||
@@ -4,7 +4,9 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Stores data for creepers being (un)powered
|
||||
* Called when a Creeper is struck by lightning.
|
||||
*<p />
|
||||
* If a Creeper Power event is cancelled, the Creeper will not be powered.
|
||||
*/
|
||||
public class CreeperPowerEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
@@ -28,18 +30,22 @@ public class CreeperPowerEvent extends EntityEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the cancellation state of this event. A canceled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* Gets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins.
|
||||
*<p />
|
||||
* If a Creeper Power event is cancelled, the Creeper will not be powered.
|
||||
*
|
||||
* @return true if this event is canceled
|
||||
* @return true if this event is cancelled
|
||||
*/
|
||||
public boolean isCancelled() {
|
||||
return canceled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the cancellation state of this event. A canceled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* Sets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins.
|
||||
*<p />
|
||||
* If a Creeper Power event is cancelled, the Creeper will not be powered.
|
||||
*
|
||||
* @param cancel true if you wish to cancel this event
|
||||
*/
|
||||
@@ -48,9 +54,9 @@ public class CreeperPowerEvent extends EntityEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the bolt which is striking the creeper.
|
||||
* Gets the lightning bolt which is striking the Creeper.
|
||||
*
|
||||
* @return lightning entity
|
||||
* @return The Entity for the lightning bolt which is striking the Creeper
|
||||
*/
|
||||
public Entity getLightning() {
|
||||
return bolt;
|
||||
@@ -58,6 +64,7 @@ public class CreeperPowerEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the cause of the creeper being (un)powered.
|
||||
*
|
||||
* @return A PowerCause value detailing the cause of change in power.
|
||||
*/
|
||||
public PowerCause getCause() {
|
||||
|
||||
@@ -4,7 +4,9 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Called when an entity combusts due to the sun
|
||||
* Called when an entity combusts due to the sun.
|
||||
*<p />
|
||||
* If an Entity Combust event is cancelled, the entity will not combust.
|
||||
*/
|
||||
public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
private boolean cancel;
|
||||
@@ -16,7 +18,9 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* be executed in the server, but will still pass to other plugins.
|
||||
*<p />
|
||||
* If an Entity Combust event is cancelled, the entity will not combust.
|
||||
*
|
||||
* @return true if this event is cancelled
|
||||
*/
|
||||
@@ -26,7 +30,9 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Sets the cancellation state of this event. A cancelled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
* be executed in the server, but will still pass to other plugins.
|
||||
*<p />
|
||||
* If an Entity Combust event is cancelled, the entity will not combust.
|
||||
*
|
||||
* @param cancel true if you wish to cancel this event
|
||||
*/
|
||||
|
||||
@@ -5,7 +5,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Stores details for damage events where the damager is a block
|
||||
* Called when an entity is damaged by a block
|
||||
*/
|
||||
public class EntityDamageByBlockEvent extends EntityDamageEvent implements Cancellable {
|
||||
|
||||
@@ -18,6 +18,7 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent implements Cance
|
||||
|
||||
/**
|
||||
* Returns the block that damaged the player.
|
||||
*
|
||||
* @return Block that damaged the player
|
||||
*/
|
||||
public Block getDamager() {
|
||||
|
||||
@@ -4,7 +4,7 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Stores details for damage events where the damager is a block
|
||||
* Called when an entity is damaged by an entity
|
||||
*/
|
||||
public class EntityDamageByEntityEvent extends EntityDamageEvent implements Cancellable {
|
||||
|
||||
@@ -17,6 +17,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent implements Canc
|
||||
|
||||
/**
|
||||
* Returns the entity that damaged the defender.
|
||||
*
|
||||
* @return Entity that damaged the defender.
|
||||
*/
|
||||
public Entity getDamager() {
|
||||
|
||||
@@ -16,6 +16,7 @@ public class EntityEvent extends Event {
|
||||
|
||||
/**
|
||||
* Returns the Entity involved in this event
|
||||
*
|
||||
* @return Entity who is involved in this event
|
||||
*/
|
||||
public final Entity getEntity() {
|
||||
|
||||
@@ -6,7 +6,6 @@ import org.bukkit.event.Cancellable;
|
||||
|
||||
/**
|
||||
* Called when an entity interacts with an object
|
||||
*
|
||||
*/
|
||||
public class EntityInteractEvent extends EntityEvent implements Cancellable {
|
||||
protected Block block;
|
||||
@@ -22,7 +21,7 @@ public class EntityInteractEvent extends EntityEvent implements Cancellable {
|
||||
* Gets the cancellation state of this event. Set to true if you
|
||||
* want to prevent buckets from placing water and so forth
|
||||
*
|
||||
* @return boolean cancellation state
|
||||
* @return true if this event is cancelled
|
||||
*/
|
||||
public boolean isCancelled() {
|
||||
return cancelled;
|
||||
@@ -32,10 +31,6 @@ public class EntityInteractEvent extends EntityEvent implements Cancellable {
|
||||
* Sets the cancellation state of this event. A canceled event will not
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
*
|
||||
* Canceling this event will prevent use of food (player won't lose the
|
||||
* food item), prevent bows/snowballs/eggs from firing, etc. (player won't
|
||||
* lose the ammo)
|
||||
*
|
||||
* @param cancel true if you wish to cancel this event
|
||||
*/
|
||||
public void setCancelled(boolean cancel) {
|
||||
@@ -45,7 +40,7 @@ public class EntityInteractEvent extends EntityEvent implements Cancellable {
|
||||
/**
|
||||
* Returns the involved block
|
||||
*
|
||||
* @return Block returns the block clicked with this item.
|
||||
* @return the block clicked with this item.
|
||||
*/
|
||||
public Block getBlock() {
|
||||
return block;
|
||||
|
||||
@@ -11,7 +11,9 @@ public class EntityListener implements Listener {
|
||||
public EntityListener() {}
|
||||
|
||||
/**
|
||||
* Called when a creature is spawned into a world
|
||||
* Called when a creature is spawned into a world.
|
||||
*<p />
|
||||
* If a Creature Spawn event is cancelled, the creature will not spawn.
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
@@ -25,7 +27,9 @@ public class EntityListener implements Listener {
|
||||
public void onItemSpawn(ItemSpawnEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when an entity combusts due to the sun
|
||||
* Called when an entity combusts due to the sun.
|
||||
*<p />
|
||||
* If an Entity Combust event is cancelled, the entity will not combust.
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
@@ -102,7 +106,9 @@ public class EntityListener implements Listener {
|
||||
public void onPigZap(PigZapEvent event) {}
|
||||
|
||||
/**
|
||||
* Called when a Creeper is struck by lightning
|
||||
* Called when a Creeper is struck by lightning.
|
||||
*<p />
|
||||
* If a Creeper Power event is cancelled, the Creeper will not be powered.
|
||||
*
|
||||
* @param event Relevant event details
|
||||
*/
|
||||
|
||||
@@ -21,6 +21,7 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
|
||||
|
||||
/**
|
||||
* Gets the amount of regained health
|
||||
*
|
||||
* @return The amount of health regained
|
||||
*/
|
||||
public int getAmount() {
|
||||
@@ -41,7 +42,6 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
*
|
||||
* If a health-regain event is cancelled, the entity won't get health.
|
||||
* This will not fire an event.
|
||||
*
|
||||
* @return true if this event is cancelled
|
||||
*/
|
||||
@@ -54,7 +54,6 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
|
||||
* be executed in the server, but will still pass to other plugins
|
||||
*
|
||||
* If a health-regain event is cancelled, the entity won't get health.
|
||||
* This will not fire an event.
|
||||
*
|
||||
* @param cancel true if you wish to cancel this event
|
||||
*/
|
||||
@@ -72,7 +71,7 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable
|
||||
}
|
||||
|
||||
/**
|
||||
* An enum to specify the type of health regaining
|
||||
* An enum to specify the type of health regaining that is occurring
|
||||
*/
|
||||
public enum RegainReason {
|
||||
|
||||
|
||||
@@ -39,6 +39,7 @@ public class ItemSpawnEvent extends EntityEvent implements Cancellable {
|
||||
|
||||
/**
|
||||
* Gets the location at which the item is spawning.
|
||||
*
|
||||
* @return The location at which the item is spawning
|
||||
*/
|
||||
public Location getLocation() {
|
||||
|
||||
Reference in New Issue
Block a user