Renamed many events/constants to be not past tense <-- Major Break says: "HI"

This commit is contained in:
Erik Broes 2011-03-13 15:21:09 +01:00
parent 7e8118c81d
commit 8cf7b9e371
10 changed files with 43 additions and 51 deletions

View File

@ -139,14 +139,14 @@ public abstract class Event implements Serializable {
*/ */
/** /**
* Called when a player joins a server * Called when a player enters the world on a server
* *
* @see org.bukkit.event.player.PlayerEvent * @see org.bukkit.event.player.PlayerEvent
*/ */
PLAYER_JOIN (Category.PLAYER), PLAYER_JOIN (Category.PLAYER),
/** /**
* Called when a player is attempting to join a server * Called when a player is attempting to connect to the server
* *
* @see org.bukkit.event.player.PlayerLoginEvent * @see org.bukkit.event.player.PlayerLoginEvent
*/ */
@ -259,7 +259,7 @@ public abstract class Event implements Serializable {
* *
* @see org.bukkit.event.block.BlockDamageEvent * @see org.bukkit.event.block.BlockDamageEvent
*/ */
BLOCK_DAMAGED (Category.BLOCK), BLOCK_DAMAGE (Category.BLOCK),
/** /**
* Called when a block is undergoing a universe physics * Called when a block is undergoing a universe physics
@ -277,7 +277,7 @@ public abstract class Event implements Serializable {
* *
* @see org.bukkit.event.block.BlockFromToEvent * @see org.bukkit.event.block.BlockFromToEvent
*/ */
BLOCK_FLOW (Category.BLOCK), BLOCK_FROMTO (Category.BLOCK),
/** /**
* Called when a block is being set on fire from another block, such as * Called when a block is being set on fire from another block, such as
@ -302,14 +302,14 @@ public abstract class Event implements Serializable {
* *
* @see org.bukkit.event.block.BlockRightClickEvent * @see org.bukkit.event.block.BlockRightClickEvent
*/ */
BLOCK_RIGHTCLICKED (Category.BLOCK), BLOCK_RIGHTCLICK (Category.BLOCK),
/** /**
* Called when a player is attempting to place a block * Called when a player is attempting to place a block
* *
* @see org.bukkit.event.block.BlockPlaceEvent * @see org.bukkit.event.block.BlockPlaceEvent
*/ */
BLOCK_PLACED (Category.BLOCK), BLOCK_PLACE (Category.BLOCK),
/** /**
* Called when an entity interacts with a block (lever, door, pressure plate, chest, furnace) * Called when an entity interacts with a block (lever, door, pressure plate, chest, furnace)
@ -339,14 +339,6 @@ public abstract class Event implements Serializable {
*/ */
SIGN_CHANGE (Category.BLOCK), SIGN_CHANGE (Category.BLOCK),
/**
* Called when a liquid attempts to flow into a block which already
* contains a "breakable" block, such as redstone wire
*
* @todo: add javadoc see comment
*/
LIQUID_DESTROY (Category.BLOCK),
/** /**
* Called when a block changes redstone current. Only triggered on blocks * Called when a block changes redstone current. Only triggered on blocks
* that are actually capable of transmitting or carrying a redstone * that are actually capable of transmitting or carrying a redstone
@ -439,14 +431,14 @@ public abstract class Event implements Serializable {
* *
* @see org.bukkit.event.world.ChunkLoadEvent * @see org.bukkit.event.world.ChunkLoadEvent
*/ */
CHUNK_LOADED (Category.WORLD), CHUNK_LOAD (Category.WORLD),
/** /**
* Called when a chunk is unloaded * Called when a chunk is unloaded
* *
* @see org.bukkit.event.world.ChunkUnloadEvent * @see org.bukkit.event.world.ChunkUnloadEvent
*/ */
CHUNK_UNLOADED (Category.WORLD), CHUNK_UNLOAD (Category.WORLD),
/** /**
* Called when a chunk needs to be generated * Called when a chunk needs to be generated
@ -466,12 +458,12 @@ public abstract class Event implements Serializable {
* Called when a world is saved * Called when a world is saved
* *
*/ */
WORLD_SAVED (Category.WORLD), WORLD_SAVE (Category.WORLD),
/** /**
* Called when a World is loaded * Called when a World is loaded
*/ */
WORLD_LOADED (Category.WORLD), WORLD_LOAD (Category.WORLD),
/** /**
* LIVING_ENTITY EVENTS * LIVING_ENTITY EVENTS
@ -490,7 +482,7 @@ public abstract class Event implements Serializable {
* *
* @see org.bukkit.event.entity.EntityDamageEvent * @see org.bukkit.event.entity.EntityDamageEvent
*/ */
ENTITY_DAMAGED(Category.LIVING_ENTITY), ENTITY_DAMAGE (Category.LIVING_ENTITY),
/** /**
* Called when a LivingEntity dies * Called when a LivingEntity dies
@ -525,7 +517,7 @@ public abstract class Event implements Serializable {
* *
* @see org.bukkit.event.entity.EntityExplodeTriggerEvent * @see org.bukkit.event.entity.EntityExplodeTriggerEvent
*/ */
EXPLOSION_PRIMED (Category.LIVING_ENTITY), EXPLOSION_PRIME (Category.LIVING_ENTITY),
/** /**
* Called when an entity targets another entity * Called when an entity targets another entity

View File

@ -14,7 +14,7 @@ public class EntityDamageByBlockEvent extends EntityDamageEvent implements Cance
public EntityDamageByBlockEvent(Block damager, Entity damagee, DamageCause cause, int damage) public EntityDamageByBlockEvent(Block damager, Entity damagee, DamageCause cause, int damage)
{ {
super(Event.Type.ENTITY_DAMAGED, damagee, cause, damage); super(Event.Type.ENTITY_DAMAGE, damagee, cause, damage);
this.damager = damager; this.damager = damager;
} }

View File

@ -13,7 +13,7 @@ public class EntityDamageByEntityEvent extends EntityDamageEvent implements Canc
public EntityDamageByEntityEvent(Entity damager, Entity damagee, DamageCause cause, int damage) public EntityDamageByEntityEvent(Entity damager, Entity damagee, DamageCause cause, int damage)
{ {
super(Event.Type.ENTITY_DAMAGED, damagee, cause, damage); super(Event.Type.ENTITY_DAMAGE, damagee, cause, damage);
this.damager = damager; this.damager = damager;
} }

View File

@ -11,7 +11,7 @@ public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent {
private boolean bounce; private boolean bounce;
public EntityDamageByProjectileEvent(Entity damager, Entity damagee, Entity projectile, DamageCause cause, int damage) { public EntityDamageByProjectileEvent(Entity damager, Entity damagee, Entity projectile, DamageCause cause, int damage) {
super(Event.Type.ENTITY_DAMAGED, damager, damagee, cause, damage); super(Event.Type.ENTITY_DAMAGE, damager, damagee, cause, damage);
this.projectile = projectile; this.projectile = projectile;
Random random = new Random(); Random random = new Random();
this.bounce = random.nextBoolean(); this.bounce = random.nextBoolean();

View File

@ -15,7 +15,7 @@ public class EntityDamageEvent extends EntityEvent implements Cancellable {
public EntityDamageEvent(Entity damagee, DamageCause cause, int damage) public EntityDamageEvent(Entity damagee, DamageCause cause, int damage)
{ {
super(Event.Type.ENTITY_DAMAGED, damagee); super(Event.Type.ENTITY_DAMAGE, damagee);
this.cause = cause; this.cause = cause;
this.damage = damage; this.damage = damage;
} }

View File

@ -21,7 +21,7 @@ public class EntityListener implements Listener {
public void onEntityExplode(EntityExplodeEvent event) { public void onEntityExplode(EntityExplodeEvent event) {
} }
public void onExplosionPrimed(ExplosionPrimedEvent event) { public void onExplosionPrime(ExplosionPrimeEvent event) {
} }
public void onEntityDeath(EntityDeathEvent event) { public void onEntityDeath(EntityDeathEvent event) {

View File

@ -3,13 +3,13 @@ package org.bukkit.event.entity;
import org.bukkit.entity.Entity; import org.bukkit.entity.Entity;
import org.bukkit.event.Cancellable; import org.bukkit.event.Cancellable;
public class ExplosionPrimedEvent extends EntityEvent implements Cancellable { public class ExplosionPrimeEvent extends EntityEvent implements Cancellable {
private boolean cancel; private boolean cancel;
private float radius; private float radius;
private boolean fire; private boolean fire;
public ExplosionPrimedEvent(Type type, Entity what, float radius, boolean fire) { public ExplosionPrimeEvent(Type type, Entity what, float radius, boolean fire) {
super(type.EXPLOSION_PRIMED, what); super(type.EXPLOSION_PRIME, what);
this.cancel = false; this.cancel = false;
this.radius = radius; this.radius = radius;
this.fire = fire; this.fire = fire;

View File

@ -12,7 +12,7 @@ public class ServerListener implements Listener {
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onPluginEnabled(PluginEvent event) { public void onPluginEnable(PluginEvent event) {
} }
/** /**
@ -20,7 +20,7 @@ public class ServerListener implements Listener {
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onPluginDisabled(PluginEvent event) { public void onPluginDisable(PluginEvent event) {
} }
/** /**

View File

@ -12,7 +12,7 @@ public class WorldListener implements Listener {
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onChunkLoaded(ChunkLoadEvent event) { public void onChunkLoad(ChunkLoadEvent event) {
} }
/** /**
@ -20,7 +20,7 @@ public class WorldListener implements Listener {
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onChunkUnloaded(ChunkUnloadEvent event) { public void onChunkUnload(ChunkUnloadEvent event) {
} }
/** /**
@ -28,7 +28,7 @@ public class WorldListener implements Listener {
* *
* param event Relevant event details * param event Relevant event details
*/ */
public void onWorldSaved(WorldEvent event) { public void onWorldSave(WorldEvent event) {
} }
/** /**
@ -36,6 +36,6 @@ public class WorldListener implements Listener {
* *
* @param event Relevant event details * @param event Relevant event details
*/ */
public void onWorldLoaded(WorldEvent event) { public void onWorldLoad(WorldEvent event) {
} }
} }

