From 4764962cf94b73782a49fe351a55cb47e9550044 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Sat, 15 Jan 2011 21:20:59 +0000 Subject: All entity stuff in org.bukkit moved to org.bukkit.entity --- src/main/java/org/bukkit/Arrow.java | 9 - src/main/java/org/bukkit/Boat.java | 9 - src/main/java/org/bukkit/Egg.java | 9 - src/main/java/org/bukkit/Entity.java | 42 ----- src/main/java/org/bukkit/HumanEntity.java | 46 ----- src/main/java/org/bukkit/ItemDrop.java | 15 -- src/main/java/org/bukkit/LivingEntity.java | 62 ------ src/main/java/org/bukkit/Minecart.java | 22 --- src/main/java/org/bukkit/MobType.java | 25 --- src/main/java/org/bukkit/Player.java | 57 ------ src/main/java/org/bukkit/PoweredMinecart.java | 10 - src/main/java/org/bukkit/Server.java | 1 + src/main/java/org/bukkit/Snowball.java | 9 - src/main/java/org/bukkit/StorageMinecart.java | 15 -- src/main/java/org/bukkit/Vehicle.java | 52 ------ src/main/java/org/bukkit/World.java | 7 + src/main/java/org/bukkit/entity/Arrow.java | 9 + src/main/java/org/bukkit/entity/Boat.java | 9 + src/main/java/org/bukkit/entity/Egg.java | 9 + src/main/java/org/bukkit/entity/Entity.java | 45 +++++ src/main/java/org/bukkit/entity/HumanEntity.java | 49 +++++ src/main/java/org/bukkit/entity/ItemDrop.java | 17 ++ src/main/java/org/bukkit/entity/LivingEntity.java | 62 ++++++ src/main/java/org/bukkit/entity/Minecart.java | 22 +++ src/main/java/org/bukkit/entity/MobType.java | 25 +++ src/main/java/org/bukkit/entity/Player.java | 57 ++++++ .../java/org/bukkit/entity/PoweredMinecart.java | 10 + src/main/java/org/bukkit/entity/Snowball.java | 9 + .../java/org/bukkit/entity/StorageMinecart.java | 17 ++ src/main/java/org/bukkit/entity/Vehicle.java | 54 ++++++ .../org/bukkit/event/block/BlockDamageEvent.java | 2 +- .../org/bukkit/event/block/BlockIgniteEvent.java | 2 +- .../org/bukkit/event/block/BlockInteractEvent.java | 4 +- .../org/bukkit/event/block/BlockPlaceEvent.java | 2 +- .../bukkit/event/block/BlockRightClickEvent.java | 2 +- .../bukkit/event/entity/EntityCombustEvent.java | 2 +- .../event/entity/EntityDamageByBlockEvent.java | 2 +- .../event/entity/EntityDamageByEntityEvent.java | 2 +- .../org/bukkit/event/entity/EntityDamageEvent.java | 2 +- .../java/org/bukkit/event/entity/EntityEvent.java | 2 +- .../org/bukkit/event/player/PlayerChatEvent.java | 2 +- .../bukkit/event/player/PlayerEggThrowEvent.java | 4 +- .../java/org/bukkit/event/player/PlayerEvent.java | 50 ++--- .../org/bukkit/event/player/PlayerItemEvent.java | 2 +- .../org/bukkit/event/player/PlayerLoginEvent.java | 208 ++++++++++----------- .../org/bukkit/event/player/PlayerMoveEvent.java | 172 ++++++++--------- .../event/vehicle/VehicleBlockCollisionEvent.java | 2 +- .../event/vehicle/VehicleCollisionEvent.java | 2 +- .../bukkit/event/vehicle/VehicleCreateEvent.java | 2 +- .../bukkit/event/vehicle/VehicleDamageEvent.java | 4 +- .../bukkit/event/vehicle/VehicleEnterEvent.java | 4 +- .../event/vehicle/VehicleEntityCollisionEvent.java | 4 +- .../org/bukkit/event/vehicle/VehicleEvent.java | 2 +- .../org/bukkit/event/vehicle/VehicleExitEvent.java | 4 +- .../org/bukkit/event/vehicle/VehicleMoveEvent.java | 2 +- src/main/java/org/bukkit/fillr/Checker.java | 1 + src/main/java/org/bukkit/fillr/Downloader.java | 1 + src/main/java/org/bukkit/fillr/FillrListener.java | 1 + src/main/java/org/bukkit/fillr/Getter.java | 1 + src/main/java/org/bukkit/fillr/Updater.java | 1 + 60 files changed, 650 insertions(+), 625 deletions(-) delete mode 100644 src/main/java/org/bukkit/Arrow.java delete mode 100644 src/main/java/org/bukkit/Boat.java delete mode 100644 src/main/java/org/bukkit/Egg.java delete mode 100644 src/main/java/org/bukkit/Entity.java delete mode 100644 src/main/java/org/bukkit/HumanEntity.java delete mode 100644 src/main/java/org/bukkit/ItemDrop.java delete mode 100644 src/main/java/org/bukkit/LivingEntity.java delete mode 100644 src/main/java/org/bukkit/Minecart.java delete mode 100644 src/main/java/org/bukkit/MobType.java delete mode 100644 src/main/java/org/bukkit/Player.java delete mode 100644 src/main/java/org/bukkit/PoweredMinecart.java delete mode 100644 src/main/java/org/bukkit/Snowball.java delete mode 100644 src/main/java/org/bukkit/StorageMinecart.java delete mode 100644 src/main/java/org/bukkit/Vehicle.java create mode 100644 src/main/java/org/bukkit/entity/Arrow.java create mode 100644 src/main/java/org/bukkit/entity/Boat.java create mode 100644 src/main/java/org/bukkit/entity/Egg.java create mode 100644 src/main/java/org/bukkit/entity/Entity.java create mode 100644 src/main/java/org/bukkit/entity/HumanEntity.java create mode 100644 src/main/java/org/bukkit/entity/ItemDrop.java create mode 100644 src/main/java/org/bukkit/entity/LivingEntity.java create mode 100644 src/main/java/org/bukkit/entity/Minecart.java create mode 100644 src/main/java/org/bukkit/entity/MobType.java create mode 100644 src/main/java/org/bukkit/entity/Player.java create mode 100644 src/main/java/org/bukkit/entity/PoweredMinecart.java create mode 100644 src/main/java/org/bukkit/entity/Snowball.java create mode 100644 src/main/java/org/bukkit/entity/StorageMinecart.java create mode 100644 src/main/java/org/bukkit/entity/Vehicle.java (limited to 'src') diff --git a/src/main/java/org/bukkit/Arrow.java b/src/main/java/org/bukkit/Arrow.java deleted file mode 100644 index bdbe263b..00000000 --- a/src/main/java/org/bukkit/Arrow.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.bukkit; - -/** - * Represents an arrow. - * - * @author sk89q - */ -public interface Arrow extends Entity { -} diff --git a/src/main/java/org/bukkit/Boat.java b/src/main/java/org/bukkit/Boat.java deleted file mode 100644 index 33958ec0..00000000 --- a/src/main/java/org/bukkit/Boat.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.bukkit; - -/** - * Represents a boat entity. - * - * @author sk89q - */ -public interface Boat extends Vehicle { -} diff --git a/src/main/java/org/bukkit/Egg.java b/src/main/java/org/bukkit/Egg.java deleted file mode 100644 index dc0beb2e..00000000 --- a/src/main/java/org/bukkit/Egg.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.bukkit; - -/** - * Represents an egg. - * - * @author sk89q - */ -public interface Egg extends Entity { -} diff --git a/src/main/java/org/bukkit/Entity.java b/src/main/java/org/bukkit/Entity.java deleted file mode 100644 index 1ffa8501..00000000 --- a/src/main/java/org/bukkit/Entity.java +++ /dev/null @@ -1,42 +0,0 @@ - -package org.bukkit; - -/** - * Represents a base entity in the world - */ -public interface Entity { - /** - * Gets the entitys current position - * - * @return Location containing the position of this entity - */ - public Location getLocation(); - - /** - * Gets the current world this entity resides in - * - * @return World - */ - public World getWorld(); - - /** - * Teleports this entity to the given location - * - * @param location New location to teleport this entity to - */ - public void teleportTo(Location location); - - /** - * Teleports this entity to the target Entity - * - * @param destination Entity to teleport this entity to - */ - public void teleportTo(Entity destination); - - /** - * Returns a unique id for this entity - * - * @return Entity id - */ - public int getEntityId(); -} diff --git a/src/main/java/org/bukkit/HumanEntity.java b/src/main/java/org/bukkit/HumanEntity.java deleted file mode 100644 index 04b391a8..00000000 --- a/src/main/java/org/bukkit/HumanEntity.java +++ /dev/null @@ -1,46 +0,0 @@ - -package org.bukkit; - -/** - * Represents a human entity, such as an NPC or a player - */ -public interface HumanEntity extends LivingEntity { - /** - * Returns the name of this player - * - * @return Player name - */ - public String getName(); - - /** - * Get the player's inventory. - * - * @return The inventory of the player, this also contains the armor slots. - */ - public PlayerInventory getInventory(); - - /** - * Returns the ItemStack currently in your hand, can be empty. - * - * @return The ItemStack of the item you are currently holding. - */ - public ItemStack getItemInHand(); - - - /** TODO: This probably won't work ;( - * Sets the item to the given ItemStack, this will replace whatever the - * user was holding. - * - * @param item The ItemStack which will end up in the hand - * @return - * - public void setItemInHand( ItemStack item ); - - ** - * Changes the item in hand to another of your 'action slots'. - * - * @param index The new index to use, only valid ones are 0-8. - * - public void selectItemInHand( int index ); - */ -} diff --git a/src/main/java/org/bukkit/ItemDrop.java b/src/main/java/org/bukkit/ItemDrop.java deleted file mode 100644 index 3e2fd598..00000000 --- a/src/main/java/org/bukkit/ItemDrop.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.bukkit; - -/** - * Represents a dropped item. - * - * @author sk89q - */ -public interface ItemDrop extends Entity { - /** - * Gets the item stack. - * - * @return - */ - public ItemStack getItemStack(); -} diff --git a/src/main/java/org/bukkit/LivingEntity.java b/src/main/java/org/bukkit/LivingEntity.java deleted file mode 100644 index f0987ba2..00000000 --- a/src/main/java/org/bukkit/LivingEntity.java +++ /dev/null @@ -1,62 +0,0 @@ - -package org.bukkit; - -/** - * Represents a living entity, such as a monster or player - */ -public interface LivingEntity extends Entity { - /** - * Gets the entitys health from 0-20, where 0 is dead and 20 is full - * - * @return Health represented from 0-20 - */ - public int getHealth(); - - /** - * Sets the entitys health from 0-20, where 0 is dead and 20 is full - * - * @param health New health represented from 0-20 - */ - public void setHealth(int health); - - /** - * Throws an egg from the entity. - */ - public Egg throwEgg(); - - /** - * Throws a snowball from the entity. - */ - public Snowball throwSnowball(); - - /** - * Shoots an arrow from the entity. - * - * @return - */ - public Arrow shootArrow(); - - /** - * Returns whether this entity is inside a vehicle. - * - * @return - */ - public boolean isInsideVehicle(); - - /** - * Leave the current vehicle. If the entity is currently in a vehicle - * (and is removed from it), true will be returned, otherwise false will - * be returned. - * - * @return - */ - public boolean leaveVehicle(); - - /** - * Get the vehicle that this player is inside. If there is no vehicle, - * null will be returned. - * - * @return - */ - public Vehicle getVehicle(); -} diff --git a/src/main/java/org/bukkit/Minecart.java b/src/main/java/org/bukkit/Minecart.java deleted file mode 100644 index 275a084e..00000000 --- a/src/main/java/org/bukkit/Minecart.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.bukkit; - -/** - * Represents a minecart entity. - * - * @author sk89q - */ -public interface Minecart extends Vehicle { - /** - * Sets a minecart's damage. - * - * @param damage over 40 to "kill" a minecart - */ - public void setDamage(int damage); - - /** - * Gets a minecart's damage. - * - * @param damage - */ - public int getDamage(); -} diff --git a/src/main/java/org/bukkit/MobType.java b/src/main/java/org/bukkit/MobType.java deleted file mode 100644 index 0290c926..00000000 --- a/src/main/java/org/bukkit/MobType.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.bukkit; - -public enum MobType { - CHICKEN("Chicken"), - COW("Cow"), - CREEPER("Creeper"), - GHAST("Ghast"), - PIG("Pig"), - PIG_ZOMBIE("PigZombie"), - SHEEP("Sheep"), - SKELETON("Skeleton"), - SPIDER("Spider"), - ZOMBIE("Zombie"); - - private String name; - - private MobType(String name) { - this.name = name; - } - - public String getName() { - return name; - } - -} diff --git a/src/main/java/org/bukkit/Player.java b/src/main/java/org/bukkit/Player.java deleted file mode 100644 index eb6cc73a..00000000 --- a/src/main/java/org/bukkit/Player.java +++ /dev/null @@ -1,57 +0,0 @@ - -package org.bukkit; - -import java.net.InetSocketAddress; - -/** - * Represents a player, connected or not - * - */ -public interface Player extends HumanEntity { - /** - * Checks if this player is currently online - * - * @return true if they are online - */ - public boolean isOnline(); - - /** - * Sends this player a message, which will be displayed in their chat - * - * @param message Message to be displayed - */ - public void sendMessage(String message); - - /** - * Gets the "friendly" name to display of this player. This may include color. - * - * Note that this name will not be displayed in game, only in chat and places - * defined by plugins - * - * @return String containing a color formatted name to display for this player - */ - public String getDisplayName(); - - /** - * Sets the "friendly" name to display of this player. This may include color. - * - * Note that this name will not be displayed in game, only in chat and places - * defined by plugins - * - * @return String containing a color formatted name to display for this player - */ - public void setDisplayName(String name); - - /** - * Gets the socket address of this player - * @return the player's address - */ - public InetSocketAddress getAddress(); - - /** - * Kicks player with custom kick message. - * - * @return - */ - public void kickPlayer(String message); -} diff --git a/src/main/java/org/bukkit/PoweredMinecart.java b/src/main/java/org/bukkit/PoweredMinecart.java deleted file mode 100644 index c6ca4716..00000000 --- a/src/main/java/org/bukkit/PoweredMinecart.java +++ /dev/null @@ -1,10 +0,0 @@ -package org.bukkit; - -/** - * Represents a powered minecart. - * - * @author sk89q - */ -public interface PoweredMinecart extends Minecart { - -} diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java index f3556922..268faf3d 100644 --- a/src/main/java/org/bukkit/Server.java +++ b/src/main/java/org/bukkit/Server.java @@ -1,6 +1,7 @@ package org.bukkit; +import org.bukkit.entity.Player; import java.util.List; import org.bukkit.plugin.PluginManager; diff --git a/src/main/java/org/bukkit/Snowball.java b/src/main/java/org/bukkit/Snowball.java deleted file mode 100644 index cebe0dff..00000000 --- a/src/main/java/org/bukkit/Snowball.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.bukkit; - -/** - * Implements a snowball. - * - * @author sk89q - */ -public interface Snowball extends Entity { -} diff --git a/src/main/java/org/bukkit/StorageMinecart.java b/src/main/java/org/bukkit/StorageMinecart.java deleted file mode 100644 index 7ec1b5ac..00000000 --- a/src/main/java/org/bukkit/StorageMinecart.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.bukkit; - -/** - * Represents a storage minecart. - * - * @author sk89q - */ -public interface StorageMinecart extends Minecart { - /** - * Return the inventory object for this StorageMinecart. - * - * @return The inventory for this Minecart - */ - public Inventory getInventory(); -} diff --git a/src/main/java/org/bukkit/Vehicle.java b/src/main/java/org/bukkit/Vehicle.java deleted file mode 100644 index 76b7267b..00000000 --- a/src/main/java/org/bukkit/Vehicle.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.bukkit; - -/** - * Represents a vehicle entity. - * - * @author sk89q - */ -public interface Vehicle extends Entity { - /** - * Gets the vehicle's velocity. - * - * @return velocity vector - */ - public Vector getVelocity(); - - /** - * Sets the vehicle's velocity. - * - * @param vel velocity vector - */ - public void setVelocity(Vector vel); - - /** - * Gets the primary passenger of a vehicle. For vehicles that could have - * multiple passengers, this will only return the primary passenger. - * - * @return an entity - */ - public Entity getPassenger(); - - /** - * Set the passenger of a vehicle. - * - * @param passenger - * @return false if it could not be done for whatever reason - */ - public boolean setPassenger(Entity passenger); - - /** - * Returns true if the vehicle has no passengers. - * - * @return - */ - public boolean isEmpty(); - - /** - * Eject any passenger. True if there was a passenger. - * - * @return - */ - public boolean eject(); -} diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index 45acbeca..c2d9432d 100644 --- a/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java @@ -1,6 +1,13 @@ package org.bukkit; +import org.bukkit.entity.ItemDrop; +import org.bukkit.entity.PoweredMinecart; +import org.bukkit.entity.Minecart; +import org.bukkit.entity.StorageMinecart; +import org.bukkit.entity.Arrow; +import org.bukkit.entity.Boat; + /** * Represents a world. * diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java new file mode 100644 index 00000000..90efb643 --- /dev/null +++ b/src/main/java/org/bukkit/entity/Arrow.java @@ -0,0 +1,9 @@ +package org.bukkit.entity; + +/** + * Represents an arrow. + * + * @author sk89q + */ +public interface Arrow extends Entity { +} diff --git a/src/main/java/org/bukkit/entity/Boat.java b/src/main/java/org/bukkit/entity/Boat.java new file mode 100644 index 00000000..9cb3b810 --- /dev/null +++ b/src/main/java/org/bukkit/entity/Boat.java @@ -0,0 +1,9 @@ +package org.bukkit.entity; + +/** + * Represents a boat entity. + * + * @author sk89q + */ +public interface Boat extends Vehicle { +} diff --git a/src/main/java/org/bukkit/entity/Egg.java b/src/main/java/org/bukkit/entity/Egg.java new file mode 100644 index 00000000..c7b3d022 --- /dev/null +++ b/src/main/java/org/bukkit/entity/Egg.java @@ -0,0 +1,9 @@ +package org.bukkit.entity; + +/** + * Represents an egg. + * + * @author sk89q + */ +public interface Egg extends Entity { +} diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java new file mode 100644 index 00000000..42e0cf49 --- /dev/null +++ b/src/main/java/org/bukkit/entity/Entity.java @@ -0,0 +1,45 @@ + +package org.bukkit.entity; + +import org.bukkit.Location; +import org.bukkit.World; + +/** + * Represents a base entity in the world + */ +public interface Entity { + /** + * Gets the entitys current position + * + * @return Location containing the position of this entity + */ + public Location getLocation(); + + /** + * Gets the current world this entity resides in + * + * @return World + */ + public World getWorld(); + + /** + * Teleports this entity to the given location + * + * @param location New location to teleport this entity to + */ + public void teleportTo(Location location); + + /** + * Teleports this entity to the target Entity + * + * @param destination Entity to teleport this entity to + */ + public void teleportTo(Entity destination); + + /** + * Returns a unique id for this entity + * + * @return Entity id + */ + public int getEntityId(); +} diff --git a/src/main/java/org/bukkit/entity/HumanEntity.java b/src/main/java/org/bukkit/entity/HumanEntity.java new file mode 100644 index 00000000..34ea3e8c --- /dev/null +++ b/src/main/java/org/bukkit/entity/HumanEntity.java @@ -0,0 +1,49 @@ + +package org.bukkit.entity; + +import org.bukkit.ItemStack; +import org.bukkit.PlayerInventory; + +/** + * Represents a human entity, such as an NPC or a player + */ +public interface HumanEntity extends LivingEntity { + /** + * Returns the name of this player + * + * @return Player name + */ + public String getName(); + + /** + * Get the player's inventory. + * + * @return The inventory of the player, this also contains the armor slots. + */ + public PlayerInventory getInventory(); + + /** + * Returns the ItemStack currently in your hand, can be empty. + * + * @return The ItemStack of the item you are currently holding. + */ + public ItemStack getItemInHand(); + + + /** TODO: This probably won't work ;( + * Sets the item to the given ItemStack, this will replace whatever the + * user was holding. + * + * @param item The ItemStack which will end up in the hand + * @return + * + public void setItemInHand( ItemStack item ); + + ** + * Changes the item in hand to another of your 'action slots'. + * + * @param index The new index to use, only valid ones are 0-8. + * + public void selectItemInHand( int index ); + */ +} diff --git a/src/main/java/org/bukkit/entity/ItemDrop.java b/src/main/java/org/bukkit/entity/ItemDrop.java new file mode 100644 index 00000000..0ab8ab0a --- /dev/null +++ b/src/main/java/org/bukkit/entity/ItemDrop.java @@ -0,0 +1,17 @@ +package org.bukkit.entity; + +import org.bukkit.ItemStack; + +/** + * Represents a dropped item. + * + * @author sk89q + */ +public interface ItemDrop extends Entity { + /** + * Gets the item stack. + * + * @return + */ + public ItemStack getItemStack(); +} diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java new file mode 100644 index 00000000..e58122d1 --- /dev/null +++ b/src/main/java/org/bukkit/entity/LivingEntity.java @@ -0,0 +1,62 @@ + +package org.bukkit.entity; + +/** + * Represents a living entity, such as a monster or player + */ +public interface LivingEntity extends Entity { + /** + * Gets the entitys health from 0-20, where 0 is dead and 20 is full + * + * @return Health represented from 0-20 + */ + public int getHealth(); + + /** + * Sets the entitys health from 0-20, where 0 is dead and 20 is full + * + * @param health New health represented from 0-20 + */ + public void setHealth(int health); + + /** + * Throws an egg from the entity. + */ + public Egg throwEgg(); + + /** + * Throws a snowball from the entity. + */ + public Snowball throwSnowball(); + + /** + * Shoots an arrow from the entity. + * + * @return + */ + public Arrow shootArrow(); + + /** + * Returns whether this entity is inside a vehicle. + * + * @return + */ + public boolean isInsideVehicle(); + + /** + * Leave the current vehicle. If the entity is currently in a vehicle + * (and is removed from it), true will be returned, otherwise false will + * be returned. + * + * @return + */ + public boolean leaveVehicle(); + + /** + * Get the vehicle that this player is inside. If there is no vehicle, + * null will be returned. + * + * @return + */ + public Vehicle getVehicle(); +} diff --git a/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java new file mode 100644 index 00000000..d4469a4c --- /dev/null +++ b/src/main/java/org/bukkit/entity/Minecart.java @@ -0,0 +1,22 @@ +package org.bukkit.entity; + +/** + * Represents a minecart entity. + * + * @author sk89q + */ +public interface Minecart extends Vehicle { + /** + * Sets a minecart's damage. + * + * @param damage over 40 to "kill" a minecart + */ + public void setDamage(int damage); + + /** + * Gets a minecart's damage. + * + * @param damage + */ + public int getDamage(); +} diff --git a/src/main/java/org/bukkit/entity/MobType.java b/src/main/java/org/bukkit/entity/MobType.java new file mode 100644 index 00000000..7f52a7ad --- /dev/null +++ b/src/main/java/org/bukkit/entity/MobType.java @@ -0,0 +1,25 @@ +package org.bukkit.entity; + +public enum MobType { + CHICKEN("Chicken"), + COW("Cow"), + CREEPER("Creeper"), + GHAST("Ghast"), + PIG("Pig"), + PIG_ZOMBIE("PigZombie"), + SHEEP("Sheep"), + SKELETON("Skeleton"), + SPIDER("Spider"), + ZOMBIE("Zombie"); + + private String name; + + private MobType(String name) { + this.name = name; + } + + public String getName() { + return name; + } + +} diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java new file mode 100644 index 00000000..d02d97fa --- /dev/null +++ b/src/main/java/org/bukkit/entity/Player.java @@ -0,0 +1,57 @@ + +package org.bukkit.entity; + +import java.net.InetSocketAddress; + +/** + * Represents a player, connected or not + * + */ +public interface Player extends HumanEntity { + /** + * Checks if this player is currently online + * + * @return true if they are online + */ + public boolean isOnline(); + + /** + * Sends this player a message, which will be displayed in their chat + * + * @param message Message to be displayed + */ + public void sendMessage(String message); + + /** + * Gets the "friendly" name to display of this player. This may include color. + * + * Note that this name will not be displayed in game, only in chat and places + * defined by plugins + * + * @return String containing a color formatted name to display for this player + */ + public String getDisplayName(); + + /** + * Sets the "friendly" name to display of this player. This may include color. + * + * Note that this name will not be displayed in game, only in chat and places + * defined by plugins + * + * @return String containing a color formatted name to display for this player + */ + public void setDisplayName(String name); + + /** + * Gets the socket address of this player + * @return the player's address + */ + public InetSocketAddress getAddress(); + + /** + * Kicks player with custom kick message. + * + * @return + */ + public void kickPlayer(String message); +} diff --git a/src/main/java/org/bukkit/entity/PoweredMinecart.java b/src/main/java/org/bukkit/entity/PoweredMinecart.java new file mode 100644 index 00000000..66f5ba7f --- /dev/null +++ b/src/main/java/org/bukkit/entity/PoweredMinecart.java @@ -0,0 +1,10 @@ +package org.bukkit.entity; + +/** + * Represents a powered minecart. + * + * @author sk89q + */ +public interface PoweredMinecart extends Minecart { + +} diff --git a/src/main/java/org/bukkit/entity/Snowball.java b/src/main/java/org/bukkit/entity/Snowball.java new file mode 100644 index 00000000..69ac03ab --- /dev/null +++ b/src/main/java/org/bukkit/entity/Snowball.java @@ -0,0 +1,9 @@ +package org.bukkit.entity; + +/** + * Implements a snowball. + * + * @author sk89q + */ +public interface Snowball extends Entity { +} diff --git a/src/main/java/org/bukkit/entity/StorageMinecart.java b/src/main/java/org/bukkit/entity/StorageMinecart.java new file mode 100644 index 00000000..6b0f2e32 --- /dev/null +++ b/src/main/java/org/bukkit/entity/StorageMinecart.java @@ -0,0 +1,17 @@ +package org.bukkit.entity; + +import org.bukkit.Inventory; + +/** + * Represents a storage minecart. + * + * @author sk89q + */ +public interface StorageMinecart extends Minecart { + /** + * Return the inventory object for this StorageMinecart. + * + * @return The inventory for this Minecart + */ + public Inventory getInventory(); +} diff --git a/src/main/java/org/bukkit/entity/Vehicle.java b/src/main/java/org/bukkit/entity/Vehicle.java new file mode 100644 index 00000000..1d618913 --- /dev/null +++ b/src/main/java/org/bukkit/entity/Vehicle.java @@ -0,0 +1,54 @@ +package org.bukkit.entity; + +import org.bukkit.Vector; + +/** + * Represents a vehicle entity. + * + * @author sk89q + */ +public interface Vehicle extends Entity { + /** + * Gets the vehicle's velocity. + * + * @return velocity vector + */ + public Vector getVelocity(); + + /** + * Sets the vehicle's velocity. + * + * @param vel velocity vector + */ + public void setVelocity(Vector vel); + + /** + * Gets the primary passenger of a vehicle. For vehicles that could have + * multiple passengers, this will only return the primary passenger. + * + * @return an entity + */ + public Entity getPassenger(); + + /** + * Set the passenger of a vehicle. + * + * @param passenger + * @return false if it could not be done for whatever reason + */ + public boolean setPassenger(Entity passenger); + + /** + * Returns true if the vehicle has no passengers. + * + * @return + */ + public boolean isEmpty(); + + /** + * Eject any passenger. True if there was a passenger. + * + * @return + */ + public boolean eject(); +} diff --git a/src/main/java/org/bukkit/event/block/BlockDamageEvent.java b/src/main/java/org/bukkit/event/block/BlockDamageEvent.java index 1bd4201d..fa4b3d23 100644 --- a/src/main/java/org/bukkit/event/block/BlockDamageEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockDamageEvent.java @@ -2,7 +2,7 @@ package org.bukkit.event.block; import org.bukkit.Block; import org.bukkit.BlockDamageLevel; -import org.bukkit.Player; +import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java b/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java index c43a6a2b..90a14ca6 100644 --- a/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockIgniteEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.block; import org.bukkit.Block; -import org.bukkit.Player; +import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; diff --git a/src/main/java/org/bukkit/event/block/BlockInteractEvent.java b/src/main/java/org/bukkit/event/block/BlockInteractEvent.java index 37a343ad..a3e28c26 100644 --- a/src/main/java/org/bukkit/event/block/BlockInteractEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockInteractEvent.java @@ -1,8 +1,8 @@ package org.bukkit.event.block; import org.bukkit.Block; -import org.bukkit.LivingEntity; -import org.bukkit.Player; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java b/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java index a2ba16ed..4074b338 100644 --- a/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockPlaceEvent.java @@ -2,7 +2,7 @@ package org.bukkit.event.block; import org.bukkit.Block; import org.bukkit.ItemStack; -import org.bukkit.Player; +import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/block/BlockRightClickEvent.java b/src/main/java/org/bukkit/event/block/BlockRightClickEvent.java index dff08f08..d0df4c1b 100644 --- a/src/main/java/org/bukkit/event/block/BlockRightClickEvent.java +++ b/src/main/java/org/bukkit/event/block/BlockRightClickEvent.java @@ -3,7 +3,7 @@ package org.bukkit.event.block; import org.bukkit.Block; import org.bukkit.BlockFace; import org.bukkit.ItemStack; -import org.bukkit.Player; +import org.bukkit.entity.Player; /** * Not implemented yet diff --git a/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java b/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java index e47bb8c0..6f404f59 100644 --- a/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityCombustEvent.java @@ -1,6 +1,6 @@ package org.bukkit.event.entity; -import org.bukkit.Entity; +import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java index 44e14060..dfdd2c77 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDamageByBlockEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.entity; import org.bukkit.Block; -import org.bukkit.Entity; +import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java index 716a57ba..c2b347e5 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDamageByEntityEvent.java @@ -1,6 +1,6 @@ package org.bukkit.event.entity; -import org.bukkit.Entity; +import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; diff --git a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java index 332470c3..e073fce0 100644 --- a/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityDamageEvent.java @@ -1,6 +1,6 @@ package org.bukkit.event.entity; -import org.bukkit.Entity; +import org.bukkit.entity.Entity; import org.bukkit.event.Cancellable; import org.bukkit.event.Event; diff --git a/src/main/java/org/bukkit/event/entity/EntityEvent.java b/src/main/java/org/bukkit/event/entity/EntityEvent.java index dcd60372..a4f4911c 100644 --- a/src/main/java/org/bukkit/event/entity/EntityEvent.java +++ b/src/main/java/org/bukkit/event/entity/EntityEvent.java @@ -1,6 +1,6 @@ package org.bukkit.event.entity; -import org.bukkit.Entity; +import org.bukkit.entity.Entity; import org.bukkit.event.Event; /** diff --git a/src/main/java/org/bukkit/event/player/PlayerChatEvent.java b/src/main/java/org/bukkit/event/player/PlayerChatEvent.java index b97ac5a6..047b270f 100644 --- a/src/main/java/org/bukkit/event/player/PlayerChatEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerChatEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.player; -import org.bukkit.Player; +import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java b/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java index f1c26b93..391cc6bc 100644 --- a/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerEggThrowEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.player; -import org.bukkit.MobType; -import org.bukkit.Player; +import org.bukkit.entity.MobType; +import org.bukkit.entity.Player; /** diff --git a/src/main/java/org/bukkit/event/player/PlayerEvent.java b/src/main/java/org/bukkit/event/player/PlayerEvent.java index 2e4ea068..2e176535 100644 --- a/src/main/java/org/bukkit/event/player/PlayerEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerEvent.java @@ -1,25 +1,25 @@ - -package org.bukkit.event.player; - -import org.bukkit.Player; -import org.bukkit.event.Event; - -/** - * Represents a player related event - */ -public class PlayerEvent extends Event { - protected Player player; - - public PlayerEvent(final Event.Type type, final Player who) { - super(type); - player = who; - } - - /** - * Returns the player involved in this event - * @return Player who is involved in this event - */ - public final Player getPlayer() { - return player; - } -} + +package org.bukkit.event.player; + +import org.bukkit.entity.Player; +import org.bukkit.event.Event; + +/** + * Represents a player related event + */ +public class PlayerEvent extends Event { + protected Player player; + + public PlayerEvent(final Event.Type type, final Player who) { + super(type); + player = who; + } + + /** + * Returns the player involved in this event + * @return Player who is involved in this event + */ + public final Player getPlayer() { + return player; + } +} diff --git a/src/main/java/org/bukkit/event/player/PlayerItemEvent.java b/src/main/java/org/bukkit/event/player/PlayerItemEvent.java index a77194be..af727972 100644 --- a/src/main/java/org/bukkit/event/player/PlayerItemEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerItemEvent.java @@ -4,7 +4,7 @@ import org.bukkit.Block; import org.bukkit.BlockFace; import org.bukkit.ItemStack; import org.bukkit.Material; -import org.bukkit.Player; +import org.bukkit.entity.Player; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java index e19475a9..7aedea50 100644 --- a/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerLoginEvent.java @@ -1,104 +1,104 @@ - -package org.bukkit.event.player; - -import org.bukkit.Player; - -/** - * Stores details for players attempting to log in - */ -public class PlayerLoginEvent extends PlayerEvent { - private Result result; - private String message; - - public PlayerLoginEvent(final Type type, final Player player) { - super(type, 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 Type type, final Player player) { + super(type, 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/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java index 24b31b59..cbcc9b37 100644 --- a/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java +++ b/src/main/java/org/bukkit/event/player/PlayerMoveEvent.java @@ -1,86 +1,86 @@ - -package org.bukkit.event.player; - -import org.bukkit.Location; -import org.bukkit.Player; -import org.bukkit.event.Cancellable; -import org.bukkit.event.Event; - -/** - * 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 Event.Type type, final Player player, final Location from, final Location to) { - super(type, 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; +import org.bukkit.event.Event; + +/** + * 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 Event.Type type, final Player player, final Location from, final Location to) { + super(type, 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/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java index 6141c1c1..a16fe0b0 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleBlockCollisionEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.vehicle; import org.bukkit.Block; -import org.bukkit.Vehicle; +import org.bukkit.entity.Vehicle; /** * Raised when a vehicle collides with a block. diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java index 6e4bb48a..da7e2bd9 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java @@ -1,6 +1,6 @@ package org.bukkit.event.vehicle; -import org.bukkit.Vehicle; +import org.bukkit.entity.Vehicle; /** * Raised when a vehicle collides. diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java index 9be4d55b..9cfde547 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleCreateEvent.java @@ -1,6 +1,6 @@ package org.bukkit.event.vehicle; -import org.bukkit.Vehicle; +import org.bukkit.entity.Vehicle; /** * Raised when a vehicle is created. diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java index 3d762e8c..67acac34 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleDamageEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.vehicle; -import org.bukkit.Entity; -import org.bukkit.Vehicle; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Vehicle; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java index 5ac62428..97e5d930 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleEnterEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.vehicle; -import org.bukkit.Entity; -import org.bukkit.Vehicle; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Vehicle; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java index 514c5697..c85e6c8b 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleEntityCollisionEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.vehicle; -import org.bukkit.Entity; -import org.bukkit.Vehicle; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Vehicle; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java index b08c3340..78fc757d 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java @@ -1,6 +1,6 @@ package org.bukkit.event.vehicle; -import org.bukkit.Vehicle; +import org.bukkit.entity.Vehicle; import org.bukkit.event.Event; /** diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java index 957571ed..d1936c3e 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleExitEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.vehicle; -import org.bukkit.LivingEntity; -import org.bukkit.Vehicle; +import org.bukkit.entity.LivingEntity; +import org.bukkit.entity.Vehicle; import org.bukkit.event.Cancellable; /** diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java index 65921ad4..c680dfcb 100644 --- a/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java +++ b/src/main/java/org/bukkit/event/vehicle/VehicleMoveEvent.java @@ -1,7 +1,7 @@ package org.bukkit.event.vehicle; import org.bukkit.Location; -import org.bukkit.Vehicle; +import org.bukkit.entity.Vehicle; /** * Raised when a vehicle moves. diff --git a/src/main/java/org/bukkit/fillr/Checker.java b/src/main/java/org/bukkit/fillr/Checker.java index f00b1363..24865238 100644 --- a/src/main/java/org/bukkit/fillr/Checker.java +++ b/src/main/java/org/bukkit/fillr/Checker.java @@ -1,5 +1,6 @@ package org.bukkit.fillr; +import org.bukkit.entity.Player; import java.io.*; import java.util.jar.*; import org.bukkit.*; diff --git a/src/main/java/org/bukkit/fillr/Downloader.java b/src/main/java/org/bukkit/fillr/Downloader.java index 3b9d8e75..6a96a5f5 100644 --- a/src/main/java/org/bukkit/fillr/Downloader.java +++ b/src/main/java/org/bukkit/fillr/Downloader.java @@ -1,5 +1,6 @@ package org.bukkit.fillr; +import org.bukkit.entity.Player; import org.bukkit.*; import org.bukkit.plugin.PluginDescriptionFile; diff --git a/src/main/java/org/bukkit/fillr/FillrListener.java b/src/main/java/org/bukkit/fillr/FillrListener.java index f25c111b..a6c22ff4 100644 --- a/src/main/java/org/bukkit/fillr/FillrListener.java +++ b/src/main/java/org/bukkit/fillr/FillrListener.java @@ -1,5 +1,6 @@ package org.bukkit.fillr; +import org.bukkit.entity.Player; import org.bukkit.*; import org.bukkit.event.player.*; diff --git a/src/main/java/org/bukkit/fillr/Getter.java b/src/main/java/org/bukkit/fillr/Getter.java index c1197d48..63a1f4cd 100644 --- a/src/main/java/org/bukkit/fillr/Getter.java +++ b/src/main/java/org/bukkit/fillr/Getter.java @@ -1,5 +1,6 @@ package org.bukkit.fillr; +import org.bukkit.entity.Player; import java.io.File; import java.util.logging.Level; import java.util.logging.Logger; diff --git a/src/main/java/org/bukkit/fillr/Updater.java b/src/main/java/org/bukkit/fillr/Updater.java index 3a301538..a7832952 100644 --- a/src/main/java/org/bukkit/fillr/Updater.java +++ b/src/main/java/org/bukkit/fillr/Updater.java @@ -1,5 +1,6 @@ package org.bukkit.fillr; +import org.bukkit.entity.Player; import org.bukkit.*; import org.bukkit.plugin.*; -- cgit v1.2.3