mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 09:17:36 +01:00
[Bleeding] Event no longer implements Serializable.
By: Feildmaster <admin@feildmaster.com>
This commit is contained in:
parent
0fd379166c
commit
e4de1795db
@ -1,12 +1,9 @@
|
||||
package org.bukkit.event;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Represents an event
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class Event implements Serializable {
|
||||
public abstract class Event {
|
||||
private String name;
|
||||
|
||||
/**
|
||||
|
@ -14,7 +14,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Block Break event is cancelled, the block will not break.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockBreakEvent extends BlockEvent implements Cancellable {
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
@ -9,7 +9,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Block Burn event is cancelled, the block will not be destroyed as a result of being burnt by fire.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockBurnEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled;
|
||||
|
@ -13,7 +13,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <li>If you want to figure out what is being placed, use {@link #getMaterial()} or {@link #getMaterialId()} instead.</li>
|
||||
* </ul>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockCanBuildEvent extends BlockEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
protected boolean buildable;
|
||||
|
@ -11,7 +11,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
* <p />
|
||||
* If a Block Damage event is cancelled, the block will not be damaged.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockDamageEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Player player;
|
||||
|
@ -11,10 +11,8 @@ import org.bukkit.util.Vector;
|
||||
* <p />
|
||||
* If a Block Dispense event is cancelled, the block will not dispense the item.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockDispenseEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean cancelled = false;
|
||||
private ItemStack item;
|
||||
private Vector velocity;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Represents a block related event.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class BlockEvent extends Event {
|
||||
protected Block block;
|
||||
|
||||
|
@ -16,7 +16,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Block Fade event is cancelled, the block will not fade, melt or disappear.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockFadeEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled;
|
||||
|
@ -19,7 +19,6 @@ import org.bukkit.event.HandlerList;
|
||||
*
|
||||
* @see BlockSpreadEvent
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockFormEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled;
|
||||
|
@ -10,7 +10,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Block From To event is cancelled, the block will not move (the liquid will not flow).
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockFromToEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
protected Block to;
|
||||
|
@ -10,7 +10,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Block Ignite event is cancelled, the block will not be ignited.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockIgniteEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final IgniteCause cause;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Thrown when a block physics check is called
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockPhysicsEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final int changed;
|
||||
|
@ -5,7 +5,6 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.event.Cancellable;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class BlockPistonEvent extends BlockEvent implements Cancellable {
|
||||
private boolean cancelled;
|
||||
private final BlockFace direction;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockPistonExtendEvent extends BlockPistonEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final int length;
|
||||
|
@ -5,7 +5,6 @@ import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockFace;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockPistonRetractEvent extends BlockPistonEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
public BlockPistonRetractEvent(final Block block, final BlockFace direction) {
|
||||
|
@ -12,7 +12,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
* <p />
|
||||
* If a Block Place event is cancelled, the block will not be placed.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockPlaceEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
protected boolean cancel;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a redstone current changes
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockRedstoneEvent extends BlockEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final int oldCurrent;
|
||||
|
@ -18,7 +18,6 @@ import org.bukkit.event.HandlerList;
|
||||
*
|
||||
* @see BlockFormEvent
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class BlockSpreadEvent extends BlockFormEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Block source;
|
||||
|
@ -12,7 +12,6 @@ import org.bukkit.entity.Entity;
|
||||
* <li>Snow formed by a {@link org.bukkit.entity.Snowman}.</li>
|
||||
* </ul>
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityBlockFormEvent extends BlockFormEvent {
|
||||
private final Entity entity;
|
||||
|
||||
|
@ -9,7 +9,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Leaves Decay event is cancelled, the leaves will not decay.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class LeavesDecayEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel = false;
|
||||
|
@ -10,7 +10,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Sign Change event is cancelled, the sign will not be changed.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SignChangeEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel = false;
|
||||
|
@ -14,7 +14,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when an ItemStack is successfully enchanted (currently at enchantment table)
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EnchantItemEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Block table;
|
||||
|
@ -10,7 +10,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when an ItemStack is inserted in an enchantment table - can be called multiple times
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PrepareItemEnchantEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Block table;
|
||||
|
@ -11,10 +11,8 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Creature Spawn event is cancelled, the creature will not spawn.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final Location location;
|
||||
private boolean canceled;
|
||||
private final CreatureType creatureType;
|
||||
|
@ -9,10 +9,8 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If a Creeper Power event is cancelled, the Creeper will not be powered.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class CreeperPowerEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean canceled;
|
||||
private final PowerCause cause;
|
||||
private Entity bolt;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
/**
|
||||
* Called when a LivingEntity changes a block
|
||||
*
|
||||
|
@ -3,9 +3,7 @@ package org.bukkit.event.entity;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityCombustByBlockEvent extends EntityCombustEvent {
|
||||
|
||||
private final Block combuster;
|
||||
|
||||
public EntityCombustByBlockEvent(final Block combuster, final Entity combustee, final int duration) {
|
||||
|
@ -2,9 +2,7 @@ package org.bukkit.event.entity;
|
||||
|
||||
import org.bukkit.entity.Entity;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityCombustByEntityEvent extends EntityCombustEvent {
|
||||
|
||||
private final Entity combuster;
|
||||
|
||||
public EntityCombustByEntityEvent(final Entity combuster, final Entity combustee, final int duration) {
|
||||
|
@ -9,7 +9,6 @@ import org.bukkit.event.HandlerList;
|
||||
* <p />
|
||||
* If an Entity Combust event is cancelled, the entity will not combust.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityCombustEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private int duration;
|
||||
|
@ -10,7 +10,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Thrown when a Living Entity creates a portal in a world.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityCreatePortalEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final List<BlockState> blocks;
|
||||
|
@ -6,9 +6,7 @@ import org.bukkit.entity.Entity;
|
||||
/**
|
||||
* Called when an entity is damaged by a block
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityDamageByBlockEvent extends EntityDamageEvent {
|
||||
|
||||
private final Block damager;
|
||||
|
||||
public EntityDamageByBlockEvent(final Block damager, final Entity damagee, final DamageCause cause, final int damage) {
|
||||
|
@ -5,9 +5,7 @@ import org.bukkit.entity.Entity;
|
||||
/**
|
||||
* Called when an entity is damaged by an entity
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityDamageByEntityEvent extends EntityDamageEvent {
|
||||
|
||||
private final Entity damager;
|
||||
|
||||
public EntityDamageByEntityEvent(final Entity damager, final Entity damagee, final DamageCause cause, final int damage) {
|
||||
|
@ -8,10 +8,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Stores data for damage events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityDamageEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private int damage;
|
||||
private boolean cancelled;
|
||||
private final DamageCause cause;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Thrown whenever a LivingEntity dies
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityDeathEvent extends EntityEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final List<ItemStack> drops;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Represents an Entity-related event
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class EntityEvent extends Event {
|
||||
protected Entity entity;
|
||||
|
||||
|
@ -11,7 +11,6 @@ import java.util.List;
|
||||
/**
|
||||
* Called when an entity explodes
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityExplodeEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel;
|
||||
|
@ -8,11 +8,9 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when an entity interacts with an object
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityInteractEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
protected Block block;
|
||||
|
||||
private boolean cancelled;
|
||||
|
||||
public EntityInteractEvent(final Entity entity, final Block block) {
|
||||
|
@ -7,10 +7,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Stores data for entities standing inside a portal block
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityPortalEnterEvent extends EntityEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final Location location;
|
||||
|
||||
public EntityPortalEnterEvent(final Entity entity, final Location location) {
|
||||
|
@ -7,10 +7,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Stores data for health-regain events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityRegainHealthEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean cancelled;
|
||||
private int amount;
|
||||
private final RegainReason regainReason;
|
||||
|
@ -10,10 +10,8 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when a LivingEntity shoots a bow firing an arrow
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityShootBowEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final ItemStack bow;
|
||||
private Entity projectile;
|
||||
private final float force;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Thrown when a LivingEntity is tamed
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityTameEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled;
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a creature targets or untargets another entity
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityTargetEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel;
|
||||
|
@ -9,10 +9,8 @@ import org.bukkit.event.HandlerList;
|
||||
* Thrown when a non-player entity (such as an Enderman) tries to teleport from one
|
||||
* location to another.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class EntityTeleportEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean cancel;
|
||||
private Location from;
|
||||
private Location to;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when an entity has made a decision to explode.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ExplosionPrimeEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel;
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a human entity's food level changes
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FoodLevelChangeEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel = false;
|
||||
|
@ -5,7 +5,6 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class ItemDespawnEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean canceled;
|
||||
|
@ -8,10 +8,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when an item is spawned into a world
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ItemSpawnEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final Location location;
|
||||
private boolean canceled;
|
||||
|
||||
|
@ -7,10 +7,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Stores data for pigs being zapped
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PigZapEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean canceled;
|
||||
private final Entity pigzombie;
|
||||
private final Entity bolt;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Thrown whenever a {@link Player} dies
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerDeathEvent extends EntityDeathEvent {
|
||||
private int newExp = 0;
|
||||
private String deathMessage = "";
|
||||
|
@ -13,7 +13,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a splash potion hits an area
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PotionSplashEvent extends ProjectileHitEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancelled;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a projectile hits an object
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ProjectileHitEvent extends EntityEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
@ -5,7 +5,6 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
/**
|
||||
* Called when a sheep's wool is dyed
|
||||
*/
|
||||
|
@ -4,7 +4,6 @@ import org.bukkit.entity.Entity;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
/**
|
||||
* Called when a sheep regrows its wool
|
||||
*/
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a Slime splits into smaller Slimes upon death
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class SlimeSplitEvent extends EntityEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel;
|
||||
|
@ -9,7 +9,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when an ItemStack is successfully burned as fuel in a furnace.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FurnaceBurnEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Block furnace;
|
||||
|
@ -9,7 +9,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when an ItemStack is successfully smelted in a furnace.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class FurnaceSmeltEvent extends Event implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Block furnace;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.entity.Painting;
|
||||
/**
|
||||
* Triggered when a painting is removed by an entity
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PaintingBreakByEntityEvent extends PaintingBreakEvent {
|
||||
private final Entity remover;
|
||||
|
||||
|
@ -7,10 +7,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Triggered when a painting is removed
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PaintingBreakEvent extends PaintingEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean cancelled;
|
||||
private final RemoveCause cause;
|
||||
|
||||
|
@ -6,9 +6,7 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Represents a painting-related event.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class PaintingEvent extends Event {
|
||||
|
||||
protected Painting painting;
|
||||
|
||||
protected PaintingEvent(final Painting painting) {
|
||||
|
@ -10,12 +10,9 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Triggered when a painting is created in the world
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PaintingPlaceEvent extends PaintingEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean cancelled;
|
||||
|
||||
private final Player player;
|
||||
private final Block block;
|
||||
private final BlockFace blockFace;
|
||||
|
@ -7,10 +7,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Represents a player animation event
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final PlayerAnimationType animationType;
|
||||
private boolean isCancelled = false;
|
||||
|
||||
|
@ -8,10 +8,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* This event is fired when the player is almost about to enter the bed.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean cancel = false;
|
||||
private final Block bed;
|
||||
|
||||
|
@ -7,10 +7,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* This event is fired when the player is leaving a bed.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerBedLeaveEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final Block bed;
|
||||
|
||||
public PlayerBedLeaveEvent(final Player who, final Block bed) {
|
||||
|
@ -10,7 +10,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when a player empties a bucket
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerBucketEmptyEvent extends PlayerBucketEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
@ -7,9 +7,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable {
|
||||
|
||||
private ItemStack itemStack;
|
||||
private boolean cancelled = false;
|
||||
private final Block blockClicked;
|
||||
|
@ -10,7 +10,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
/**
|
||||
* Called when a player fills a bucket
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerBucketFillEvent extends PlayerBucketEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
@ -4,10 +4,8 @@ import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerChangedWorldEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private final World from;
|
||||
|
||||
public PlayerChangedWorldEvent(final Player player, final World from) {
|
||||
|
@ -11,7 +11,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Holds information for player chat and commands
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerChatEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel = false;
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
* Called early in the command handling process. This event is only
|
||||
* for very exceptional cases and you should not normally use it.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerCommandPreprocessEvent extends PlayerChatEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Thrown when a player drops an item from their inventory
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerDropItemEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Item drop;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a player throws an egg and it might hatch
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerEggThrowEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Egg egg;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.Event;
|
||||
/**
|
||||
* Represents a player related event
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class PlayerEvent extends Event {
|
||||
protected Player player;
|
||||
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a players experience changes naturally
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerExpChangeEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private int exp;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Thrown when a player is fishing
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerFishEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Entity entity;
|
||||
|
@ -5,10 +5,8 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerGameModeChangeEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private boolean cancelled;
|
||||
private final GameMode newGameMode;
|
||||
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Represents an event that is called when a player right clicks an entity.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerInteractEntityEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
protected Entity clickedEntity;
|
||||
|
@ -12,14 +12,12 @@ import org.bukkit.event.block.Action;
|
||||
/**
|
||||
* Called when a player interacts with an object or air.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerInteractEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
protected ItemStack item;
|
||||
protected Action action;
|
||||
protected Block blockClicked;
|
||||
protected BlockFace blockFace;
|
||||
|
||||
private Result useClickedBlock;
|
||||
private Result useItemInHand;
|
||||
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.inventory.Inventory;
|
||||
/**
|
||||
* Represents a player related inventory event
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerInventoryEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
protected Inventory inventory;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Fired when a player changes their currently held item
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerItemHeldEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final int previous;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a player joins a server
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerJoinEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private String joinMessage;
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a player gets kicked from the server
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerKickEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private String leaveMessage;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a players level changes
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerLevelChangeEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final int oldLevel;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Stores details for players attempting to log in
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerLoginEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Result result = Result.ALLOWED;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Holds information for player movement events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerMoveEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private boolean cancel = false;
|
||||
|
@ -8,7 +8,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Thrown when a player picks an item up from the ground
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerPickupItemEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Item item;
|
||||
|
@ -8,13 +8,9 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a player completes the portaling process by standing in a portal
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerPortalEvent extends PlayerTeleportEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
protected boolean useTravelAgent = true;
|
||||
|
||||
protected Player player;
|
||||
protected TravelAgent travelAgent;
|
||||
|
||||
public PlayerPortalEvent(final Player player, final Location from, final Location to, final TravelAgent pta) {
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Stores details for players attempting to log in
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerPreLoginEvent extends Event {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Result result;
|
||||
|
@ -6,10 +6,8 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a player leaves a server
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerQuitEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
private String quitMessage;
|
||||
|
||||
public PlayerQuitEvent(final Player who, final String quitMessage) {
|
||||
|
@ -4,7 +4,6 @@ import org.bukkit.Location;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerRespawnEvent extends PlayerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private Location respawnLocation;
|
||||
|
@ -5,7 +5,6 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
/**
|
||||
* Called when a player shears an entity
|
||||
*/
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Holds information for player teleport events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerTeleportEvent extends PlayerMoveEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private TeleportCause cause = TeleportCause.UNKNOWN;
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a player toggles their sneaking state
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final boolean isSneaking;
|
||||
|
@ -7,7 +7,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Called when a player toggles their sprinting state
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerToggleSprintEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final boolean isSprinting;
|
||||
|
@ -5,13 +5,8 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@SuppressWarnings("serial")
|
||||
public class PlayerVelocityEvent extends PlayerEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
/**
|
||||
* Holds information for player velocity events
|
||||
*/
|
||||
private boolean cancel = false;
|
||||
private Vector velocity;
|
||||
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.map.MapView;
|
||||
/**
|
||||
* Called when a map is initialized.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class MapInitializeEvent extends ServerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final MapView mapView;
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Called when a plugin is disabled.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PluginDisableEvent extends PluginEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Called when a plugin is enabled.
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class PluginEnableEvent extends PluginEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
@ -5,7 +5,6 @@ import org.bukkit.plugin.Plugin;
|
||||
/**
|
||||
* Used for plugin enable and disable events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public abstract class PluginEvent extends ServerEvent {
|
||||
private final Plugin plugin;
|
||||
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Remote Server Command events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class RemoteServerCommandEvent extends ServerCommandEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
||||
|
@ -6,7 +6,6 @@ import org.bukkit.event.HandlerList;
|
||||
/**
|
||||
* Server Command events
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
public class ServerCommandEvent extends ServerEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private String command;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user