View File

@ -254,17 +254,17 @@ public final class JavaPluginLoader implements PluginLoader {
((BlockListener)listener).onBlockCanBuild( (BlockCanBuildEvent)event ); ((BlockListener)listener).onBlockCanBuild( (BlockCanBuildEvent)event );
} }
}; };
case BLOCK_RIGHTCLICKED: case BLOCK_RIGHTCLICK:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((BlockListener)listener).onBlockRightClick( (BlockRightClickEvent)event ); ((BlockListener)listener).onBlockRightClick( (BlockRightClickEvent)event );
} }
}; };
case BLOCK_PLACED: case BLOCK_PLACE:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((BlockListener)listener).onBlockPlace( (BlockPlaceEvent)event ); ((BlockListener)listener).onBlockPlace( (BlockPlaceEvent)event );
} }
}; };
case BLOCK_DAMAGED: case BLOCK_DAMAGE:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((BlockListener)listener).onBlockDamage( (BlockDamageEvent)event ); ((BlockListener)listener).onBlockDamage( (BlockDamageEvent)event );
} }
@ -274,7 +274,7 @@ public final class JavaPluginLoader implements PluginLoader {
((BlockListener)listener).onBlockInteract( (BlockInteractEvent)event ); ((BlockListener)listener).onBlockInteract( (BlockInteractEvent)event );
} }
}; };
case BLOCK_FLOW: case BLOCK_FROMTO:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((BlockListener)listener).onBlockFlow( (BlockFromToEvent)event ); ((BlockListener)listener).onBlockFlow( (BlockFromToEvent)event );
} }
@ -313,12 +313,12 @@ public final class JavaPluginLoader implements PluginLoader {
// Server Events // Server Events
case PLUGIN_ENABLE: case PLUGIN_ENABLE:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((ServerListener)listener).onPluginEnabled( (PluginEvent)event ); ((ServerListener)listener).onPluginEnable( (PluginEvent)event );
} }
}; };
case PLUGIN_DISABLE: case PLUGIN_DISABLE:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((ServerListener)listener).onPluginDisabled( (PluginEvent)event ); ((ServerListener)listener).onPluginDisable( (PluginEvent)event );
} }
}; };
@ -329,29 +329,29 @@ public final class JavaPluginLoader implements PluginLoader {
}; };
// World Events // World Events
case CHUNK_LOADED: case CHUNK_LOAD:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((WorldListener)listener).onChunkLoaded( (ChunkLoadEvent)event ); ((WorldListener)listener).onChunkLoad( (ChunkLoadEvent)event );
} }
}; };
case CHUNK_UNLOADED: case CHUNK_UNLOAD:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((WorldListener)listener).onChunkUnloaded( (ChunkUnloadEvent)event ); ((WorldListener)listener).onChunkUnload( (ChunkUnloadEvent)event );
} }
}; };
case WORLD_SAVED: case WORLD_SAVE:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((WorldListener)listener).onWorldSaved( (WorldEvent)event ); ((WorldListener)listener).onWorldSave( (WorldEvent)event );
} }
}; };
case WORLD_LOADED: case WORLD_LOAD:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((WorldListener)listener).onWorldLoaded( (WorldEvent)event ); ((WorldListener)listener).onWorldLoad( (WorldEvent)event );
} }
}; };
// Entity Events // Entity Events
case ENTITY_DAMAGED: case ENTITY_DAMAGE:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((EntityListener)listener).onEntityDamage( (EntityDamageEvent)event ); ((EntityListener)listener).onEntityDamage( (EntityDamageEvent)event );
} }
@ -371,9 +371,9 @@ public final class JavaPluginLoader implements PluginLoader {
((EntityListener)listener).onEntityExplode( (EntityExplodeEvent)event ); ((EntityListener)listener).onEntityExplode( (EntityExplodeEvent)event );
} }
}; };
case EXPLOSION_PRIMED: case EXPLOSION_PRIME:
return new EventExecutor() { public void execute( Listener listener, Event event ) { return new EventExecutor() { public void execute( Listener listener, Event event ) {
((EntityListener)listener).onExplosionPrimed( (ExplosionPrimedEvent)event ); ((EntityListener)listener).onExplosionPrime( (ExplosionPrimeEvent)event );
} }
}; };
case ENTITY_TARGET: case ENTITY_TARGET: