diff --git a/paper-api/src/main/java/org/bukkit/entity/Sheep.java b/paper-api/src/main/java/org/bukkit/entity/Sheep.java index bae446805b..eb628a0b66 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Sheep.java +++ b/paper-api/src/main/java/org/bukkit/entity/Sheep.java @@ -1,24 +1,24 @@ -/** - * - */ -package org.bukkit.entity; -import org.bukkit.material.Colorable; - -/** - * Represents a Sheep. - * - * @author Cogito - * - */ -public interface Sheep extends Animals, Colorable { - /** - * @author Celtic Minstrel - * @return Whether the sheep is sheared. - */ - public boolean isSheared(); - /** - * @author Celtic Minstrel - * @param flag Whether to shear the sheep - */ - public void setSheared(boolean flag); -} +/** + * + */ +package org.bukkit.entity; +import org.bukkit.material.Colorable; + +/** + * Represents a Sheep. + * + * @author Cogito + * + */ +public interface Sheep extends Animals, Colorable { + /** + * @author Celtic Minstrel + * @return Whether the sheep is sheared. + */ + public boolean isSheared(); + /** + * @author Celtic Minstrel + * @param flag Whether to shear the sheep + */ + public void setSheared(boolean flag); +} diff --git a/paper-api/src/main/java/org/bukkit/entity/Slime.java b/paper-api/src/main/java/org/bukkit/entity/Slime.java index 1401ea63ef..174222ec73 100644 --- a/paper-api/src/main/java/org/bukkit/entity/Slime.java +++ b/paper-api/src/main/java/org/bukkit/entity/Slime.java @@ -1,23 +1,23 @@ -/** - * - */ -package org.bukkit.entity; - -/** - * Represents a Slime. - * - * @author Cogito - * - */ -public interface Slime extends LivingEntity { - /** - * @author Celtic Minstrel - * @return The size of the slime - */ - public int getSize(); - /** - * @author Celtic Minstrel - * @param sz The new size of the slime. - */ - public void setSize(int sz); -} +/** + * + */ +package org.bukkit.entity; + +/** + * Represents a Slime. + * + * @author Cogito + * + */ +public interface Slime extends LivingEntity { + /** + * @author Celtic Minstrel + * @return The size of the slime + */ + public int getSize(); + /** + * @author Celtic Minstrel + * @param sz The new size of the slime. + */ + public void setSize(int sz); +} diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockFromToEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockFromToEvent.java index 8308168611..f9cf832eea 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/BlockFromToEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/block/BlockFromToEvent.java @@ -1,49 +1,49 @@ -package org.bukkit.event.block; - -import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; -import org.bukkit.event.Cancellable; - -/** - * Holds information for events with a source block and a destination block - */ -public class BlockFromToEvent extends BlockEvent implements Cancellable { - protected Block to; - protected BlockFace face; - protected boolean cancel; - - public BlockFromToEvent(final Block block, final BlockFace face) { - super(Type.BLOCK_FROMTO, block); - this.face = face; - this.cancel = false; - } - - /** - * Gets the location this player moved to - * - * @return Block the block is event originated from - */ - public BlockFace getFace() { - return face; - } - - /** - * Convenience method for getting the faced block - * - * @return Block the faced block - */ - public Block getToBlock() { - if (to == null) { - to = block.getRelative(face.getModX(), face.getModY(), face.getModZ()); - } - return to; - } - - public boolean isCancelled() { - return cancel; - } - - public void setCancelled(boolean cancel) { - this.cancel = cancel; - } -} +package org.bukkit.event.block; + +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.event.Cancellable; + +/** + * Holds information for events with a source block and a destination block + */ +public class BlockFromToEvent extends BlockEvent implements Cancellable { + protected Block to; + protected BlockFace face; + protected boolean cancel; + + public BlockFromToEvent(final Block block, final BlockFace face) { + super(Type.BLOCK_FROMTO, block); + this.face = face; + this.cancel = false; + } + + /** + * Gets the location this player moved to + * + * @return Block the block is event originated from + */ + public BlockFace getFace() { + return face; + } + + /** + * Convenience method for getting the faced block + * + * @return Block the faced block + */ + public Block getToBlock() { + if (to == null) { + to = block.getRelative(face.getModX(), face.getModY(), face.getModZ()); + } + return to; + } + + public boolean isCancelled() { + return cancel; + } + + public void setCancelled(boolean cancel) { + this.cancel = cancel; + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByProjectileEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByProjectileEvent.java index 96529bd691..383dd3b1a3 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByProjectileEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityDamageByProjectileEvent.java @@ -1,35 +1,35 @@ -package org.bukkit.event.entity; - -import java.util.Random; - -import org.bukkit.entity.Entity; - -public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent { - - private Entity projectile; - private boolean bounce; - - public EntityDamageByProjectileEvent(Entity damager, Entity damagee, Entity projectile, DamageCause cause, int damage) { - super(damager, damagee, cause, damage); - this.projectile = projectile; - Random random = new Random(); - this.bounce = random.nextBoolean(); - } - - /** - * The projectile used to cause the event - * @return the projectile - */ - public Entity getProjectile() { - return projectile; - } - - public void setBounce(boolean bounce){ - this.bounce = bounce; - } - - public boolean getBounce(){ - return bounce; - } - -} +package org.bukkit.event.entity; + +import java.util.Random; + +import org.bukkit.entity.Entity; + +public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent { + + private Entity projectile; + private boolean bounce; + + public EntityDamageByProjectileEvent(Entity damager, Entity damagee, Entity projectile, DamageCause cause, int damage) { + super(damager, damagee, cause, damage); + this.projectile = projectile; + Random random = new Random(); + this.bounce = random.nextBoolean(); + } + + /** + * The projectile used to cause the event + * @return the projectile + */ + public Entity getProjectile() { + return projectile; + } + + public void setBounce(boolean bounce){ + this.bounce = bounce; + } + + public boolean getBounce(){ + return bounce; + } + +} diff --git a/paper-api/src/main/java/org/bukkit/event/entity/ExplosionPrimeEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/ExplosionPrimeEvent.java index 08903f648b..ec9087a42e 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/ExplosionPrimeEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/ExplosionPrimeEvent.java @@ -1,42 +1,42 @@ -package org.bukkit.event.entity; - -import org.bukkit.entity.Entity; -import org.bukkit.event.Cancellable; - -public class ExplosionPrimeEvent extends EntityEvent implements Cancellable { - private boolean cancel; - private float radius; - private boolean fire; - - public ExplosionPrimeEvent(Entity what, float radius, boolean fire) { - super(Type.EXPLOSION_PRIME, what); - this.cancel = false; - this.radius = radius; - this.fire = fire; - } - - public boolean isCancelled() { - return cancel; - } - - public void setCancelled(boolean cancel) { - this.cancel = cancel; - } - - public float getRadius() { - return radius; - } - - public void setRadius(float radius) { - this.radius = radius; - } - - public boolean getFire() { - return fire; - } - - public void setFire(boolean fire) { - this.fire = fire; - } - -} +package org.bukkit.event.entity; + +import org.bukkit.entity.Entity; +import org.bukkit.event.Cancellable; + +public class ExplosionPrimeEvent extends EntityEvent implements Cancellable { + private boolean cancel; + private float radius; + private boolean fire; + + public ExplosionPrimeEvent(Entity what, float radius, boolean fire) { + super(Type.EXPLOSION_PRIME, what); + this.cancel = false; + this.radius = radius; + this.fire = fire; + } + + public boolean isCancelled() { + return cancel; + } + + public void setCancelled(boolean cancel) { + this.cancel = cancel; + } + + public float getRadius() { + return radius; + } + + public void setRadius(float radius) { + this.radius = radius; + } + + public boolean getFire() { + return fire; + } + + public void setFire(boolean fire) { + this.fire = fire; + } + +} diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java index 9426dfb16e..8e7ffa8b7f 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerBucketEmptyEvent.java @@ -1,52 +1,52 @@ -package org.bukkit.event.player; - -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.block.BlockFace; -import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; -import org.bukkit.inventory.ItemStack; - -public class PlayerBucketEmptyEvent extends PlayerEvent implements Cancellable { - ItemStack itemStack; - boolean cancelled = false; - Block blockClicked; - BlockFace blockFace; - Material bucket; - - public PlayerBucketEmptyEvent(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand) { - super(Type.PLAYER_BUCKET_EMPTY, who); - this.blockClicked = blockClicked; - this.blockFace = blockFace; - this.itemStack = itemInHand; - this.bucket = bucket; - } - - public Material getBucket() { - return bucket; - } - - public ItemStack getItemStack() { - return itemStack; - } - - public Block getBlockClicked() { - return blockClicked; - } - - public BlockFace getBlockFace() { - return blockFace; - } - - public void setItemStack(ItemStack itemStack) { - this.itemStack = itemStack; - } - - public boolean isCancelled() { - return cancelled; - } - - public void setCancelled(boolean cancel) { - this.cancelled = cancel; - } -} +package org.bukkit.event.player; + +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.BlockFace; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; +import org.bukkit.inventory.ItemStack; + +public class PlayerBucketEmptyEvent extends PlayerEvent implements Cancellable { + ItemStack itemStack; + boolean cancelled = false; + Block blockClicked; + BlockFace blockFace; + Material bucket; + + public PlayerBucketEmptyEvent(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand) { + super(Type.PLAYER_BUCKET_EMPTY, who); + this.blockClicked = blockClicked; + this.blockFace = blockFace; + this.itemStack = itemInHand; + this.bucket = bucket; + } + + public Material getBucket() { + return bucket; + } + + public ItemStack getItemStack() { + return itemStack; + } + + public Block getBlockClicked() { + return blockClicked; + } + + public BlockFace getBlockFace() { + return blockFace; + } + + public void setItemStack(ItemStack itemStack) { + this.itemStack = itemStack; + } + + public boolean isCancelled() { + return cancelled; + } + + public void setCancelled(boolean cancel) { + this.cancelled = cancel; + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java index 9dbe8b44ef..3f061a3ac4 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerCommandPreprocessEvent.java @@ -1,9 +1,9 @@ -package org.bukkit.event.player; - -import org.bukkit.entity.Player; - -public class PlayerCommandPreprocessEvent extends PlayerChatEvent { - public PlayerCommandPreprocessEvent(Player player, String message) { - super(player, message); - } -} +package org.bukkit.event.player; + +import org.bukkit.entity.Player; + +public class PlayerCommandPreprocessEvent extends PlayerChatEvent { + public PlayerCommandPreprocessEvent(Player player, String message) { + super(player, message); + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java index 506fb90dd4..8434826067 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java @@ -1,104 +1,104 @@ - -package org.bukkit.event.player; - -import org.bukkit.entity.Player; - -/** - * Stores details for players attempting to log in - */ -public class PlayerLoginEvent extends PlayerEvent { - private Result result; - private String message; - - public PlayerLoginEvent(final Player player) { - super(Type.PLAYER_LOGIN, player); - this.result = Result.ALLOWED; - this.message = ""; - } - - public PlayerLoginEvent(final Type type, final Player player, final Result result, final String message) { - super(type, player); - this.result = result; - this.message = message; - } - - /** - * Gets the current result of the login, as an enum - * - * @return Current Result of the login - */ - public Result getResult() { - return result; - } - - /** - * Sets the new result of the login, as an enum - * - * @param result New result to set - */ - public void setResult(final Result result) { - this.result = result; - } - - /** - * Gets the current kick message that will be used if getResult() != Result.ALLOWED - * - * @return Current kick message - */ - public String getKickMessage() { - return message; - } - - /** - * Sets the kick message to display if getResult() != Result.ALLOWED - * - * @param message New kick message - */ - public void setKickMessage(final String message) { - this.message = message; - } - - /** - * Allows the player to log in - */ - public void allow() { - result = Result.ALLOWED; - message = ""; - } - - /** - * Disallows the player from logging in, with the given reason - * - * @param result New result for disallowing the player - * @param message Kick message to display to the user - */ - public void disallow(final Result result, final String message) { - this.result = result; - this.message = message; - } - - /** - * Basic kick reasons for communicating to plugins - */ - public enum Result { - /** - * The player is allowed to log in - */ - ALLOWED, - - /** - * The player is not allowed to log in, due to the server being full - */ - KICK_FULL, - - /** - * The player is not allowed to log in, due to them being banned - */ - KICK_BANNED, - - /** - * The player is not allowed to log in, for reasons undefined - */ - KICK_OTHER - } -} + +package org.bukkit.event.player; + +import org.bukkit.entity.Player; + +/** + * Stores details for players attempting to log in + */ +public class PlayerLoginEvent extends PlayerEvent { + private Result result; + private String message; + + public PlayerLoginEvent(final Player player) { + super(Type.PLAYER_LOGIN, player); + this.result = Result.ALLOWED; + this.message = ""; + } + + public PlayerLoginEvent(final Type type, final Player player, final Result result, final String message) { + super(type, player); + this.result = result; + this.message = message; + } + + /** + * Gets the current result of the login, as an enum + * + * @return Current Result of the login + */ + public Result getResult() { + return result; + } + + /** + * Sets the new result of the login, as an enum + * + * @param result New result to set + */ + public void setResult(final Result result) { + this.result = result; + } + + /** + * Gets the current kick message that will be used if getResult() != Result.ALLOWED + * + * @return Current kick message + */ + public String getKickMessage() { + return message; + } + + /** + * Sets the kick message to display if getResult() != Result.ALLOWED + * + * @param message New kick message + */ + public void setKickMessage(final String message) { + this.message = message; + } + + /** + * Allows the player to log in + */ + public void allow() { + result = Result.ALLOWED; + message = ""; + } + + /** + * Disallows the player from logging in, with the given reason + * + * @param result New result for disallowing the player + * @param message Kick message to display to the user + */ + public void disallow(final Result result, final String message) { + this.result = result; + this.message = message; + } + + /** + * Basic kick reasons for communicating to plugins + */ + public enum Result { + /** + * The player is allowed to log in + */ + ALLOWED, + + /** + * The player is not allowed to log in, due to the server being full + */ + KICK_FULL, + + /** + * The player is not allowed to log in, due to them being banned + */ + KICK_BANNED, + + /** + * The player is not allowed to log in, for reasons undefined + */ + KICK_OTHER + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java index 04a69a9404..b89d60e840 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java @@ -1,85 +1,85 @@ - -package org.bukkit.event.player; - -import org.bukkit.Location; -import org.bukkit.entity.Player; -import org.bukkit.event.Cancellable; - -/** - * Holds information for player movement and teleportation events - */ -public class PlayerMoveEvent extends PlayerEvent implements Cancellable { - private boolean cancel = false; - private Location from; - private Location to; - - public PlayerMoveEvent(final Player player, final Location from, final Location to) { - super(Type.PLAYER_MOVE, player); - this.from = from; - this.to = to; - } - - /** - * Gets the cancellation state of this event. A cancelled event will not - * be executed in the server, but will still pass to other plugins - * - * 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 - * - * @return true if this event is cancelled - */ - public boolean isCancelled() { - return cancel; - } - - /** - * Sets the cancellation state of this event. A cancelled event will not - * be executed in the server, but will still pass to other plugins - * - * 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 - * - * @param cancel true if you wish to cancel this event - */ - public void setCancelled(boolean cancel) { - this.cancel = cancel; - } - - /** - * Gets the location this player moved from - * - * @return Location the player moved from - */ - public Location getFrom() { - return from; - } - - /** - * Sets the location to mark as where the player moved from - * - * @param from New location to mark as the players previous location - */ - public void setFrom(Location from) { - this.from = from; - } - - /** - * Gets the location this player moved to - * - * @return Location the player moved to - */ - public Location getTo() { - return to; - } - - /** - * Sets the location that this player will move to - * - * @param to New Location this player will move to - */ - public void setTo(Location to) { - this.to = to; - } -} + +package org.bukkit.event.player; + +import org.bukkit.Location; +import org.bukkit.entity.Player; +import org.bukkit.event.Cancellable; + +/** + * Holds information for player movement and teleportation events + */ +public class PlayerMoveEvent extends PlayerEvent implements Cancellable { + private boolean cancel = false; + private Location from; + private Location to; + + public PlayerMoveEvent(final Player player, final Location from, final Location to) { + super(Type.PLAYER_MOVE, player); + this.from = from; + this.to = to; + } + + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * 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 + * + * @return true if this event is cancelled + */ + public boolean isCancelled() { + return cancel; + } + + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * 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 + * + * @param cancel true if you wish to cancel this event + */ + public void setCancelled(boolean cancel) { + this.cancel = cancel; + } + + /** + * Gets the location this player moved from + * + * @return Location the player moved from + */ + public Location getFrom() { + return from; + } + + /** + * Sets the location to mark as where the player moved from + * + * @param from New location to mark as the players previous location + */ + public void setFrom(Location from) { + this.from = from; + } + + /** + * Gets the location this player moved to + * + * @return Location the player moved to + */ + public Location getTo() { + return to; + } + + /** + * Sets the location that this player will move to + * + * @param to New Location this player will move to + */ + public void setTo(Location to) { + this.to = to; + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java index 5a63dc1dd2..d4c0e96d1f 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerQuitEvent.java @@ -1,9 +1,9 @@ -package org.bukkit.event.player; - -import org.bukkit.entity.Player; - -public class PlayerQuitEvent extends PlayerEvent { - public PlayerQuitEvent(Player who) { - super(Type.PLAYER_QUIT, who); - } -} +package org.bukkit.event.player; + +import org.bukkit.entity.Player; + +public class PlayerQuitEvent extends PlayerEvent { + public PlayerQuitEvent(Player who) { + super(Type.PLAYER_QUIT, who); + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java index 93fde0744e..2625edc7f6 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerTeleportEvent.java @@ -1,10 +1,10 @@ -package org.bukkit.event.player; - -import org.bukkit.Location; -import org.bukkit.entity.Player; - -public class PlayerTeleportEvent extends PlayerMoveEvent { - public PlayerTeleportEvent(Player player, Location from, Location to) { - super(player, from, to); - } -} +package org.bukkit.event.player; + +import org.bukkit.Location; +import org.bukkit.entity.Player; + +public class PlayerTeleportEvent extends PlayerMoveEvent { + public PlayerTeleportEvent(Player player, Location from, Location to) { + super(player, from, to); + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/server/PluginDisableEvent.java b/paper-api/src/main/java/org/bukkit/event/server/PluginDisableEvent.java index 729beb156c..47d9507859 100644 --- a/paper-api/src/main/java/org/bukkit/event/server/PluginDisableEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/server/PluginDisableEvent.java @@ -1,9 +1,9 @@ -package org.bukkit.event.server; - -import org.bukkit.plugin.Plugin; - -public class PluginDisableEvent extends PluginEvent { - public PluginDisableEvent(Plugin plugin) { - super(Type.PLUGIN_DISABLE, plugin); - } -} +package org.bukkit.event.server; + +import org.bukkit.plugin.Plugin; + +public class PluginDisableEvent extends PluginEvent { + public PluginDisableEvent(Plugin plugin) { + super(Type.PLUGIN_DISABLE, plugin); + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/server/PluginEnableEvent.java b/paper-api/src/main/java/org/bukkit/event/server/PluginEnableEvent.java index cbd2b3ce27..d280d8c074 100644 --- a/paper-api/src/main/java/org/bukkit/event/server/PluginEnableEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/server/PluginEnableEvent.java @@ -1,9 +1,9 @@ -package org.bukkit.event.server; - -import org.bukkit.plugin.Plugin; - -public class PluginEnableEvent extends PluginEvent { - public PluginEnableEvent(Plugin plugin) { - super(Type.PLUGIN_ENABLE, plugin); - } -} +package org.bukkit.event.server; + +import org.bukkit.plugin.Plugin; + +public class PluginEnableEvent extends PluginEvent { + public PluginEnableEvent(Plugin plugin) { + super(Type.PLUGIN_ENABLE, plugin); + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java index ee81e4431d..82e7230f51 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java @@ -1,22 +1,22 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.block.Block; -import org.bukkit.entity.Vehicle; - -/** - * Raised when a vehicle collides with a block. - * - * @author sk89q - */ -public class VehicleBlockCollisionEvent extends VehicleCollisionEvent { - private Block block; - - public VehicleBlockCollisionEvent(Vehicle vehicle, Block block) { - super(Type.VEHICLE_COLLISION_BLOCK, vehicle); - this.block = block; - } - - public Block getBlock() { - return block; - } -} +package org.bukkit.event.vehicle; + +import org.bukkit.block.Block; +import org.bukkit.entity.Vehicle; + +/** + * Raised when a vehicle collides with a block. + * + * @author sk89q + */ +public class VehicleBlockCollisionEvent extends VehicleCollisionEvent { + private Block block; + + public VehicleBlockCollisionEvent(Vehicle vehicle, Block block) { + super(Type.VEHICLE_COLLISION_BLOCK, vehicle); + this.block = block; + } + + public Block getBlock() { + return block; + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java index f3c20c33c2..66f8c9f77c 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java @@ -1,14 +1,14 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.entity.Vehicle; - -/** - * Raised when a vehicle is created. - * - * @author sk89q - */ -public class VehicleCreateEvent extends VehicleEvent { - public VehicleCreateEvent(Vehicle vehicle) { - super(Type.VEHICLE_CREATE, vehicle); - } -} +package org.bukkit.event.vehicle; + +import org.bukkit.entity.Vehicle; + +/** + * Raised when a vehicle is created. + * + * @author sk89q + */ +public class VehicleCreateEvent extends VehicleEvent { + public VehicleCreateEvent(Vehicle vehicle) { + super(Type.VEHICLE_CREATE, vehicle); + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java index 0b8c44adad..3b69361bf0 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java @@ -1,48 +1,48 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.entity.Entity; -import org.bukkit.entity.Vehicle; -import org.bukkit.event.Cancellable; - -/** - * Raised when a vehicle receives damage. - * - * @author sk89q - */ -public class VehicleDamageEvent extends VehicleEvent implements Cancellable { - private Entity attacker; - private int damage; - private boolean cancelled; - - public VehicleDamageEvent(Vehicle vehicle, Entity attacker, int damage) { - super(Type.VEHICLE_DAMAGE, vehicle); - this.attacker = attacker; - this.damage = damage; - } - - public Entity getAttacker() { - return attacker; - } - - public int getDamage() { - return damage; - } - - /** - * Change the damage. - * - * @param damage - */ - public void setDamage(int damage) { - this.damage = damage; - } - - public boolean isCancelled() { - return cancelled; - } - - public void setCancelled(boolean cancel) { - this.cancelled = cancel; - } - -} +package org.bukkit.event.vehicle; + +import org.bukkit.entity.Entity; +import org.bukkit.entity.Vehicle; +import org.bukkit.event.Cancellable; + +/** + * Raised when a vehicle receives damage. + * + * @author sk89q + */ +public class VehicleDamageEvent extends VehicleEvent implements Cancellable { + private Entity attacker; + private int damage; + private boolean cancelled; + + public VehicleDamageEvent(Vehicle vehicle, Entity attacker, int damage) { + super(Type.VEHICLE_DAMAGE, vehicle); + this.attacker = attacker; + this.damage = damage; + } + + public Entity getAttacker() { + return attacker; + } + + public int getDamage() { + return damage; + } + + /** + * Change the damage. + * + * @param damage + */ + public void setDamage(int damage) { + this.damage = damage; + } + + public boolean isCancelled() { + return cancelled; + } + + public void setCancelled(boolean cancel) { + this.cancelled = cancel; + } + +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java index ca76c9590d..a3b2b9701a 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java @@ -1,37 +1,37 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.entity.Entity; -import org.bukkit.entity.Vehicle; -import org.bukkit.event.Cancellable; - -/** - * Raised when an entity enters a vehicle. - * - * @author sk89q - */ -public class VehicleEnterEvent extends VehicleEvent implements Cancellable { - private boolean cancelled; - private Entity entered; - - public VehicleEnterEvent(Vehicle vehicle, Entity entered) { - super(Type.VEHICLE_ENTER, vehicle); - this.entered = entered; - } - - /** - * Get the entity that entered the vehicle. - * - * @return - */ - public Entity getEntered() { - return entered; - } - - public boolean isCancelled() { - return cancelled; - } - - public void setCancelled(boolean cancel) { - this.cancelled = cancel; - } -} +package org.bukkit.event.vehicle; + +import org.bukkit.entity.Entity; +import org.bukkit.entity.Vehicle; +import org.bukkit.event.Cancellable; + +/** + * Raised when an entity enters a vehicle. + * + * @author sk89q + */ +public class VehicleEnterEvent extends VehicleEvent implements Cancellable { + private boolean cancelled; + private Entity entered; + + public VehicleEnterEvent(Vehicle vehicle, Entity entered) { + super(Type.VEHICLE_ENTER, vehicle); + this.entered = entered; + } + + /** + * Get the entity that entered the vehicle. + * + * @return + */ + public Entity getEntered() { + return entered; + } + + public boolean isCancelled() { + return cancelled; + } + + public void setCancelled(boolean cancel) { + this.cancelled = cancel; + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java index 832729f8ae..0fbae0845f 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java @@ -1,50 +1,50 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.entity.Entity; -import org.bukkit.entity.Vehicle; -import org.bukkit.event.Cancellable; - -/** - * Raised when a vehicle collides with an entity. - * - * @author sk89q - */ -public class VehicleEntityCollisionEvent extends VehicleCollisionEvent implements Cancellable { - private Entity entity; - private boolean cancelled = false; - private boolean cancelledPickup = false; - private boolean cancelledCollision = false; - - public VehicleEntityCollisionEvent(Vehicle vehicle, Entity entity) { - super(Type.VEHICLE_COLLISION_ENTITY, vehicle); - this.entity = entity; - } - - public Entity getEntity() { - return entity; - } - - public boolean isCancelled() { - return cancelled; - } - - public void setCancelled(boolean cancel) { - this.cancelled = cancel; - } - - public boolean isPickupCancelled() { - return cancelledPickup; - } - - public void setPickupCancelled(boolean cancel) { - cancelledPickup = cancel; - } - - public boolean isCollisionCancelled() { - return cancelledCollision; - } - - public void setCollisionCancelled(boolean cancel) { - cancelledCollision = cancel; - } -} +package org.bukkit.event.vehicle; + +import org.bukkit.entity.Entity; +import org.bukkit.entity.Vehicle; +import org.bukkit.event.Cancellable; + +/** + * Raised when a vehicle collides with an entity. + * + * @author sk89q + */ +public class VehicleEntityCollisionEvent extends VehicleCollisionEvent implements Cancellable { + private Entity entity; + private boolean cancelled = false; + private boolean cancelledPickup = false; + private boolean cancelledCollision = false; + + public VehicleEntityCollisionEvent(Vehicle vehicle, Entity entity) { + super(Type.VEHICLE_COLLISION_ENTITY, vehicle); + this.entity = entity; + } + + public Entity getEntity() { + return entity; + } + + public boolean isCancelled() { + return cancelled; + } + + public void setCancelled(boolean cancel) { + this.cancelled = cancel; + } + + public boolean isPickupCancelled() { + return cancelledPickup; + } + + public void setPickupCancelled(boolean cancel) { + cancelledPickup = cancel; + } + + public boolean isCollisionCancelled() { + return cancelledCollision; + } + + public void setCollisionCancelled(boolean cancel) { + cancelledCollision = cancel; + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java index 126b875f16..263efe8039 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java @@ -1,37 +1,37 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Vehicle; -import org.bukkit.event.Cancellable; - -/** - * Raised when a living entity exits a vehicle. - * - * @author sk89q - */ -public class VehicleExitEvent extends VehicleEvent implements Cancellable { - private boolean cancelled; - private LivingEntity exited; - - public VehicleExitEvent(Vehicle vehicle, LivingEntity exited) { - super(Type.VEHICLE_EXIT, vehicle); - this.exited = exited; - } - - /** - * Get the living entity that exited the vehicle. - * - * @return - */ - public LivingEntity getExited() { - return exited; - } - - public boolean isCancelled() { - return cancelled; - } - - public void setCancelled(boolean cancel) { - this.cancelled = cancel; - } -} +package org.bukkit.event.vehicle; + +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Vehicle; +import org.bukkit.event.Cancellable; + +/** + * Raised when a living entity exits a vehicle. + * + * @author sk89q + */ +public class VehicleExitEvent extends VehicleEvent implements Cancellable { + private boolean cancelled; + private LivingEntity exited; + + public VehicleExitEvent(Vehicle vehicle, LivingEntity exited) { + super(Type.VEHICLE_EXIT, vehicle); + this.exited = exited; + } + + /** + * Get the living entity that exited the vehicle. + * + * @return + */ + public LivingEntity getExited() { + return exited; + } + + public boolean isCancelled() { + return cancelled; + } + + public void setCancelled(boolean cancel) { + this.cancelled = cancel; + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleListener.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleListener.java index 7795b37b7d..e1cc775918 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleListener.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleListener.java @@ -1,78 +1,78 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.event.Listener; - -/** - * Listener for vehicle events. - * - * @author sk89q - */ -public class VehicleListener implements Listener { - public VehicleListener() { - } - - /** - * Called when a vehicle is created by a player. This hook will be called - * for all vehicles created. - * - * @param event - */ - public void onVehicleCreate(VehicleCreateEvent event) { - } - - /** - * Called when a vehicle is damaged by the player. - * - * @param event - */ - public void onVehicleDamage(VehicleDamageEvent event) { - } - - /** - * Called when a vehicle collides with a block. - * - * @param event - */ - public void onVehicleBlockCollision(VehicleBlockCollisionEvent event) { - } - - /** - * Called when a vehicle collides with an entity. - * - * @param event - */ - public void onVehicleEntityCollision(VehicleEntityCollisionEvent event) { - } - - /** - * Called when an entity enters a vehicle. - * - * @param event - */ - public void onVehicleEnter(VehicleEnterEvent event) { - } - - /** - * Called when an entity exits a vehicle. - * - * @param event - */ - public void onVehicleExit(VehicleExitEvent event) { - } - - /** - * Called when an vehicle moves. - * - * @param event - */ - public void onVehicleMove(VehicleMoveEvent event) { - } - - /** - * Called when a vehicle goes through an update cycle - * - * @param event - */ - public void onVehicleUpdate(VehicleUpdateEvent event) { - } -} +package org.bukkit.event.vehicle; + +import org.bukkit.event.Listener; + +/** + * Listener for vehicle events. + * + * @author sk89q + */ +public class VehicleListener implements Listener { + public VehicleListener() { + } + + /** + * Called when a vehicle is created by a player. This hook will be called + * for all vehicles created. + * + * @param event + */ + public void onVehicleCreate(VehicleCreateEvent event) { + } + + /** + * Called when a vehicle is damaged by the player. + * + * @param event + */ + public void onVehicleDamage(VehicleDamageEvent event) { + } + + /** + * Called when a vehicle collides with a block. + * + * @param event + */ + public void onVehicleBlockCollision(VehicleBlockCollisionEvent event) { + } + + /** + * Called when a vehicle collides with an entity. + * + * @param event + */ + public void onVehicleEntityCollision(VehicleEntityCollisionEvent event) { + } + + /** + * Called when an entity enters a vehicle. + * + * @param event + */ + public void onVehicleEnter(VehicleEnterEvent event) { + } + + /** + * Called when an entity exits a vehicle. + * + * @param event + */ + public void onVehicleExit(VehicleExitEvent event) { + } + + /** + * Called when an vehicle moves. + * + * @param event + */ + public void onVehicleMove(VehicleMoveEvent event) { + } + + /** + * Called when a vehicle goes through an update cycle + * + * @param event + */ + public void onVehicleUpdate(VehicleUpdateEvent event) { + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java index 034fa578f9..61c401d3a3 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java @@ -1,39 +1,39 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.Location; -import org.bukkit.entity.Vehicle; - -/** - * Raised when a vehicle moves. - * - * @author sk89q - */ -public class VehicleMoveEvent extends VehicleEvent { - private Location from; - private Location to; - - public VehicleMoveEvent(Vehicle vehicle, Location from, Location to) { - super(Type.VEHICLE_MOVE, vehicle); - - this.from = from; - this.to = to; - } - - /** - * Get the previous position. - * - * @return - */ - public Location getFrom() { - return from; - } - - /** - * Get the next position. - * - * @return - */ - public Location getTo() { - return to; - } -} +package org.bukkit.event.vehicle; + +import org.bukkit.Location; +import org.bukkit.entity.Vehicle; + +/** + * Raised when a vehicle moves. + * + * @author sk89q + */ +public class VehicleMoveEvent extends VehicleEvent { + private Location from; + private Location to; + + public VehicleMoveEvent(Vehicle vehicle, Location from, Location to) { + super(Type.VEHICLE_MOVE, vehicle); + + this.from = from; + this.to = to; + } + + /** + * Get the previous position. + * + * @return + */ + public Location getFrom() { + return from; + } + + /** + * Get the next position. + * + * @return + */ + public Location getTo() { + return to; + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleUpdateEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleUpdateEvent.java index d53eef9f59..814e14e98a 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleUpdateEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleUpdateEvent.java @@ -1,9 +1,9 @@ -package org.bukkit.event.vehicle; - -import org.bukkit.entity.Vehicle; - -public class VehicleUpdateEvent extends VehicleEvent { - public VehicleUpdateEvent(Vehicle vehicle) { - super(Type.VEHICLE_UPDATE, vehicle); - } -} +package org.bukkit.event.vehicle; + +import org.bukkit.entity.Vehicle; + +public class VehicleUpdateEvent extends VehicleEvent { + public VehicleUpdateEvent(Vehicle vehicle) { + super(Type.VEHICLE_UPDATE, vehicle); + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/world/ChunkEvent.java b/paper-api/src/main/java/org/bukkit/event/world/ChunkEvent.java index 00e5c0957d..2500e0165c 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/ChunkEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/ChunkEvent.java @@ -1,15 +1,15 @@ -package org.bukkit.event.world; - -import org.bukkit.Chunk; - -public class ChunkEvent extends WorldEvent { +package org.bukkit.event.world; + +import org.bukkit.Chunk; + +public class ChunkEvent extends WorldEvent { protected Chunk chunk; - protected ChunkEvent(Type type, Chunk chunk) { - super(type, chunk.getWorld()); - this.chunk = chunk; - } - + protected ChunkEvent(Type type, Chunk chunk) { + super(type, chunk.getWorld()); + this.chunk = chunk; + } + /** * Gets the chunk being loaded/unloaded * @@ -18,4 +18,4 @@ public class ChunkEvent extends WorldEvent { public Chunk getChunk() { return chunk; } -} +} diff --git a/paper-api/src/main/java/org/bukkit/event/world/WorldLoadEvent.java b/paper-api/src/main/java/org/bukkit/event/world/WorldLoadEvent.java index 8194941680..24b749f6eb 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/WorldLoadEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/WorldLoadEvent.java @@ -1,9 +1,9 @@ -package org.bukkit.event.world; - -import org.bukkit.World; - -public class WorldLoadEvent extends WorldEvent { - public WorldLoadEvent(World world) { - super(Type.WORLD_LOAD, world); - } -} +package org.bukkit.event.world; + +import org.bukkit.World; + +public class WorldLoadEvent extends WorldEvent { + public WorldLoadEvent(World world) { + super(Type.WORLD_LOAD, world); + } +} diff --git a/paper-api/src/main/java/org/bukkit/event/world/WorldSaveEvent.java b/paper-api/src/main/java/org/bukkit/event/world/WorldSaveEvent.java index c7de1271a9..fec1e002dc 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/WorldSaveEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/WorldSaveEvent.java @@ -1,9 +1,9 @@ -package org.bukkit.event.world; - -import org.bukkit.World; - -public class WorldSaveEvent extends WorldEvent { - public WorldSaveEvent(World world) { - super(Type.WORLD_SAVE, world); - } -} +package org.bukkit.event.world; + +import org.bukkit.World; + +public class WorldSaveEvent extends WorldEvent { + public WorldSaveEvent(World world) { + super(Type.WORLD_SAVE, world); + } +}