diff --git a/paper-api/src/main/java/org/bukkit/event/CustomEventListener.java b/paper-api/src/main/java/org/bukkit/event/CustomEventListener.java index fc9a7b5fb5..7fdf9b9af2 100644 --- a/paper-api/src/main/java/org/bukkit/event/CustomEventListener.java +++ b/paper-api/src/main/java/org/bukkit/event/CustomEventListener.java @@ -9,7 +9,7 @@ public class CustomEventListener implements Listener { public CustomEventListener() {} /** - * Called when a player joins a server + * Called when a custom event is fired * * @param event Relevant event details */ diff --git a/paper-api/src/main/java/org/bukkit/event/Event.java b/paper-api/src/main/java/org/bukkit/event/Event.java index b1b3d4e5a7..e6f309646c 100644 --- a/paper-api/src/main/java/org/bukkit/event/Event.java +++ b/paper-api/src/main/java/org/bukkit/event/Event.java @@ -26,6 +26,7 @@ public abstract class Event implements Serializable { /** * Gets the Type of this event + * * @return Event type that this object represents */ public final Type getType() { @@ -89,6 +90,7 @@ public abstract class Event implements Serializable { /** * Represents Player-based events + * * @see Category.LIVING_ENTITY */ PLAYER, @@ -109,7 +111,7 @@ public abstract class Event implements Serializable { */ WEATHER, /** - * Vehicle-based events + * Represents Vehicle-based events */ VEHICLE, /** @@ -125,7 +127,7 @@ public abstract class Event implements Serializable { */ INVENTORY, /** - * Any miscellaneous events + * Represents any miscellaneous events */ MISCELLANEOUS; } @@ -144,7 +146,7 @@ public abstract class Event implements Serializable { /** * Called when a player enters the world on a server * - * @see org.bukkit.event.player.PlayerEvent + * @see org.bukkit.event.player.PlayerJoinEvent */ PLAYER_JOIN (Category.PLAYER), /** @@ -162,13 +164,13 @@ public abstract class Event implements Serializable { /** * Called when a player respawns * - * @see org.bukkit.event.player.PlayerEvent + * @see org.bukkit.event.player.PlayerRespawnEvent */ PLAYER_RESPAWN (Category.PLAYER), /** - * Called when a player gets kicked a server + * Called when a player gets kicked from the server * - * @see org.bukkit.event.player.PlayerEvent + * @see org.bukkit.event.player.PlayerKickEvent */ PLAYER_KICK (Category.PLAYER), /** @@ -178,15 +180,15 @@ public abstract class Event implements Serializable { */ PLAYER_CHAT (Category.PLAYER), /** - * Called when a player early in the command handling process + * Called when a player uses a command (early in the command handling process) * - * @see org.bukkit.event.player.PlayerChatEvent + * @see org.bukkit.event.player.PlayerCommandPreprocessEvent */ PLAYER_COMMAND_PREPROCESS (Category.PLAYER), /** - * Called when a player leaves a server + * Called when a player leaves the server * - * @see org.bukkit.event.player.PlayerEvent + * @see org.bukkit.event.player.PlayerQuitEvent */ PLAYER_QUIT (Category.PLAYER), /** @@ -196,7 +198,7 @@ public abstract class Event implements Serializable { */ PLAYER_MOVE (Category.PLAYER), /** - * Called when a player undergoes an animation, such as arm swinging + * Called when a player undergoes an animation (Arm Swing is the only animation currently supported) * * @see org.bukkit.event.player.PlayerAnimationEvent */ @@ -204,13 +206,13 @@ public abstract class Event implements Serializable { /** * Called when a player toggles sneak mode * - * @todo: add javadoc see comment + * @see org.bukkit.event.player.PlayerToggleSneakEvent */ PLAYER_TOGGLE_SNEAK (Category.PLAYER), /** - * Called when a player uses an item + * Called when a player interacts with an object or air * - * @see org.bukkit.event.player.PlayerItemEvent + * @see org.bukkit.event.player.PlayerInteractEvent */ PLAYER_INTERACT (Category.PLAYER), /** @@ -220,7 +222,7 @@ public abstract class Event implements Serializable { */ PLAYER_INTERACT_ENTITY (Category.PLAYER), /** - * Called when a player throws an egg and it might hatch + * Called when a player throws an egg * * @see org.bukkit.event.player.PlayerEggThrowEvent */ @@ -228,7 +230,7 @@ public abstract class Event implements Serializable { /** * Called when a player teleports from one position to another * - * @see org.bukkit.event.player.PlayerMoveEvent + * @see org.bukkit.event.player.PlayerTeleportEvent */ PLAYER_TELEPORT (Category.PLAYER), /** @@ -282,7 +284,7 @@ public abstract class Event implements Serializable { /** * Called when a player leaves a bed * - * @see org.bukkit.event.player.PlayerBedEnterEvent + * @see org.bukkit.event.player.PlayerBedLeaveEvent */ PLAYER_BED_LEAVE(Category.PLAYER), @@ -337,7 +339,7 @@ public abstract class Event implements Serializable { /** * Called when a block dispenses something * - * @see org.bukkit.event.block.BlockPlaceEvent + * @see org.bukkit.event.block.BlockDispenseEvent */ BLOCK_DISPENSE (Category.BLOCK), /** @@ -363,11 +365,11 @@ public abstract class Event implements Serializable { * that are actually capable of transmitting or carrying a redstone * current * - * @see org.bukkit.event.block.BlockFromToEvent + * @see org.bukkit.event.block.BlockRedstoneEvent */ REDSTONE_CHANGE (Category.BLOCK), /** - * Called when a block is destroyed by a player. + * Called when a block is broken by a player * * @see org.bukkit.event.block.BlockBreakEvent */ @@ -431,14 +433,12 @@ public abstract class Event implements Serializable { * @todo: add javadoc see comment */ INVENTORY_TRANSACTION (Category.INVENTORY), - /** * Called when an ItemStack is successfully smelted in a furnace. * * @see org.bukkit.event.inventory.FurnaceSmeltEvent */ FURNACE_SMELT (Category.INVENTORY), - /** * Called when an ItemStack is successfully burned as fuel in a furnace. * @@ -453,19 +453,19 @@ public abstract class Event implements Serializable { /** * Called when a plugin is enabled * - * @see org.bukkit.event.server.PluginEvent + * @see org.bukkit.event.server.PluginEnableEvent */ PLUGIN_ENABLE (Category.SERVER), /** * Called when a plugin is disabled * - * @see org.bukkit.event.server.PluginEvent + * @see org.bukkit.event.server.PluginDisableEvent */ PLUGIN_DISABLE (Category.SERVER), /** * Called when a server command is called * - * @see org.bukkit.event.server.PluginEvent + * @see org.bukkit.event.server.ServerCommandEvent */ SERVER_COMMAND (Category.SERVER), @@ -511,18 +511,25 @@ public abstract class Event implements Serializable { /** * Called when a world is saved * + * @see org.bukkit.event.world.WorldSaveEvent */ WORLD_SAVE (Category.WORLD), /** * Called when a World is initializing + * + * @see org.bukkit.event.world.WorldInitEvent */ WORLD_INIT (Category.WORLD), /** * Called when a World is loaded + * + * @see org.bukkit.event.world.WorldLoadEvent */ WORLD_LOAD (Category.WORLD), /** * Called when a World is unloaded + * + * @see org.bukkit.event.world.WorldUnloadEvent */ WORLD_UNLOAD (Category.WORLD), /** @@ -539,13 +546,13 @@ public abstract class Event implements Serializable { /** * Called when a painting is placed by player * - * @see org.bukkit.event.painting.PaintingCreateEvent + * @see org.bukkit.event.painting.PaintingPlaceEvent */ PAINTING_PLACE (Category.ENTITY), /** * Called when a painting is removed * - * @see org.bukkit.event.painting.PaintingRemoveEvent + * @see org.bukkit.event.painting.PaintingBreakEvent */ PAINTING_BREAK (Category.ENTITY), /** @@ -563,7 +570,7 @@ public abstract class Event implements Serializable { * Called when a creature, either hostile or neutral, attempts to spawn * in the world "naturally" * - * @todo: add javadoc see comment + * @see org.bukkit.event.entity.CreatureSpawnEvent */ CREATURE_SPAWN (Category.LIVING_ENTITY), /** @@ -575,19 +582,19 @@ public abstract class Event implements Serializable { /** * Called when a LivingEntity dies * - * @todo: add javadoc see comment + * @see org.bukkit.event.entity.EntityDeathEvent */ ENTITY_DEATH (Category.LIVING_ENTITY), /** * Called when a Skeleton or Zombie catch fire due to the sun * - * @todo: add javadoc see comment + * @see org.bukkit.event.entity.EntityCombustEvent */ ENTITY_COMBUST (Category.LIVING_ENTITY), /** * Called when an entity explodes, either TNT, Creeper, or Ghast Fireball * - * @todo: add javadoc see comment + * @see org.bukkit.event.entity.EntityExplodeEvent */ ENTITY_EXPLODE (Category.LIVING_ENTITY), /** @@ -600,7 +607,7 @@ public abstract class Event implements Serializable { * For EntityCreeper, this resets the fuse but does not kill the Entity. * For EntityFireball and EntityTNTPrimed....? * - * @see org.bukkit.event.entity.EntityExplodeTriggerEvent + * @see org.bukkit.event.entity.ExplosionPrimeEvent */ EXPLOSION_PRIME (Category.LIVING_ENTITY), /** diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockBreakEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockBreakEvent.java index 9b3bf2d303..b2f16c53a4 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/BlockBreakEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/block/BlockBreakEvent.java @@ -19,9 +19,9 @@ public class BlockBreakEvent extends BlockEvent implements Cancellable { } /** - * Returns the player doing the damage + * Gets the Player that is breaking the block * - * @return the Player doing the damage + * @return the Player that is breaking the block */ public Player getPlayer() { return player; diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockDamageEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockDamageEvent.java index e9981a37d0..bc57010d48 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/BlockDamageEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/block/BlockDamageEvent.java @@ -6,7 +6,7 @@ import org.bukkit.event.Cancellable; import org.bukkit.inventory.ItemStack; /** - * Called when a block is damaged by a player + * Called when a block is damaged (hit by a player) */ public class BlockDamageEvent extends BlockEvent implements Cancellable { private Player player; diff --git a/paper-api/src/main/java/org/bukkit/event/block/BlockDispenseEvent.java b/paper-api/src/main/java/org/bukkit/event/block/BlockDispenseEvent.java index 0ca39ab6f4..0251aba9da 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/BlockDispenseEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/block/BlockDispenseEvent.java @@ -59,14 +59,20 @@ public class BlockDispenseEvent extends BlockEvent implements Cancellable { } /** - * Check to see if the event was cancelled. + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled */ public boolean isCancelled() { return cancelled; } /** - * Prevent dispensing. + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event */ public void setCancelled(boolean cancel) { cancelled = cancel; diff --git a/paper-api/src/main/java/org/bukkit/event/block/SignChangeEvent.java b/paper-api/src/main/java/org/bukkit/event/block/SignChangeEvent.java index d10022e205..9b2853e4f1 100644 --- a/paper-api/src/main/java/org/bukkit/event/block/SignChangeEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/block/SignChangeEvent.java @@ -41,6 +41,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable { * * @param index index of the line to get * @return String line + * @throws IndexOutOfBoundsException */ public String getLine(int index) throws IndexOutOfBoundsException { return lines[index]; @@ -51,6 +52,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable { * * @param index index of the line to set * @param line text to set + * @throws IndexOutOfBoundsException */ public void setLine(int index, String line) throws IndexOutOfBoundsException { lines[index] = line; diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java index 63f04ab251..7f7a237bea 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java @@ -4,8 +4,7 @@ import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; /** - * The event when a skeleton or zombie catch on fire due to the sun. - * If the event is cancelled, the fire is stopped. + * Called when an entity combusts due to the sun */ public class EntityCombustEvent extends EntityEvent implements Cancellable { private boolean cancel; @@ -15,10 +14,22 @@ public class EntityCombustEvent extends EntityEvent implements Cancellable { this.cancel = false; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @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 + * + * @param cancel true if you wish to cancel this event + */ 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 ec1845789d..760f40558e 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 @@ -5,6 +5,9 @@ import java.util.Random; import org.bukkit.entity.Entity; import org.bukkit.entity.Projectile; +/** + * Called when an entity is damaged by a projectile + */ public class EntityDamageByProjectileEvent extends EntityDamageByEntityEvent { private Projectile projectile; diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java index 23888ba8c5..c477972180 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityExplodeEvent.java @@ -7,8 +7,7 @@ import org.bukkit.Location; import org.bukkit.event.Cancellable; /** - * - * @author SpeaKeasY + * Called when an entity explodes */ public class EntityExplodeEvent extends EntityEvent implements Cancellable { private boolean cancel; @@ -23,10 +22,22 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable { this.blocks = blocks; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @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 + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancel = cancel; } @@ -50,6 +61,7 @@ public class EntityExplodeEvent extends EntityEvent implements Cancellable { /** * Returns the percentage of blocks to drop from this explosion + * * @return */ public float getYield() { diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityInteractEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityInteractEvent.java index b8f23ca5f3..dba5572e77 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityInteractEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityInteractEvent.java @@ -5,8 +5,7 @@ import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; /** - * - * @author durron597 + * Called when an entity interacts with an object * */ public class EntityInteractEvent extends EntityEvent implements Cancellable { diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityListener.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityListener.java index 64076e4982..bafcfdc743 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityListener.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityListener.java @@ -10,37 +10,122 @@ import org.bukkit.event.painting.PaintingBreakEvent; public class EntityListener implements Listener { public EntityListener() {} + /** + * Called when a creature is spawned into a world + * + * @param event Relevant event details + */ public void onCreatureSpawn(CreatureSpawnEvent event) {} + /** + * Called when an item is spawned into a world + * + * @param event Relevant event details + */ public void onItemSpawn(ItemSpawnEvent event) {} + /** + * Called when an entity combusts due to the sun + * + * @param event Relevant event details + */ public void onEntityCombust(EntityCombustEvent event) {} + /** + * Called when an entity is damaged + * + * @param event Relevant event details + */ public void onEntityDamage(EntityDamageEvent event) {} + /** + * Called when an entity explodes + * + * @param event Relevant event details + */ public void onEntityExplode(EntityExplodeEvent event) {} + /** + * Called when an entity's fuse is lit + * + * @param event Relevant event details + */ public void onExplosionPrime(ExplosionPrimeEvent event) {} + /** + * Called when an entity dies + * + * @param event Relevant event details + */ public void onEntityDeath(EntityDeathEvent event) {} + /** + * Called when a creature targets another entity + * + * @param event Relevant event details + */ public void onEntityTarget(EntityTargetEvent event) {} + /** + * Called when an entity interacts with an object + * + * @param event Relevant event details + */ public void onEntityInteract(EntityInteractEvent event) {} + /** + * Called when an entity enters a portal + * + * @param event Relevant event details + */ public void onEntityPortalEnter(EntityPortalEnterEvent event) {} + /** + * Called when a painting is placed + * + * @param event Relevant event details + */ public void onPaintingPlace(PaintingPlaceEvent event) {} + /** + * Called when a painting is broken + * + * @param event Relevant event details + */ public void onPaintingBreak(PaintingBreakEvent event) {} + /** + * Called when a Pig is struck by lightning + * + * @param event Relevant event details + */ public void onPigZap(PigZapEvent event) {} + /** + * Called when a Creeper is struck by lightning + * + * @param event Relevant event details + */ public void onCreeperPower(CreeperPowerEvent event) {} + /** + * Called when an entity is tamed (currently only applies to Wolves) + * + * @param event Relevant event details + */ public void onEntityTame(EntityTameEvent event) {} + /** + * Called when an entity regains health (currently only applies to Players) + * + * @param event Relevant event details + */ public void onEntityRegainHealth(EntityRegainHealthEvent event) {} + /** + * Called when a project hits an object + * + * @param event Relevant event details + */ public void onProjectileHit(ProjectileHitEvent event) {} } diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityPortalEnterEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityPortalEnterEvent.java index f0c0193650..bd309b4780 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityPortalEnterEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityPortalEnterEvent.java @@ -5,7 +5,6 @@ import org.bukkit.entity.Entity; import org.bukkit.Location; import org.bukkit.event.Cancellable; - /** * Stores data for entities standing inside a portal block */ @@ -18,8 +17,9 @@ public class EntityPortalEnterEvent extends EntityEvent { this.location = location; } - /* + /** * Gets the portal block the entity is touching + * * @return The portal block the entity is touching */ public Location getLocation() { diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java index 4340e300f8..f886727b5a 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityRegainHealthEvent.java @@ -12,14 +12,12 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable private boolean cancelled; private int amount; - public EntityRegainHealthEvent(Entity entity, int amount) - { + public EntityRegainHealthEvent(Entity entity, int amount) { super(Event.Type.ENTITY_REGAIN_HEALTH, entity); this.amount = amount; } - protected EntityRegainHealthEvent(Event.Type type, Entity entity, int amount) - { + protected EntityRegainHealthEvent(Event.Type type, Entity entity, int amount) { super(type, entity); this.amount = amount; } @@ -28,13 +26,14 @@ public class EntityRegainHealthEvent extends EntityEvent implements Cancellable * Gets the amount of regained health * @return The amount of health regained */ - public int getAmount() - { + public int getAmount() { return amount; } /** * Sets the amount of regained health + * + * @param amount the amount of health the entity will regain */ public void setAmount(int amount) { this.amount = amount; diff --git a/paper-api/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java index 7d5af02ce1..228686aba9 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/EntityTargetEvent.java @@ -4,8 +4,7 @@ import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; /** - * This event is fired when a mob (or any creature) targets another entity - * @author tkelly + * Called when a creature targets another entity */ public class EntityTargetEvent extends EntityEvent implements Cancellable { private boolean cancel; @@ -19,14 +18,21 @@ public class EntityTargetEvent extends EntityEvent implements Cancellable { this.reason = reason; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return cancel; } /** - * Cancel the change in target. The entity will remain with their original - * target, whether that is nothing or another entity. - * @param 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 + * + * @param cancel true if you wish to cancel this event */ public void setCancelled(boolean cancel) { this.cancel = cancel; 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 55c9f64cda..b163efe8c8 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 @@ -4,6 +4,9 @@ import org.bukkit.entity.Entity; import org.bukkit.entity.Explosive; import org.bukkit.event.Cancellable; +/** + * Called when an entity has made a decision to explode. + */ public class ExplosionPrimeEvent extends EntityEvent implements Cancellable { private boolean cancel; private float radius; @@ -20,26 +23,58 @@ public class ExplosionPrimeEvent extends EntityEvent implements Cancellable { this(explosive, explosive.getYield(), explosive.isIncendiary()); } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @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 + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancel = cancel; } + /** + * Gets the radius of the explosion + * + * @return returns the radius of the explosion + */ public float getRadius() { return radius; } + /** + * Sets the radius of the explosion + * + * @param radius the radius of the explosion + */ public void setRadius(float radius) { this.radius = radius; } + /** + * Gets whether this explosion will create fire or not + * + * @return true if this explosion will create fire + */ public boolean getFire() { return fire; } + /** + * Sets whether this explosion will create fire or not + * + * @param fire true if you want this explosion to create fire + */ public void setFire(boolean fire) { this.fire = fire; } diff --git a/paper-api/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java index 08f80597f1..b1e21f9bf5 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/ProjectileHitEvent.java @@ -2,6 +2,9 @@ package org.bukkit.event.entity; import org.bukkit.entity.Projectile; +/** + * Called when a projectile hits an object + */ public class ProjectileHitEvent extends EntityEvent { public ProjectileHitEvent(Projectile projectile) { diff --git a/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakByEntityEvent.java b/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakByEntityEvent.java index 44022eb109..2826d8fa09 100644 --- a/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakByEntityEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakByEntityEvent.java @@ -5,10 +5,7 @@ import org.bukkit.entity.Painting; /** * Triggered when a painting is removed by an entity - * - * @author Tanel Suurhans */ - public class PaintingBreakByEntityEvent extends PaintingBreakEvent { private Entity remover; @@ -17,6 +14,11 @@ public class PaintingBreakByEntityEvent extends PaintingBreakEvent { this.remover = remover; } + /** + * Gets the entity that removed the painting + * + * @return the entity that removed the painting. + */ public Entity getRemover() { return remover; } diff --git a/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakByWorldEvent.java b/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakByWorldEvent.java index 39be0f5c42..483988e5e0 100644 --- a/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakByWorldEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakByWorldEvent.java @@ -4,10 +4,7 @@ import org.bukkit.entity.Painting; /** * Triggered when a painting is removed by the world (water flowing over it, block damaged behind it) - * - * @author Tanel Suurhans */ - public class PaintingBreakByWorldEvent extends PaintingBreakEvent { public PaintingBreakByWorldEvent(final Painting painting) { super(painting, RemoveCause.WORLD); diff --git a/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakEvent.java b/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakEvent.java index 5e049c0c6a..5eefd3f2e8 100644 --- a/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/painting/PaintingBreakEvent.java @@ -6,10 +6,7 @@ import org.bukkit.event.Cancellable; /** * Triggered when a painting is removed - * - * @author Tanel Suurhans */ - public class PaintingBreakEvent extends PaintingEvent implements Cancellable { private boolean cancelled; @@ -20,14 +17,31 @@ public class PaintingBreakEvent extends PaintingEvent implements Cancellable { this.cause = cause; } + /** + * Gets the cause for the painting's removal + * + * @return the RemoveCause for the painting's removal + */ public RemoveCause getCause() { return cause; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return cancelled; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancelled = cancel; } @@ -36,13 +50,12 @@ public class PaintingBreakEvent extends PaintingEvent implements Cancellable { * An enum to specify the cause of the removal */ public enum RemoveCause { - /** * Removed by an entity */ ENTITY, /** - * Removed by the world - block destroyed behind, water flowing over etc + * Removed by the world - block the painting is on is destroyed, water flowing over etc */ WORLD diff --git a/paper-api/src/main/java/org/bukkit/event/painting/PaintingEvent.java b/paper-api/src/main/java/org/bukkit/event/painting/PaintingEvent.java index dec3646dc6..bf576c6742 100644 --- a/paper-api/src/main/java/org/bukkit/event/painting/PaintingEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/painting/PaintingEvent.java @@ -5,8 +5,6 @@ import org.bukkit.event.Event; /** * Represents a painting-related event. - * - * @author Tanel Suurhans */ public class PaintingEvent extends Event { @@ -18,7 +16,7 @@ public class PaintingEvent extends Event { } /** - * Get the painting. + * Gets the painting involved in this event. * * @return the painting */ diff --git a/paper-api/src/main/java/org/bukkit/event/painting/PaintingPlaceEvent.java b/paper-api/src/main/java/org/bukkit/event/painting/PaintingPlaceEvent.java index f86be7cd24..a2d6f6e714 100644 --- a/paper-api/src/main/java/org/bukkit/event/painting/PaintingPlaceEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/painting/PaintingPlaceEvent.java @@ -10,8 +10,6 @@ import org.bukkit.event.Event; /** * Triggered when a painting is created in the world - * - * @author Tanel Suurhans */ public class PaintingPlaceEvent extends PaintingEvent implements Cancellable { @@ -38,7 +36,7 @@ public class PaintingPlaceEvent extends PaintingEvent implements Cancellable { } /** - * Returns the block painting placed on + * Returns the block that the painting was placed on * * @return Block returns the block painting placed on */ @@ -55,10 +53,22 @@ public class PaintingPlaceEvent extends PaintingEvent implements Cancellable { return blockFace; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return cancelled; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancelled = cancel; } diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java index d803f5176a..82a71b34ca 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java @@ -2,17 +2,16 @@ package org.bukkit.event.player; import org.bukkit.entity.Player; -/* +/** * Represents a player animation event */ public class PlayerAnimationEvent extends PlayerEvent { private PlayerAnimationType animationType; - /* - * Construct a new event + /** + * Construct a new PlayerAnimation event * - * @param type The event type * @param player The player instance */ public PlayerAnimationEvent(final Player player) { @@ -22,10 +21,10 @@ public class PlayerAnimationEvent extends PlayerEvent { animationType = PlayerAnimationType.ARM_SWING; } - /* + /** * Get the type of this animation event * - * @returns the animation type + * @return the animation type */ public PlayerAnimationType getAnimationType() { return animationType; diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationType.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationType.java index 20590781f0..ea4bf26f0c 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationType.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationType.java @@ -1,7 +1,7 @@ package org.bukkit.event.player; -/* - * Differet types of player animations +/** + * Different types of player animations */ public enum PlayerAnimationType { ARM_SWING diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java index 6862969e58..b5a8a733c6 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerBedEnterEvent.java @@ -7,8 +7,6 @@ import org.bukkit.event.Cancellable; /** * This event is fired when the player is almost about to enter the bed. * It can be cancelled. - * - * @author sk89q */ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable { @@ -21,7 +19,8 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable { } /** - * Gets the cancellation state of this event. + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins * * @return true if this event is cancelled */ @@ -30,7 +29,8 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable { } /** - * Prevents the player from entering the bed. + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins * * @param cancel true if you wish to cancel this event */ @@ -39,9 +39,9 @@ public class PlayerBedEnterEvent extends PlayerEvent implements Cancellable { } /** - * Returns the bed block. + * Returns the bed block involved in this event. * - * @return + * @return the bed block involved in this event */ public Block getBed() { return bed; diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java index 70a4108fe7..8e91f2aa7b 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerBedLeaveEvent.java @@ -5,8 +5,6 @@ import org.bukkit.entity.Player; /** * This event is fired when the player is leaving a bed. - * - * @author sk89q */ public class PlayerBedLeaveEvent extends PlayerEvent { @@ -18,9 +16,9 @@ public class PlayerBedLeaveEvent extends PlayerEvent { } /** - * Returns the bed block. + * Returns the bed block involved in this event. * - * @return + * @return the bed block involved in this event */ public Block getBed() { return bed; 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 0f203bed33..2979edba66 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 @@ -2,6 +2,10 @@ package org.bukkit.event.player; import org.bukkit.entity.Player; +/** + * Called early in the command handling process. This event is only + * for very exceptional cases and you should not normally use it. + */ public class PlayerCommandPreprocessEvent extends PlayerChatEvent { public PlayerCommandPreprocessEvent(final Player player, final String message) { super(Type.PLAYER_COMMAND_PREPROCESS, player, message); diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java index 87c1fbba77..38ab0357bf 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerDropItemEvent.java @@ -19,7 +19,7 @@ public class PlayerDropItemEvent extends PlayerEvent implements Cancellable { /** * Gets the ItemDrop created by the player * - * @return ItemDrop + * @return ItemDrop created by the player */ public Item getItemDrop() { return drop; diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java index 9321e37ded..6b2a8ea719 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java @@ -5,9 +5,7 @@ import org.bukkit.entity.Egg; import org.bukkit.entity.Player; /** - * - * @author tkelly - * + * Called when a player throws an egg and it might hatch */ public class PlayerEggThrowEvent extends PlayerEvent { private Egg egg; @@ -24,16 +22,16 @@ public class PlayerEggThrowEvent extends PlayerEvent { } /** - * Get the egg. + * Gets the egg involved in this event. * - * @return the egg + * @return the egg involved in this event */ public Egg getEgg() { return egg; } /** - * Grabs whether the egg is hatching or not. Will be what the server + * Gets whether the egg is hatching or not. Will be what the server * would've done without interaction. * * @return boolean Whether the egg is going to hatch or not @@ -43,7 +41,7 @@ public class PlayerEggThrowEvent extends PlayerEvent { } /** - * Sets whether the egg will hatch. + * Sets whether the egg will hatch or not. * * @param hatching true if you want the egg to hatch * false if you want it not to diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerEvent.java index 753ac1adb9..f426bc1e8c 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerEvent.java @@ -16,6 +16,7 @@ public class PlayerEvent extends Event { /** * Returns the player involved in this event + * * @return Player who is involved in this event */ public final Player getPlayer() { diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java index ffaa71e5cf..e0b357a5a1 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerInteractEvent.java @@ -9,9 +9,7 @@ import org.bukkit.event.Cancellable; import org.bukkit.event.block.Action; /** - * - * @author durron597 - * + * Called when a player interacts with an object or air. */ public class PlayerInteractEvent extends PlayerEvent implements Cancellable { protected ItemStack item; @@ -93,7 +91,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable { /** * Check if this event involved a block * - * return boolean true if it did + * @return boolean true if it did */ public boolean hasBlock() { return this.blockClicked != null; @@ -102,7 +100,7 @@ public class PlayerInteractEvent extends PlayerEvent implements Cancellable { /** * Check if this event involved an item * - * return boolean true if it did + * @return boolean true if it did */ public boolean hasItem() { return this.item != null; diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java index dfbd2396b8..179abc2c2e 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerJoinEvent.java @@ -2,6 +2,9 @@ package org.bukkit.event.player; import org.bukkit.entity.Player; +/** + * Called when a player joins a server + */ public class PlayerJoinEvent extends PlayerEvent { private String joinMessage; diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerKickEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerKickEvent.java index 50492c7cfd..c993ce777c 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerKickEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerKickEvent.java @@ -3,6 +3,9 @@ package org.bukkit.event.player; import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; +/** + * Called when a player gets kicked from the server + */ public class PlayerKickEvent extends PlayerEvent implements Cancellable { private String leaveMessage; private String kickReason; diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerListener.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerListener.java index a070e677a7..4789bb061a 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerListener.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerListener.java @@ -66,7 +66,7 @@ public class PlayerListener implements Listener { public void onPlayerRespawn(PlayerRespawnEvent event) {} /** - * Called when a player interacts + * Called when a player interacts with an object or air. * * @param event Relevant event details */ diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java index 9070740721..1566fc1952 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerPreLoginEvent.java @@ -76,9 +76,9 @@ public class PlayerPreLoginEvent extends Event { } /** - * Gets the player name. + * Gets the player's name. * - * @return + * @return the player's name */ public String getName() { return name; 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 978018304c..fa012ad164 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 @@ -2,6 +2,9 @@ package org.bukkit.event.player; import org.bukkit.entity.Player; +/** + * Called when a player leaves a server + */ public class PlayerQuitEvent extends PlayerEvent { private String quitMessage; diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java index b3d8f39295..819e379807 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerRespawnEvent.java @@ -32,9 +32,9 @@ public class PlayerRespawnEvent extends PlayerEvent { } /** - * Gets whether the respawn location is the players bed. + * Gets whether the respawn location is the player's bed. * - * @return true if the respawn location is the players bed. + * @return true if the respawn location is the player's bed. */ public boolean isBedSpawn() { return this.isBedSpawn; diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerToggleSneakEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerToggleSneakEvent.java index 58d0bfbbc1..0a33605e4e 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerToggleSneakEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerToggleSneakEvent.java @@ -4,8 +4,7 @@ import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** - * - * @author azi + * Called when a player toggles their sneaking state */ public class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable { private boolean isSneaking; @@ -17,8 +16,8 @@ public class PlayerToggleSneakEvent extends PlayerEvent implements Cancellable { } /** - * Returns whether the player is now sneaking. - * + * Returns whether the player is now sneaking or not. + * * @return sneaking state */ public boolean isSneaking() { 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 47d9507859..6e9a21e157 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 @@ -2,6 +2,9 @@ package org.bukkit.event.server; import org.bukkit.plugin.Plugin; +/** + * Called when a plugin is disabled. + */ 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 d280d8c074..f3eaa6ebe1 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 @@ -2,6 +2,9 @@ package org.bukkit.event.server; import org.bukkit.plugin.Plugin; +/** + * Called when a plugin is enabled. + */ 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/server/PluginEvent.java b/paper-api/src/main/java/org/bukkit/event/server/PluginEvent.java index cdb614bbe7..937cf49557 100644 --- a/paper-api/src/main/java/org/bukkit/event/server/PluginEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/server/PluginEvent.java @@ -3,7 +3,7 @@ package org.bukkit.event.server; import org.bukkit.plugin.Plugin; /** - * Used for plugin loaded and unloaded events + * Used for plugin enable and disable events */ public class PluginEvent extends ServerEvent { private final Plugin 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 0be40465d9..d29c5eadb6 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 @@ -5,8 +5,6 @@ import org.bukkit.entity.Vehicle; /** * Raised when a vehicle collides with a block. - * - * @author sk89q */ public class VehicleBlockCollisionEvent extends VehicleCollisionEvent { private Block block; @@ -16,6 +14,11 @@ public class VehicleBlockCollisionEvent extends VehicleCollisionEvent { this.block = block; } + /** + * Gets the block the vehicle collided with + * + * @return the block the vehicle collided with + */ public Block getBlock() { return block; } diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java index aaa0848b07..5eea95c299 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java @@ -4,8 +4,6 @@ import org.bukkit.entity.Vehicle; /** * Raised when a vehicle collides. - * - * @author sk89q */ public class VehicleCollisionEvent extends VehicleEvent { public VehicleCollisionEvent(Type type, Vehicle 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 0aaf6ceed1..2ab8d3bbad 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 @@ -6,8 +6,6 @@ import org.bukkit.event.Cancellable; /** * Raised when a vehicle receives damage. - * - * @author sk89q */ public class VehicleDamageEvent extends VehicleEvent implements Cancellable { private Entity attacker; @@ -20,16 +18,26 @@ public class VehicleDamageEvent extends VehicleEvent implements Cancellable { this.damage = damage; } + /** + * Gets the Entity that is attacking the vehicle + * + * @return the Entity that is attacking the vehicle + */ public Entity getAttacker() { return attacker; } + /** + * Gets the damage done to the vehicle + * + * @return the damage done to the vehicle + */ public int getDamage() { return damage; } /** - * Change the damage. + * Sets the damage done to the vehicle * * @param damage */ @@ -37,10 +45,22 @@ public class VehicleDamageEvent extends VehicleEvent implements Cancellable { this.damage = damage; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return cancelled; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancelled = cancel; } diff --git a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDestroyEvent.java b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDestroyEvent.java index 7497a29a53..e9a52da7ac 100644 --- a/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDestroyEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/vehicle/VehicleDestroyEvent.java @@ -6,8 +6,6 @@ import org.bukkit.event.Cancellable; /** * Raised when a vehicle is destroyed - * - * @author sk89q, cyklo */ public class VehicleDestroyEvent extends VehicleEvent implements Cancellable { private Entity attacker; @@ -18,14 +16,31 @@ public class VehicleDestroyEvent extends VehicleEvent implements Cancellable { this.attacker = attacker; } + /** + * Gets the Entity that has destroyed the vehicle + * + * @return the Entity that has destroyed the vehicle + */ public Entity getAttacker() { return attacker; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return cancelled; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ 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 92c479c6aa..818e8f3ab9 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 @@ -6,8 +6,6 @@ import org.bukkit.event.Cancellable; /** * Raised when an entity enters a vehicle. - * - * @author sk89q */ public class VehicleEnterEvent extends VehicleEvent implements Cancellable { private boolean cancelled; @@ -19,18 +17,30 @@ public class VehicleEnterEvent extends VehicleEvent implements Cancellable { } /** - * Get the entity that entered the vehicle. + * Gets the Entity that entered the vehicle. * - * @return + * @return the Entity that entered the vehicle */ public Entity getEntered() { return entered; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return cancelled; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancelled = 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 acde49cedb..71c270bef3 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 @@ -6,8 +6,6 @@ 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; @@ -27,10 +25,22 @@ public class VehicleExitEvent extends VehicleEvent implements Cancellable { return exited; } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return cancelled; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.cancelled = cancel; } diff --git a/paper-api/src/main/java/org/bukkit/event/weather/ThunderChangeEvent.java b/paper-api/src/main/java/org/bukkit/event/weather/ThunderChangeEvent.java index ff42faf14d..b2db85be59 100644 --- a/paper-api/src/main/java/org/bukkit/event/weather/ThunderChangeEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/weather/ThunderChangeEvent.java @@ -4,7 +4,7 @@ import org.bukkit.World; import org.bukkit.event.Cancellable; /** - * Stores data for thudner state changing in a world + * Stores data for thunder state changing in a world */ public class ThunderChangeEvent extends WeatherEvent implements Cancellable { diff --git a/paper-api/src/main/java/org/bukkit/event/weather/WeatherEvent.java b/paper-api/src/main/java/org/bukkit/event/weather/WeatherEvent.java index a8694a3642..8c78f86c5b 100644 --- a/paper-api/src/main/java/org/bukkit/event/weather/WeatherEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/weather/WeatherEvent.java @@ -4,7 +4,7 @@ import org.bukkit.World; import org.bukkit.event.Event; /** - * Represents an Weather-related event + * Represents a Weather-related event */ public class WeatherEvent extends Event { protected World world; @@ -15,8 +15,9 @@ public class WeatherEvent extends Event { } /** - * Returns the World where this event is occuring - * @return World this event is occuring in + * Returns the World where this event is occurring + * + * @return World this event is occurring in */ public final World getWorld() { return world; diff --git a/paper-api/src/main/java/org/bukkit/event/weather/WeatherListener.java b/paper-api/src/main/java/org/bukkit/event/weather/WeatherListener.java index d65eb5e4ad..1a6d6ce844 100644 --- a/paper-api/src/main/java/org/bukkit/event/weather/WeatherListener.java +++ b/paper-api/src/main/java/org/bukkit/event/weather/WeatherListener.java @@ -8,9 +8,24 @@ import org.bukkit.event.Listener; public class WeatherListener implements Listener { public WeatherListener() {} + /** + * Called when a weather change occurs + * + * @param event Relevant event details + */ public void onWeatherChange(WeatherChangeEvent event) {} + /** + * Called when the state of thunder changes + * + * @param event Relevant event details + */ public void onThunderChange(ThunderChangeEvent event) {} + /** + * Called when lightning strikes + * + * @param event Relevant event details + */ public void onLightningStrike(LightningStrikeEvent event) {} } 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 2500e0165c..3e789b7357 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 @@ -2,6 +2,9 @@ package org.bukkit.event.world; import org.bukkit.Chunk; +/** + * Represents a Chunk related event + */ public class ChunkEvent extends WorldEvent { protected Chunk chunk; diff --git a/paper-api/src/main/java/org/bukkit/event/world/ChunkPopulateEvent.java b/paper-api/src/main/java/org/bukkit/event/world/ChunkPopulateEvent.java index 3f8f645910..aa10a63b5a 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/ChunkPopulateEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/ChunkPopulateEvent.java @@ -1,4 +1,3 @@ - package org.bukkit.event.world; import org.bukkit.Chunk; diff --git a/paper-api/src/main/java/org/bukkit/event/world/PortalCreateEvent.java b/paper-api/src/main/java/org/bukkit/event/world/PortalCreateEvent.java index 3e0314f16f..99e9fdf48b 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/PortalCreateEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/PortalCreateEvent.java @@ -1,12 +1,10 @@ package org.bukkit.event.world; - import org.bukkit.block.Block; import org.bukkit.World; import org.bukkit.event.Cancellable; import java.util.ArrayList; - /** * Called when the world attempts to create a matching end to a portal */ @@ -19,6 +17,11 @@ public class PortalCreateEvent extends WorldEvent implements Cancellable { this.blocks = blocks; } + /** + * Gets an array list of all the blocks associated with the created portal + * + * @return array list of all the blocks associated with the created portal + */ public ArrayList getBlocks() { return this.blocks; } diff --git a/paper-api/src/main/java/org/bukkit/event/world/SpawnChangeEvent.java b/paper-api/src/main/java/org/bukkit/event/world/SpawnChangeEvent.java index 02159d01d4..10576b01cf 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/SpawnChangeEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/SpawnChangeEvent.java @@ -6,8 +6,6 @@ import org.bukkit.Location; /** * An event that is called when a world's spawn changes. The * world's previous spawn location is included. - * - * @author willurd */ public class SpawnChangeEvent extends WorldEvent { private Location previousLocation; diff --git a/paper-api/src/main/java/org/bukkit/event/world/WorldInitEvent.java b/paper-api/src/main/java/org/bukkit/event/world/WorldInitEvent.java index 4fb5c38278..e14e05b15f 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/WorldInitEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/WorldInitEvent.java @@ -2,6 +2,9 @@ package org.bukkit.event.world; import org.bukkit.World; +/** + * Called when a World is initializing + */ public class WorldInitEvent extends WorldEvent { public WorldInitEvent(World world) { super(Type.WORLD_INIT, world); 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 24b749f6eb..7214ae040a 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 @@ -2,6 +2,9 @@ package org.bukkit.event.world; import org.bukkit.World; +/** + * Called when a World is loaded + */ 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/WorldUnloadEvent.java b/paper-api/src/main/java/org/bukkit/event/world/WorldUnloadEvent.java index e781db00a7..2bfb22132f 100644 --- a/paper-api/src/main/java/org/bukkit/event/world/WorldUnloadEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/world/WorldUnloadEvent.java @@ -3,6 +3,9 @@ package org.bukkit.event.world; import org.bukkit.World; import org.bukkit.event.Cancellable; +/** + * Called when a World is unloaded + */ public class WorldUnloadEvent extends WorldEvent implements Cancellable { private boolean isCancelled; @@ -11,10 +14,22 @@ public class WorldUnloadEvent extends WorldEvent implements Cancellable { super(Type.WORLD_UNLOAD, world); } + /** + * Gets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @return true if this event is cancelled + */ public boolean isCancelled() { return this.isCancelled; } + /** + * Sets the cancellation state of this event. A cancelled event will not + * be executed in the server, but will still pass to other plugins + * + * @param cancel true if you wish to cancel this event + */ public void setCancelled(boolean cancel) { this.isCancelled = cancel; }