Generic cleaning

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
Bukkit/Spigot
2012-01-15 14:37:30 +01:00
parent 8377ee22f8
commit 4c80a49933
61 changed files with 245 additions and 272 deletions

View File

@@ -78,7 +78,7 @@ public abstract class Event implements Serializable {
Highest,
/**
* Event is listened to purely for monitoring the outcome of an event.
*
* <p />
* No modifications to the event should be made under this priority
*/
Monitor
@@ -333,7 +333,7 @@ public abstract class Event implements Serializable {
/**
* Called when a block is undergoing a universe physics
* check on whether it can be built
*
* <p />
* For example, cacti cannot be built on grass unless overridden here
*
* @see org.bukkit.event.block.BlockCanBuildEvent
@@ -355,7 +355,7 @@ public abstract class Event implements Serializable {
BLOCK_IGNITE(Category.BLOCK),
/**
* Called when a block undergoes a physics check
*
* <p />
* A physics check is commonly called when an adjacent block changes
* type
*
@@ -531,7 +531,7 @@ public abstract class Event implements Serializable {
/**
* Called when a chunk is loaded
*
* <p />
* If a new chunk is being generated for loading, it will call
* Type.CHUNK_GENERATION and then Type.CHUNK_LOADED upon completion
*
@@ -546,7 +546,7 @@ public abstract class Event implements Serializable {
CHUNK_UNLOAD(Category.WORLD),
/**
* Called when a newly created chunk has been populated.
*
* <p />
* If your intent is to populate the chunk using this event, please see {@link org.bukkit.generator.BlockPopulator}
*
* @see org.bukkit.event.world.ChunkPopulateEvent
@@ -605,7 +605,7 @@ public abstract class Event implements Serializable {
*
* @see org.bukkit.event.entity.ItemDespawnEvent
*/
ITEM_DESPAWN (Category.WORLD),
ITEM_DESPAWN(Category.WORLD),
/**
* ENTITY EVENTS
@@ -667,10 +667,10 @@ public abstract class Event implements Serializable {
ENTITY_EXPLODE(Category.LIVING_ENTITY),
/**
* Called when an entity has made a decision to explode.
*
* <p />
* Provides an opportunity to act on the entity, change the explosion radius,
* or to change the fire-spread flag.
*
* <p />
* Canceling the event negates the entity's decision to explode.
* For EntityCreeper, this resets the fuse but does not kill the Entity.
* For EntityFireball and EntityTNTPrimed....?

View File

@@ -6,10 +6,10 @@ import org.bukkit.entity.Entity;
/**
* Called when a block is formed by entities.
*<p />
* <p />
* Examples:
*<ul>
* <li>Snow formed by a {@link org.bukkit.entity.Snowman}.</li>
* <ul>
* <li>Snow formed by a {@link org.bukkit.entity.Snowman}.</li>
* </ul>
*/
public class EntityBlockFormEvent extends BlockFormEvent {

View File

@@ -15,7 +15,7 @@ public class EntityCombustByBlockEvent extends EntityCombustEvent {
/**
* The combuster can be lava or a block that is on fire.
*
* <p />
* WARNING: block may be null.
*
* @return the Block that set the combustee alight.

View File

@@ -36,7 +36,7 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable {
/**
* The number of seconds the combustee should be alight for.
*
* <p />
* This value will only ever increase the combustion time, not decrease existing combustion times.
*
* @param duration the time in seconds to be alight for.

View File

@@ -68,97 +68,97 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
/**
* Damage caused when an entity contacts a block such as a Cactus.
*
* <p />
* Damage: 1 (Cactus)
*/
CONTACT,
/**
* Damage caused when an entity attacks another entity.
*
* <p />
* Damage: variable
*/
ENTITY_ATTACK,
/**
* Damage caused when attacked by a projectile.
*
* <p />
* Damage: variable
*/
PROJECTILE,
/**
* Damage caused by being put in a block
*
* <p />
* Damage: 1
*/
SUFFOCATION,
/**
* Damage caused when an entity falls a distance greater than 3 blocks
*
* <p />
* Damage: fall height - 3.0
*/
FALL,
/**
* Damage caused by direct exposure to fire
*
* <p />
* Damage: 1
*/
FIRE,
/**
* Damage caused due to burns caused by fire
*
* <p />
* Damage: 1
*/
FIRE_TICK,
/**
* Damage caused by direct exposure to lava
*
* <p />
* Damage: 4
*/
LAVA,
/**
* Damage caused by running out of air while in water
*
* <p />
* Damage: 2
*/
DROWNING,
/**
* Damage caused by being in the area when a block explodes.
*
* <p />
* Damage: variable
*/
BLOCK_EXPLOSION,
/**
* Damage caused by being in the area when an entity, such as a Creeper, explodes.
*
* <p />
* Damage: variable
*/
ENTITY_EXPLOSION,
/**
* Damage caused by falling into the void
*
* <p />
* Damage: 4 for players
*/
VOID,
/**
* Damage caused by being struck by lightning
*
* <p />
* Damage: 5
*/
LIGHTNING,
/**
* Damage caused by committing suicide using the command "/kill"
*
* <p />
* Damage: 1000
*/
SUICIDE,
/**
* Damage caused by starving due to having an empty hunger bar
*
* <p />
* Damage: 1
*/
STARVATION,
/**
* Custom damage.
*
* <p />
* Damage: variable
*/
CUSTOM

View File

@@ -172,7 +172,7 @@ public class EntityListener implements Listener {
/**
* Called when an entity creates a portal.
*
*
* @param event Relevant event details
*/
public void onEntityCreatePortalEvent(EntityCreatePortalEvent event) {}

View File

@@ -51,7 +51,7 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable {
* Set the entity that you want the mob to target instead.
* It is possible to be null, null will cause the entity to be
* target-less.
*
* <p />
* This is different from cancelling the event. Cancelling the event
* will cause the entity to keep an original target, while setting to be
* null will cause the entity to be reset

View File

@@ -19,11 +19,11 @@ public class PlayerDeathEvent extends EntityDeathEvent {
public PlayerDeathEvent(Player player, List<ItemStack> drops, int droppedExp, String deathMessage) {
this(player, drops, droppedExp, 0, deathMessage);
}
public PlayerDeathEvent(Player player, List<ItemStack> drops, int droppedExp, int newExp, String deathMessage) {
this(player, drops, droppedExp, newExp, 0, 0, deathMessage);
}
public PlayerDeathEvent(Player player, List<ItemStack> drops, int droppedExp, int newExp, int newTotalExp, int newLevel, String deathMessage) {
super(player, drops, droppedExp);
this.newExp = newExp;
@@ -73,59 +73,59 @@ public class PlayerDeathEvent extends EntityDeathEvent {
public void setNewExp(int exp) {
newExp = exp;
}
/**
* Gets the Level the Player should have at respawn.
*
*
* @return New Level of the respawned player
*/
public int getNewLevel() {
return newLevel;
}
/**
* Sets the Level the Player should have at respawn.
*
*
* @get level New Level of the respawned player
*/
public void setNewLevel(int level) {
newLevel = level;
}
/**
* Gets the Total EXP the Player should have at respawn.
*
*
* @return New Total EXP of the respawned player
*/
public int getNewTotalExp() {
return newTotalExp;
}
/**
* Sets the Total EXP the Player should have at respawn.
*
*
* @get totalExp New Total EXP of the respawned player
*/
public void setNewTotalExp(int totalExp) {
newTotalExp = totalExp;
}
/**
* Gets if the Player should keep all EXP at respawn.
* <p>
* This flag overrides other EXP settings
*
*
* @return True if Player should keep all pre-death exp
*/
public boolean getKeepLevel() {
return keepLevel;
}
/**
* Sets if the Player should keep all EXP at respawn.
* <p>
* This overrides all other EXP settings
*
*
* @param keepLevel True to keep all current value levels
*/
public void setKeepLevel(boolean keepLevel) {

View File

@@ -72,7 +72,7 @@ public class PlayerEggThrowEvent extends PlayerEvent {
/**
* Get the number of mob hatches from the egg. By default the number
* will be he number the server would've done
*
* <p />
* 7/8 chance of being 0
* 31/256 ~= 1/8 chance to be 1
* 1/256 chance to be 4
@@ -85,7 +85,7 @@ public class PlayerEggThrowEvent extends PlayerEvent {
/**
* Change the number of mobs coming out of the hatched egg
*
* <p />
* The boolean hatching will override this number.
* Ie. If hatching = false, this number will not matter
*

View File

@@ -54,7 +54,7 @@ public class PlayerInteractEvent extends PlayerEvent 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
*
* <p />
* 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)

View File

@@ -29,7 +29,7 @@ public class PlayerMoveEvent extends PlayerEvent 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
*
* <p />
* If a move or teleport event is cancelled, the player will be moved or
* teleported back to the Location as defined by getFrom(). This will not
* fire an event
@@ -43,7 +43,7 @@ public class PlayerMoveEvent extends PlayerEvent 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
*
* <p />
* If a move or teleport event is cancelled, the player will be moved or
* teleported back to the Location as defined by getFrom(). This will not
* fire an event

View File

@@ -5,7 +5,7 @@ import org.bukkit.generator.BlockPopulator;
/**
* Thrown when a new chunk has finished being populated.
*
* <p />
* If your intent is to populate the chunk using this event, please see {@link BlockPopulator}
*/
@SuppressWarnings("serial")

View File

@@ -16,7 +16,7 @@ public class WorldListener implements Listener {
/**
* Called when a newly created chunk has been populated.
*
* <p />
* If your intent is to populate the chunk using this event, please see {@link org.bukkit.generator.BlockPopulator}
*
* @param event Relevant event details
@@ -70,7 +70,8 @@ public class WorldListener implements Listener {
*
* @param event Relevant event details
*/
public void onWorldUnload(WorldUnloadEvent event) { }
public void onWorldUnload(WorldUnloadEvent event) {}
/**
* Event that is called when an organic structure attempts to grow (Sapling -> Tree), (Mushroom -> Huge Mushroom), naturally or using bonemeal.
*