Generic cleaning

This commit is contained in:
Erik Broes
2012-01-15 14:37:30 +01:00
parent 78cc950c50
commit eb9dc64493
61 changed files with 245 additions and 272 deletions

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) {