summaryrefslogtreecommitdiffstats
path: root/src/main/java/org
diff options
context:
space:
mode:
authorErik Broes <erikbroes@grum.nl>2011-04-25 13:24:32 +0200
committerErik Broes <erikbroes@grum.nl>2011-04-25 13:24:32 +0200
commitb39503de71d00627a9486c98f40ae235a6299151 (patch)
treedbf32f67126b9fb32f9ce5094182b808d2a1e872 /src/main/java/org
parentcba06d412fa74a83032a961b9c74d7b9b4dd66e6 (diff)
downloadbukkit-b39503de71d00627a9486c98f40ae235a6299151.tar
bukkit-b39503de71d00627a9486c98f40ae235a6299151.tar.gz
bukkit-b39503de71d00627a9486c98f40ae235a6299151.tar.lz
bukkit-b39503de71d00627a9486c98f40ae235a6299151.tar.xz
bukkit-b39503de71d00627a9486c98f40ae235a6299151.zip
Updated README for line-ending demands, also fixed line-endigs.
Diffstat (limited to 'src/main/java/org')
-rw-r--r--src/main/java/org/bukkit/TreeType.java28
-rw-r--r--src/main/java/org/bukkit/block/Chest.java18
-rw-r--r--src/main/java/org/bukkit/block/ContainerBlock.java34
-rw-r--r--src/main/java/org/bukkit/block/CreatureSpawner.java108
-rw-r--r--src/main/java/org/bukkit/block/Dispenser.java34
-rw-r--r--src/main/java/org/bukkit/block/Furnace.java72
-rw-r--r--src/main/java/org/bukkit/block/NoteBlock.java60
-rw-r--r--src/main/java/org/bukkit/entity/Animals.java22
-rw-r--r--src/main/java/org/bukkit/entity/Arrow.java18
-rw-r--r--src/main/java/org/bukkit/entity/Boat.java44
-rw-r--r--src/main/java/org/bukkit/entity/Chicken.java28
-rw-r--r--src/main/java/org/bukkit/entity/Cow.java28
-rw-r--r--src/main/java/org/bukkit/entity/Creature.java46
-rw-r--r--src/main/java/org/bukkit/entity/Egg.java18
-rw-r--r--src/main/java/org/bukkit/entity/FallingSand.java28
-rw-r--r--src/main/java/org/bukkit/entity/Fireball.java18
-rw-r--r--src/main/java/org/bukkit/entity/Fish.java18
-rw-r--r--src/main/java/org/bukkit/entity/Flying.java28
-rw-r--r--src/main/java/org/bukkit/entity/Ghast.java28
-rw-r--r--src/main/java/org/bukkit/entity/Giant.java28
-rw-r--r--src/main/java/org/bukkit/entity/Item.java52
-rw-r--r--src/main/java/org/bukkit/entity/Minecart.java166
-rw-r--r--src/main/java/org/bukkit/entity/Monster.java28
-rw-r--r--src/main/java/org/bukkit/entity/Painting.java28
-rw-r--r--src/main/java/org/bukkit/entity/Pig.java28
-rw-r--r--src/main/java/org/bukkit/entity/PigZombie.java28
-rw-r--r--src/main/java/org/bukkit/entity/PoweredMinecart.java20
-rw-r--r--src/main/java/org/bukkit/entity/Skeleton.java28
-rw-r--r--src/main/java/org/bukkit/entity/Snowball.java18
-rw-r--r--src/main/java/org/bukkit/entity/Spider.java28
-rw-r--r--src/main/java/org/bukkit/entity/Squid.java28
-rw-r--r--src/main/java/org/bukkit/entity/StorageMinecart.java34
-rw-r--r--src/main/java/org/bukkit/entity/TNTPrimed.java28
-rw-r--r--src/main/java/org/bukkit/entity/WaterMob.java26
-rw-r--r--src/main/java/org/bukkit/entity/Zombie.java22
-rw-r--r--src/main/java/org/bukkit/event/block/BlockEvent.java48
-rw-r--r--src/main/java/org/bukkit/event/player/PlayerEvent.java50
-rw-r--r--src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java28
-rw-r--r--src/main/java/org/bukkit/event/vehicle/VehicleEvent.java54
-rw-r--r--src/main/java/org/bukkit/inventory/ItemStack.java408
-rw-r--r--src/main/java/org/bukkit/inventory/PlayerInventory.java186
-rw-r--r--src/main/java/org/bukkit/material/Colorable.java54
-rw-r--r--src/main/java/org/bukkit/plugin/InvalidDescriptionException.java124
-rw-r--r--src/main/java/org/bukkit/util/BlockVector.java222
-rw-r--r--src/main/java/org/bukkit/util/config/ConfigurationException.java36
45 files changed, 1239 insertions, 1239 deletions
diff --git a/src/main/java/org/bukkit/TreeType.java b/src/main/java/org/bukkit/TreeType.java
index 489b1d96..76916f77 100644
--- a/src/main/java/org/bukkit/TreeType.java
+++ b/src/main/java/org/bukkit/TreeType.java
@@ -1,14 +1,14 @@
-package org.bukkit;
-
-/**
- * Tree type.
- *
- * @author sk89q
- */
-public enum TreeType {
- TREE,
- BIG_TREE,
- REDWOOD,
- TALL_REDWOOD,
- BIRCH
-}
+package org.bukkit;
+
+/**
+ * Tree type.
+ *
+ * @author sk89q
+ */
+public enum TreeType {
+ TREE,
+ BIG_TREE,
+ REDWOOD,
+ TALL_REDWOOD,
+ BIRCH
+}
diff --git a/src/main/java/org/bukkit/block/Chest.java b/src/main/java/org/bukkit/block/Chest.java
index 8d2af5d9..9c12854f 100644
--- a/src/main/java/org/bukkit/block/Chest.java
+++ b/src/main/java/org/bukkit/block/Chest.java
@@ -1,9 +1,9 @@
-package org.bukkit.block;
-
-/**
- * Represents a chest.
- *
- * @author sk89q
- */
-public interface Chest extends BlockState, ContainerBlock {
-}
+package org.bukkit.block;
+
+/**
+ * Represents a chest.
+ *
+ * @author sk89q
+ */
+public interface Chest extends BlockState, ContainerBlock {
+}
diff --git a/src/main/java/org/bukkit/block/ContainerBlock.java b/src/main/java/org/bukkit/block/ContainerBlock.java
index 6c271ffa..c6e83140 100644
--- a/src/main/java/org/bukkit/block/ContainerBlock.java
+++ b/src/main/java/org/bukkit/block/ContainerBlock.java
@@ -1,17 +1,17 @@
-package org.bukkit.block;
-
-import org.bukkit.inventory.Inventory;
-
-/**
- * Indicates a block type that has inventory.
- *
- * @author sk89q
- */
-public interface ContainerBlock {
- /**
- * Get the block's inventory.
- *
- * @return
- */
- public Inventory getInventory();
-}
+package org.bukkit.block;
+
+import org.bukkit.inventory.Inventory;
+
+/**
+ * Indicates a block type that has inventory.
+ *
+ * @author sk89q
+ */
+public interface ContainerBlock {
+ /**
+ * Get the block's inventory.
+ *
+ * @return
+ */
+ public Inventory getInventory();
+}
diff --git a/src/main/java/org/bukkit/block/CreatureSpawner.java b/src/main/java/org/bukkit/block/CreatureSpawner.java
index 607a3132..7981c244 100644
--- a/src/main/java/org/bukkit/block/CreatureSpawner.java
+++ b/src/main/java/org/bukkit/block/CreatureSpawner.java
@@ -1,54 +1,54 @@
-package org.bukkit.block;
-
-import org.bukkit.entity.CreatureType;
-
-
-/**
- * Represents a creature spawner.
- *
- * @author sk89q
- * @author Cogito
- */
-public interface CreatureSpawner extends BlockState {
- /**
- * Get the spawner's creature type.
- *
- * @return
- */
- public CreatureType getCreatureType();
-
- /**
- * Set the spawner creature type.
- *
- * @param mobType
- */
- public void setCreatureType(CreatureType creatureType);
-
- /**
- * Get the spawner's creature type.
- *
- * @return
- */
- public String getCreatureTypeId();
-
- /**
- * Set the spawner mob type.
- *
- * @param creatureType
- */
- public void setCreatureTypeId(String creatureType);
-
- /**
- * Get the spawner's delay.
- *
- * @return
- */
- public int getDelay();
-
- /**
- * Set the spawner's delay.
- *
- * @param delay
- */
- public void setDelay(int delay);
-}
+package org.bukkit.block;
+
+import org.bukkit.entity.CreatureType;
+
+
+/**
+ * Represents a creature spawner.
+ *
+ * @author sk89q
+ * @author Cogito
+ */
+public interface CreatureSpawner extends BlockState {
+ /**
+ * Get the spawner's creature type.
+ *
+ * @return
+ */
+ public CreatureType getCreatureType();
+
+ /**
+ * Set the spawner creature type.
+ *
+ * @param mobType
+ */
+ public void setCreatureType(CreatureType creatureType);
+
+ /**
+ * Get the spawner's creature type.
+ *
+ * @return
+ */
+ public String getCreatureTypeId();
+
+ /**
+ * Set the spawner mob type.
+ *
+ * @param creatureType
+ */
+ public void setCreatureTypeId(String creatureType);
+
+ /**
+ * Get the spawner's delay.
+ *
+ * @return
+ */
+ public int getDelay();
+
+ /**
+ * Set the spawner's delay.
+ *
+ * @param delay
+ */
+ public void setDelay(int delay);
+}
diff --git a/src/main/java/org/bukkit/block/Dispenser.java b/src/main/java/org/bukkit/block/Dispenser.java
index 54659539..3a04c0d8 100644
--- a/src/main/java/org/bukkit/block/Dispenser.java
+++ b/src/main/java/org/bukkit/block/Dispenser.java
@@ -1,17 +1,17 @@
-package org.bukkit.block;
-
-/**
- * Represents a dispenser.
- *
- * @author sk89q
- */
-public interface Dispenser extends BlockState, ContainerBlock {
- /**
- * Attempts to dispense the contents of this block<br />
- * <br />
- * If the block is no longer a dispenser, this will return false
- *
- * @return true if successful, otherwise false
- */
- public boolean dispense();
-}
+package org.bukkit.block;
+
+/**
+ * Represents a dispenser.
+ *
+ * @author sk89q
+ */
+public interface Dispenser extends BlockState, ContainerBlock {
+ /**
+ * Attempts to dispense the contents of this block<br />
+ * <br />
+ * If the block is no longer a dispenser, this will return false
+ *
+ * @return true if successful, otherwise false
+ */
+ public boolean dispense();
+}
diff --git a/src/main/java/org/bukkit/block/Furnace.java b/src/main/java/org/bukkit/block/Furnace.java
index 6f3e2bea..d2722467 100644
--- a/src/main/java/org/bukkit/block/Furnace.java
+++ b/src/main/java/org/bukkit/block/Furnace.java
@@ -1,36 +1,36 @@
-package org.bukkit.block;
-
-/**
- * Represents a furnace.
- *
- * @author sk89q
- */
-public interface Furnace extends BlockState, ContainerBlock {
- /**
- * Get burn time.
- *
- * @return
- */
- public short getBurnTime();
-
- /**
- * Set burn time.
- *
- * @param burnTime
- */
- public void setBurnTime(short burnTime);
-
- /**
- * Get cook time.
- *
- * @return
- */
- public short getCookTime();
-
- /**
- * Set cook time.
- *
- * @param cookTime
- */
- public void setCookTime(short cookTime);
-}
+package org.bukkit.block;
+
+/**
+ * Represents a furnace.
+ *
+ * @author sk89q
+ */
+public interface Furnace extends BlockState, ContainerBlock {
+ /**
+ * Get burn time.
+ *
+ * @return
+ */
+ public short getBurnTime();
+
+ /**
+ * Set burn time.
+ *
+ * @param burnTime
+ */
+ public void setBurnTime(short burnTime);
+
+ /**
+ * Get cook time.
+ *
+ * @return
+ */
+ public short getCookTime();
+
+ /**
+ * Set cook time.
+ *
+ * @param cookTime
+ */
+ public void setCookTime(short cookTime);
+}
diff --git a/src/main/java/org/bukkit/block/NoteBlock.java b/src/main/java/org/bukkit/block/NoteBlock.java
index 1315c118..547bde02 100644
--- a/src/main/java/org/bukkit/block/NoteBlock.java
+++ b/src/main/java/org/bukkit/block/NoteBlock.java
@@ -1,30 +1,30 @@
-package org.bukkit.block;
-
-/**
- * Represents a note.
- *
- * @author sk89q
- */
-public interface NoteBlock extends BlockState {
- /**
- * Gets the note.
- *
- * @return
- */
- public byte getNote();
-
- /**
- * Set the note.
- *
- * @param note
- */
- public void setNote(byte note);
- /**
- * Attempts to play the note at block<br />
- * <br />
- * If the block is no longer a note block, this will return false
- *
- * @return true if successful, otherwise false
- */
- public boolean play();
-}
+package org.bukkit.block;
+
+/**
+ * Represents a note.
+ *
+ * @author sk89q
+ */
+public interface NoteBlock extends BlockState {
+ /**
+ * Gets the note.
+ *
+ * @return
+ */
+ public byte getNote();
+
+ /**
+ * Set the note.
+ *
+ * @param note
+ */
+ public void setNote(byte note);
+ /**
+ * Attempts to play the note at block<br />
+ * <br />
+ * If the block is no longer a note block, this will return false
+ *
+ * @return true if successful, otherwise false
+ */
+ public boolean play();
+}
diff --git a/src/main/java/org/bukkit/entity/Animals.java b/src/main/java/org/bukkit/entity/Animals.java
index e4ae589f..e41b3cc8 100644
--- a/src/main/java/org/bukkit/entity/Animals.java
+++ b/src/main/java/org/bukkit/entity/Animals.java
@@ -1,11 +1,11 @@
-package org.bukkit.entity;
-
-/**
- * Represents an Animal.
- *
- * @author Cogito
- *
- */
-public interface Animals extends Creature{
-
-}
+package org.bukkit.entity;
+
+/**
+ * Represents an Animal.
+ *
+ * @author Cogito
+ *
+ */
+public interface Animals extends Creature{
+
+}
diff --git a/src/main/java/org/bukkit/entity/Arrow.java b/src/main/java/org/bukkit/entity/Arrow.java
index 90efb643..33c14a86 100644
--- a/src/main/java/org/bukkit/entity/Arrow.java
+++ b/src/main/java/org/bukkit/entity/Arrow.java
@@ -1,9 +1,9 @@
-package org.bukkit.entity;
-
-/**
- * Represents an arrow.
- *
- * @author sk89q
- */
-public interface Arrow extends Entity {
-}
+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
index 1565cd81..cec262ea 100644
--- a/src/main/java/org/bukkit/entity/Boat.java
+++ b/src/main/java/org/bukkit/entity/Boat.java
@@ -1,22 +1,22 @@
-package org.bukkit.entity;
-
-/**
- * Represents a boat entity.
- *
- * @author sk89q
- */
-public interface Boat extends Vehicle {
- /**
- * Gets the maximum speed of a boat. The speed is unrelated to the velocity.
- *
- * @param speed
- */
- public double getMaxSpeed();
-
- /**
- * Sets the maximum speed of a boat. Must be nonnegative. Default is 0.4D.
- *
- * @param speed
- */
- public void setMaxSpeed(double speed);
-}
+package org.bukkit.entity;
+
+/**
+ * Represents a boat entity.
+ *
+ * @author sk89q
+ */
+public interface Boat extends Vehicle {
+ /**
+ * Gets the maximum speed of a boat. The speed is unrelated to the velocity.
+ *
+ * @param speed
+ */
+ public double getMaxSpeed();
+
+ /**
+ * Sets the maximum speed of a boat. Must be nonnegative. Default is 0.4D.
+ *
+ * @param speed
+ */
+ public void setMaxSpeed(double speed);
+}
diff --git a/src/main/java/org/bukkit/entity/Chicken.java b/src/main/java/org/bukkit/entity/Chicken.java
index db7fb3ea..6254911d 100644
--- a/src/main/java/org/bukkit/entity/Chicken.java
+++ b/src/main/java/org/bukkit/entity/Chicken.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Chicken.
- *
- * @author Cogito
- *
- */
-public interface Chicken extends Animals {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Chicken.
+ *
+ * @author Cogito
+ *
+ */
+public interface Chicken extends Animals {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Cow.java b/src/main/java/org/bukkit/entity/Cow.java
index 67e34a91..4af61f09 100644
--- a/src/main/java/org/bukkit/entity/Cow.java
+++ b/src/main/java/org/bukkit/entity/Cow.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Cow.
- *
- * @author Cogito
- *
- */
-public interface Cow extends Animals {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Cow.
+ *
+ * @author Cogito
+ *
+ */
+public interface Cow extends Animals {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Creature.java b/src/main/java/org/bukkit/entity/Creature.java
index 2589f4c9..15605732 100644
--- a/src/main/java/org/bukkit/entity/Creature.java
+++ b/src/main/java/org/bukkit/entity/Creature.java
@@ -1,23 +1,23 @@
-package org.bukkit.entity;
-
-/**
- * Represents a Creature. Creatures are non-intelligent monsters or animals which
- * have very simple abilities.
- */
-public interface Creature extends LivingEntity {
- /**
- * Instructs this Creature to set the specified LivingEntity as its target.
- * Hostile creatures may attack their target, and friendly creatures may
- * follow their target.
- *
- * @param target New LivingEntity to target, or null to clear the target
- */
- public void setTarget(LivingEntity target);
-
- /**
- * Gets the current target of this Creature
- *
- * @return Current target of this creature, or null if none exists
- */
- public LivingEntity getTarget();
-}
+package org.bukkit.entity;
+
+/**
+ * Represents a Creature. Creatures are non-intelligent monsters or animals which
+ * have very simple abilities.
+ */
+public interface Creature extends LivingEntity {
+ /**
+ * Instructs this Creature to set the specified LivingEntity as its target.
+ * Hostile creatures may attack their target, and friendly creatures may
+ * follow their target.
+ *
+ * @param target New LivingEntity to target, or null to clear the target
+ */
+ public void setTarget(LivingEntity target);
+
+ /**
+ * Gets the current target of this Creature
+ *
+ * @return Current target of this creature, or null if none exists
+ */
+ public LivingEntity getTarget();
+}
diff --git a/src/main/java/org/bukkit/entity/Egg.java b/src/main/java/org/bukkit/entity/Egg.java
index c7b3d022..6de27264 100644
--- a/src/main/java/org/bukkit/entity/Egg.java
+++ b/src/main/java/org/bukkit/entity/Egg.java
@@ -1,9 +1,9 @@
-package org.bukkit.entity;
-
-/**
- * Represents an egg.
- *
- * @author sk89q
- */
-public interface Egg extends Entity {
-}
+package org.bukkit.entity;
+
+/**
+ * Represents an egg.
+ *
+ * @author sk89q
+ */
+public interface Egg extends Entity {
+}
diff --git a/src/main/java/org/bukkit/entity/FallingSand.java b/src/main/java/org/bukkit/entity/FallingSand.java
index 0e498170..3d4853fb 100644
--- a/src/main/java/org/bukkit/entity/FallingSand.java
+++ b/src/main/java/org/bukkit/entity/FallingSand.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents Falling Sand.
- *
- * @author Cogito
- *
- */
-public interface FallingSand extends Entity {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents Falling Sand.
+ *
+ * @author Cogito
+ *
+ */
+public interface FallingSand extends Entity {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Fireball.java b/src/main/java/org/bukkit/entity/Fireball.java
index 424de301..180a762d 100644
--- a/src/main/java/org/bukkit/entity/Fireball.java
+++ b/src/main/java/org/bukkit/entity/Fireball.java
@@ -1,9 +1,9 @@
-package org.bukkit.entity;
-
-/**
- * Represents a Fireball.
- *
- * @author Cogito
- */
-public interface Fireball extends Entity {
-}
+package org.bukkit.entity;
+
+/**
+ * Represents a Fireball.
+ *
+ * @author Cogito
+ */
+public interface Fireball extends Entity {
+}
diff --git a/src/main/java/org/bukkit/entity/Fish.java b/src/main/java/org/bukkit/entity/Fish.java
index 44fcede7..1808db49 100644
--- a/src/main/java/org/bukkit/entity/Fish.java
+++ b/src/main/java/org/bukkit/entity/Fish.java
@@ -1,9 +1,9 @@
-package org.bukkit.entity;
-
-/**
- * Represents a Fish.
- *
- * @author Cogito
- */
-public interface Fish extends Entity {
-}
+package org.bukkit.entity;
+
+/**
+ * Represents a Fish.
+ *
+ * @author Cogito
+ */
+public interface Fish extends Entity {
+}
diff --git a/src/main/java/org/bukkit/entity/Flying.java b/src/main/java/org/bukkit/entity/Flying.java
index 14099fa3..11571547 100644
--- a/src/main/java/org/bukkit/entity/Flying.java
+++ b/src/main/java/org/bukkit/entity/Flying.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Flying Entity.
- *
- * @author Cogito
- *
- */
-public interface Flying extends LivingEntity {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Flying Entity.
+ *
+ * @author Cogito
+ *
+ */
+public interface Flying extends LivingEntity {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Ghast.java b/src/main/java/org/bukkit/entity/Ghast.java
index a84c4786..97d6cde2 100644
--- a/src/main/java/org/bukkit/entity/Ghast.java
+++ b/src/main/java/org/bukkit/entity/Ghast.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Ghast.
- *
- * @author Cogito
- *
- */
-public interface Ghast extends Flying {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Ghast.
+ *
+ * @author Cogito
+ *
+ */
+public interface Ghast extends Flying {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Giant.java b/src/main/java/org/bukkit/entity/Giant.java
index 5a42baed..05a59507 100644
--- a/src/main/java/org/bukkit/entity/Giant.java
+++ b/src/main/java/org/bukkit/entity/Giant.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Giant.
- *
- * @author Cogito
- *
- */
-public interface Giant extends Monster {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Giant.
+ *
+ * @author Cogito
+ *
+ */
+public interface Giant extends Monster {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Item.java b/src/main/java/org/bukkit/entity/Item.java
index aaf5b3d4..e66b14d4 100644
--- a/src/main/java/org/bukkit/entity/Item.java
+++ b/src/main/java/org/bukkit/entity/Item.java
@@ -1,26 +1,26 @@
-package org.bukkit.entity;
-
-import org.bukkit.inventory.ItemStack;
-
-/**
- * Represents an Item.
- *
- * @author Cogito
- *
- */
-public interface Item extends Entity {
-
- /**
- * Gets the item stack associated with this item drop.
- *
- * @return
- */
- public ItemStack getItemStack();
-
- /**
- * Sets the item stack associated with this item drop.
- *
- * @param stack
- */
- public void setItemStack(ItemStack stack);
-}
+package org.bukkit.entity;
+
+import org.bukkit.inventory.ItemStack;
+
+/**
+ * Represents an Item.
+ *
+ * @author Cogito
+ *
+ */
+public interface Item extends Entity {
+
+ /**
+ * Gets the item stack associated with this item drop.
+ *
+ * @return
+ */
+ public ItemStack getItemStack();
+
+ /**
+ * Sets the item stack associated with this item drop.
+ *
+ * @param stack
+ */
+ public void setItemStack(ItemStack stack);
+}
diff --git a/src/main/java/org/bukkit/entity/Minecart.java b/src/main/java/org/bukkit/entity/Minecart.java
index 71a84c04..4d51cbba 100644
--- a/src/main/java/org/bukkit/entity/Minecart.java
+++ b/src/main/java/org/bukkit/entity/Minecart.java
@@ -1,83 +1,83 @@
-package org.bukkit.entity;
-
-import org.bukkit.util.Vector;
-
-/**
- * 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();
-
- /**
- * Gets the maximum speed of a minecart. The speed is unrelated to the velocity.
- *
- * @param speed
- */
- public double getMaxSpeed();
-
- /**
- * Sets the maximum speed of a minecart. Must be nonnegative. Default is 0.4D.
- *
- * @param speed
- */
- public void setMaxSpeed(double speed);
-
- /**
- * Returns whether this minecart will slow down faster without a passenger occupying it
- *
- */
- public boolean isSlowWhenEmpty();
-
- /**
- * Sets whether this minecart will slow down faster without a passenger occupying it
- *
- * @param slow
- */
- public void setSlowWhenEmpty(boolean slow);
-
- /**
- * Gets the flying velocity modifier. Used for minecarts that are in mid-air.
- * A flying minecart's velocity is multiplied by this factor each tick.
- *
- * @param flying velocity modifier
- */
- public Vector getFlyingVelocityMod();
-
- /**
- * Sets the flying velocity modifier. Used for minecarts that are in mid-air.
- * A flying minecart's velocity is multiplied by this factor each tick.
- *
- * @param flying velocity modifier
- */
- public void setFlyingVelocityMod(Vector flying);
-
- /**
- * Gets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.
- *
- * A derailed minecart's velocity is multiplied by this factor each tick.
- * @param visible speed
- */
- public Vector getDerailedVelocityMod();
-
- /**
- * Sets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.
- * A derailed minecart's velocity is multiplied by this factor each tick.
- *
- * @param visible speed
- */
- public void setDerailedVelocityMod(Vector derailed);
-}
+package org.bukkit.entity;
+
+import org.bukkit.util.Vector;
+
+/**
+ * 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();
+
+ /**
+ * Gets the maximum speed of a minecart. The speed is unrelated to the velocity.
+ *
+ * @param speed
+ */
+ public double getMaxSpeed();
+
+ /**
+ * Sets the maximum speed of a minecart. Must be nonnegative. Default is 0.4D.
+ *
+ * @param speed
+ */
+ public void setMaxSpeed(double speed);
+
+ /**
+ * Returns whether this minecart will slow down faster without a passenger occupying it
+ *
+ */
+ public boolean isSlowWhenEmpty();
+
+ /**
+ * Sets whether this minecart will slow down faster without a passenger occupying it
+ *
+ * @param slow
+ */
+ public void setSlowWhenEmpty(boolean slow);
+
+ /**
+ * Gets the flying velocity modifier. Used for minecarts that are in mid-air.
+ * A flying minecart's velocity is multiplied by this factor each tick.
+ *
+ * @param flying velocity modifier
+ */
+ public Vector getFlyingVelocityMod();
+
+ /**
+ * Sets the flying velocity modifier. Used for minecarts that are in mid-air.
+ * A flying minecart's velocity is multiplied by this factor each tick.
+ *
+ * @param flying velocity modifier
+ */
+ public void setFlyingVelocityMod(Vector flying);
+
+ /**
+ * Gets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.
+ *
+ * A derailed minecart's velocity is multiplied by this factor each tick.
+ * @param visible speed
+ */
+ public Vector getDerailedVelocityMod();
+
+ /**
+ * Sets the derailed velocity modifier. Used for minecarts that are on the ground, but not on rails.
+ * A derailed minecart's velocity is multiplied by this factor each tick.
+ *
+ * @param visible speed
+ */
+ public void setDerailedVelocityMod(Vector derailed);
+}
diff --git a/src/main/java/org/bukkit/entity/Monster.java b/src/main/java/org/bukkit/entity/Monster.java
index 2f20e4d4..86e4d298 100644
--- a/src/main/java/org/bukkit/entity/Monster.java
+++ b/src/main/java/org/bukkit/entity/Monster.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Monster.
- *
- * @author Cogito
- *
- */
-public interface Monster extends Creature {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Monster.
+ *
+ * @author Cogito
+ *
+ */
+public interface Monster extends Creature {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Painting.java b/src/main/java/org/bukkit/entity/Painting.java
index 7dab8d12..1aa654e8 100644
--- a/src/main/java/org/bukkit/entity/Painting.java
+++ b/src/main/java/org/bukkit/entity/Painting.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Painting.
- *
- * @author Cogito
- *
- */
-public interface Painting extends Entity {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Painting.
+ *
+ * @author Cogito
+ *
+ */
+public interface Painting extends Entity {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Pig.java b/src/main/java/org/bukkit/entity/Pig.java
index cfe250b1..2d67cb04 100644
--- a/src/main/java/org/bukkit/entity/Pig.java
+++ b/src/main/java/org/bukkit/entity/Pig.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Pig.
- *
- * @author Cogito
- *
- */
-public interface Pig extends Animals {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Pig.
+ *
+ * @author Cogito
+ *
+ */
+public interface Pig extends Animals {
+
+}
diff --git a/src/main/java/org/bukkit/entity/PigZombie.java b/src/main/java/org/bukkit/entity/PigZombie.java
index 25670d27..721f7d2c 100644
--- a/src/main/java/org/bukkit/entity/PigZombie.java
+++ b/src/main/java/org/bukkit/entity/PigZombie.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Pig Zombie.
- *
- * @author Cogito
- *
- */
-public interface PigZombie extends Zombie {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Pig Zombie.
+ *
+ * @author Cogito
+ *
+ */
+public interface PigZombie extends Zombie {
+
+}
diff --git a/src/main/java/org/bukkit/entity/PoweredMinecart.java b/src/main/java/org/bukkit/entity/PoweredMinecart.java
index 66f5ba7f..9a8f0285 100644
--- a/src/main/java/org/bukkit/entity/PoweredMinecart.java
+++ b/src/main/java/org/bukkit/entity/PoweredMinecart.java
@@ -1,10 +1,10 @@
-package org.bukkit.entity;
-
-/**
- * Represents a powered minecart.
- *
- * @author sk89q
- */
-public interface PoweredMinecart extends Minecart {
-
-}
+package org.bukkit.entity;
+
+/**
+ * Represents a powered minecart.
+ *
+ * @author sk89q
+ */
+public interface PoweredMinecart extends Minecart {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Skeleton.java b/src/main/java/org/bukkit/entity/Skeleton.java
index 651cc90a..b9552cb4 100644
--- a/src/main/java/org/bukkit/entity/Skeleton.java
+++ b/src/main/java/org/bukkit/entity/Skeleton.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Skeleton.
- *
- * @author Cogito
- *
- */
-public interface Skeleton extends Monster {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Skeleton.
+ *
+ * @author Cogito
+ *
+ */
+public interface Skeleton extends Monster {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Snowball.java b/src/main/java/org/bukkit/entity/Snowball.java
index 69ac03ab..4799c83a 100644
--- a/src/main/java/org/bukkit/entity/Snowball.java
+++ b/src/main/java/org/bukkit/entity/Snowball.java
@@ -1,9 +1,9 @@
-package org.bukkit.entity;
-
-/**
- * Implements a snowball.
- *
- * @author sk89q
- */
-public interface Snowball extends Entity {
-}
+package org.bukkit.entity;
+
+/**
+ * Implements a snowball.
+ *
+ * @author sk89q
+ */
+public interface Snowball extends Entity {
+}
diff --git a/src/main/java/org/bukkit/entity/Spider.java b/src/main/java/org/bukkit/entity/Spider.java
index 1e0edc04..e3614040 100644
--- a/src/main/java/org/bukkit/entity/Spider.java
+++ b/src/main/java/org/bukkit/entity/Spider.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Spider.
- *
- * @author Cogito
- *
- */
-public interface Spider extends Monster {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Spider.
+ *
+ * @author Cogito
+ *
+ */
+public interface Spider extends Monster {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Squid.java b/src/main/java/org/bukkit/entity/Squid.java
index 58a6f391..d5b25aea 100644
--- a/src/main/java/org/bukkit/entity/Squid.java
+++ b/src/main/java/org/bukkit/entity/Squid.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Squid.
- *
- * @author Cogito
- *
- */
-public interface Squid extends WaterMob {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Squid.
+ *
+ * @author Cogito
+ *
+ */
+public interface Squid extends WaterMob {
+
+}
diff --git a/src/main/java/org/bukkit/entity/StorageMinecart.java b/src/main/java/org/bukkit/entity/StorageMinecart.java
index 81b588ff..6d4cfefe 100644
--- a/src/main/java/org/bukkit/entity/StorageMinecart.java
+++ b/src/main/java/org/bukkit/entity/StorageMinecart.java
@@ -1,17 +1,17 @@
-package org.bukkit.entity;
-
-import org.bukkit.inventory.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();
-}
+package org.bukkit.entity;
+
+import org.bukkit.inventory.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/TNTPrimed.java b/src/main/java/org/bukkit/entity/TNTPrimed.java
index 3532fb18..160bfaf0 100644
--- a/src/main/java/org/bukkit/entity/TNTPrimed.java
+++ b/src/main/java/org/bukkit/entity/TNTPrimed.java
@@ -1,14 +1,14 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Primed TNT.
- *
- * @author Cogito
- *
- */
-public interface TNTPrimed extends Entity {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Primed TNT.
+ *
+ * @author Cogito
+ *
+ */
+public interface TNTPrimed extends Entity {
+
+}
diff --git a/src/main/java/org/bukkit/entity/WaterMob.java b/src/main/java/org/bukkit/entity/WaterMob.java
index 8ab61165..f01a5a3f 100644
--- a/src/main/java/org/bukkit/entity/WaterMob.java
+++ b/src/main/java/org/bukkit/entity/WaterMob.java
@@ -1,13 +1,13 @@
-/**
- *
- */
-package org.bukkit.entity;
-
-/**
- * Represents a Water Mob
- * @author Cogito
- *
- */
-public interface WaterMob extends Creature {
-
-}
+/**
+ *
+ */
+package org.bukkit.entity;
+
+/**
+ * Represents a Water Mob
+ * @author Cogito
+ *
+ */
+public interface WaterMob extends Creature {
+
+}
diff --git a/src/main/java/org/bukkit/entity/Zombie.java b/src/main/java/org/bukkit/entity/Zombie.java
index 18b9a283..b5888655 100644
--- a/src/main/java/org/bukkit/entity/Zombie.java
+++ b/src/main/java/org/bukkit/entity/Zombie.java
@@ -1,11 +1,11 @@
-package org.bukkit.entity;
-
-/**
- * Represents a Zombie.
- *
- * @author Cogito
- *
- */
-public interface Zombie extends Monster{
-
-}
+package org.bukkit.entity;
+
+/**
+ * Represents a Zombie.
+ *
+ * @author Cogito
+ *
+ */
+public interface Zombie extends Monster{
+
+}
diff --git a/src/main/java/org/bukkit/event/block/BlockEvent.java b/src/main/java/org/bukkit/event/block/BlockEvent.java
index 08a42c45..d7875348 100644
--- a/src/main/java/org/bukkit/event/block/BlockEvent.java
+++ b/src/main/java/org/bukkit/event/block/BlockEvent.java
@@ -1,24 +1,24 @@
-package org.bukkit.event.block;
-
-import org.bukkit.block.Block;
-import org.bukkit.event.Event;
-
-/**
- * Represents a block related event
- */
-public class BlockEvent extends Event {
- protected Block block;
-
- public BlockEvent(final Event.Type type, final Block theBlock) {
- super(type);
- block = theBlock;
- }
-
- /**
- * Returns the block involved in this event
- * @return Block which block is involved in this event
- */
- public final Block getBlock() {
- return block;
- }
-}
+package org.bukkit.event.block;
+
+import org.bukkit.block.Block;
+import org.bukkit.event.Event;
+
+/**
+ * Represents a block related event
+ */
+public class BlockEvent extends Event {
+ protected Block block;
+
+ public BlockEvent(final Event.Type type, final Block theBlock) {
+ super(type);
+ block = theBlock;
+ }
+
+ /**
+ * Returns the block involved in this event
+ * @return Block which block is involved in this event
+ */
+ public final Block getBlock() {
+ return block;
+ }
+}
diff --git a/src/main/java/org/bukkit/event/player/PlayerEvent.java b/src/main/java/org/bukkit/event/player/PlayerEvent.java
index 2e176535..d74bc547 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.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;
- }
-}
+
+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/vehicle/VehicleCollisionEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java
index da7e2bd9..358ec3a0 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleCollisionEvent.java
@@ -1,14 +1,14 @@
-package org.bukkit.event.vehicle;
-
-import org.bukkit.entity.Vehicle;
-
-/**
- * Raised when a vehicle collides.
- *
- * @author sk89q
- */
-public class VehicleCollisionEvent extends VehicleEvent {
- public VehicleCollisionEvent(Type type, Vehicle vehicle) {
- super(type, vehicle);
- }
-}
+package org.bukkit.event.vehicle;
+
+import org.bukkit.entity.Vehicle;
+
+/**
+ * Raised when a vehicle collides.
+ *
+ * @author sk89q
+ */
+public class VehicleCollisionEvent extends VehicleEvent {
+ public VehicleCollisionEvent(Type type, Vehicle vehicle) {
+ super(type, vehicle);
+ }
+}
diff --git a/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java b/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java
index 78fc757d..292d6ee8 100644
--- a/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java
+++ b/src/main/java/org/bukkit/event/vehicle/VehicleEvent.java
@@ -1,27 +1,27 @@
-package org.bukkit.event.vehicle;
-
-import org.bukkit.entity.Vehicle;
-import org.bukkit.event.Event;
-
-/**
- * Represents a vehicle-related event.
- *
- * @author sk89q
- */
-public class VehicleEvent extends Event {
- protected Vehicle vehicle;
-
- public VehicleEvent(final Event.Type type, final Vehicle vehicle) {
- super(type);
- this.vehicle = vehicle;
- }
-
- /**
- * Get the vehicle.
- *
- * @return the vehicle
- */
- public final Vehicle getVehicle() {
- return vehicle;
- }
-}
+package org.bukkit.event.vehicle;
+
+import org.bukkit.entity.Vehicle;
+import org.bukkit.event.Event;
+
+/**
+ * Represents a vehicle-related event.
+ *
+ * @author sk89q
+ */
+public class VehicleEvent extends Event {
+ protected Vehicle vehicle;
+
+ public VehicleEvent(final Event.Type type, final Vehicle vehicle) {
+ super(type);
+ this.vehicle = vehicle;
+ }
+
+ /**
+ * Get the vehicle.
+ *
+ * @return the vehicle
+ */
+ public final Vehicle getVehicle() {
+ return vehicle;
+ }
+}
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 556a5821..ee80d205 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -1,204 +1,204 @@
-
-package org.bukkit.inventory;
-
-import org.bukkit.Material;
-import org.bukkit.material.MaterialData;
-
-/**
- * Represents a stack of items
- */
-public class ItemStack {
- private int type;
- private int amount = 0;
- private MaterialData data = null;
- private short durability = 0;
-
- public ItemStack(final int type) {
- this(type, 0);
- }
-
- public ItemStack(final Material type) {
- this(type, 0);
- }
-
- public ItemStack(final int type, final int amount) {
- this(type, amount, (short) 0);
- }
-
- public ItemStack(final Material type, final int amount) {
- this(type.getId(), amount);
- }
-
- public ItemStack(final int type, final int amount, final short damage) {
- this(type, amount, damage, null);
- }
-
- public ItemStack(final Material type, final int amount, final short damage) {
- this(type.getId(), amount, damage);
- }
-
- public ItemStack(final int type, final int amount, final short damage, final Byte data) {
- this.type = type;
- this.amount = amount;
- this.durability = damage;
- if (data != null) {
- createData(data);
- this.durability = data;
- }
- }
-
- public ItemStack(final Material type, final int amount, final short damage, final Byte data) {
- this(type.getId(), amount, damage, data);
- }
-
- /**
- * Gets the type of this item
- *
- * @return Type of the items in this stack
- */
- public Material getType() {
- return Material.getMaterial(type);
- }
-
- /**
- * Sets the type of this item<br />
- * <br />
- * Note that in doing so you will reset the MaterialData for this stack
- *
- * @param type New type to set the items in this stack to
- */
- public void setType(Material type) {
- setTypeId(type.getId());
- }
-
- /**
- * Gets the type id of this item
- *
- * @return Type Id of the items in this stack
- */
- public int getTypeId() {
- return type;
- }
-
- /**
- * Sets the type id of this item<br />
- * <br />
- * Note that in doing so you will reset the MaterialData for this stack
- *
- * @param type New type id to set the items in this stack to
- */
- public void setTypeId(int type) {
- this.type = type;
- createData((byte)0);
- }
-
- /**
- * Gets the amount of items in this stack
- *
- * @return Amount of items in this stick
- */
- public int getAmount() {
- return amount;
- }
-
- /**
- * Sets the amount of items in this stack
- *
- * @param amount New amount of items in this stack
- */
- public void setAmount(int amount) {
- this.amount = amount;
- }
-
- /**
- * Gets the MaterialData for this stack of items
- *
- * @return MaterialData for this item
- */
- public MaterialData getData() {
- if (Material.getMaterial(getTypeId()).getData() != null) {
- data = Material.getMaterial(getTypeId()).getNewData((byte)this.durability);
- }
-
- return data;
- }
-
- /**
- * Sets the MaterialData for this stack of items
- *
- * @param amount New MaterialData for this item
- */
- public void setData(MaterialData data) {
- Material mat = getType();
-
- if ((mat == null) || (mat.getData() == null)) {
- this.data = data;
- } else {
- if ((data.getClass() == mat.getData()) || (data.getClass() == MaterialData.class)) {
- this.data = data;
- } else {
- throw new IllegalArgumentException("Provided data is not of type "
- + mat.getData().getName() + ", found " + data.getClass().getName());
- }
- }
- }
-
- /**
- * Sets the durability of this item
- *
- * @param durability Durability of this item
- */
- public void setDurability(final short durability) {
- this.durability = durability;
- }
-
- /**
- * Gets the durability of this item
- *
- * @return Durability of this item
- */
- public short getDurability() {
- return durability;
- }
-
- /**
- * Get the maximum stacksize for the material hold in this ItemStack
- * Returns -1 if it has no idea.
- *
- * @return The maximum you can stack this material to.
- */
- public int getMaxStackSize() {
- return -1;
- }
-
- private void createData(final byte data) {
- Material mat = Material.getMaterial(type);
- if (mat == null) {
- this.data = new MaterialData(type, data);
- } else {
- this.data = mat.getNewData(data);
- }
- }
-
- @Override
- public String toString() {
- return "ItemStack{"+getType().name()+" x "+getAmount()+"}";
- }
-
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof ItemStack))
- return false;
-
- ItemStack item = (ItemStack)obj;
- return item.getAmount() == getAmount() && item.getTypeId() == getTypeId();
- }
-
- @Override
- public int hashCode() {
- int hash = 11;
- hash = hash * 19 + 7 * getTypeId(); // Overriding hashCode since equals is overridden, it's just
- hash = hash * 7 + 23 * getAmount(); // too bad these are mutable values... Q_Q
- return hash;
- }
-}
+
+package org.bukkit.inventory;
+
+import org.bukkit.Material;
+import org.bukkit.material.MaterialData;
+
+/**
+ * Represents a stack of items
+ */
+public class ItemStack {
+ private int type;
+ private int amount = 0;
+ private MaterialData data = null;
+ private short durability = 0;
+
+ public ItemStack(final int type) {
+ this(type, 0);
+ }
+
+ public ItemStack(final Material type) {
+ this(type, 0);
+ }
+
+ public ItemStack(final int type, final int amount) {
+ this(type, amount, (short) 0);
+ }
+
+ public ItemStack(final Material type, final int amount) {
+ this(type.getId(), amount);
+ }
+
+ public ItemStack(final int type, final int amount, final short damage) {
+ this(type, amount, damage, null);
+ }
+
+ public ItemStack(final Material type, final int amount, final short damage) {
+ this(type.getId(), amount, damage);
+ }
+
+ public ItemStack(final int type, final int amount, final short damage, final Byte data) {
+ this.type = type;
+ this.amount = amount;
+ this.durability = damage;
+ if (data != null) {
+ createData(data);
+ this.durability = data;
+ }
+ }
+
+ public ItemStack(final Material type, final int amount, final short damage, final Byte data) {
+ this(type.getId(), amount, damage, data);
+ }
+
+ /**
+ * Gets the type of this item
+ *
+ * @return Type of the items in this stack
+ */
+ public Material getType() {
+ return Material.getMaterial(type);
+ }
+
+ /**
+ * Sets the type of this item<br />
+ * <br />
+ * Note that in doing so you will reset the MaterialData for this stack
+ *
+ * @param type New type to set the items in this stack to
+ */
+ public void setType(Material type) {
+ setTypeId(type.getId());
+ }
+
+ /**
+ * Gets the type id of this item
+ *
+ * @return Type Id of the items in this stack
+ */
+ public int getTypeId() {
+ return type;
+ }
+
+ /**
+ * Sets the type id of this item<br />
+ * <br />
+ * Note that in doing so you will reset the MaterialData for this stack
+ *
+ * @param type New type id to set the items in this stack to
+ */
+ public void setTypeId(int type) {
+ this.type = type;
+ createData((byte)0);
+ }
+
+ /**
+ * Gets the amount of items in this stack
+ *
+ * @return Amount of items in this stick
+ */
+ public int getAmount() {
+ return amount;
+ }
+
+ /**
+ * Sets the amount of items in this stack
+ *
+ * @param amount New amount of items in this stack
+ */
+ public void setAmount(int amount) {
+ this.amount = amount;
+ }
+
+ /**
+ * Gets the MaterialData for this stack of items
+ *
+ * @return MaterialData for this item
+ */
+ public MaterialData getData() {
+ if (Material.getMaterial(getTypeId()).getData() != null) {
+ data = Material.getMaterial(getTypeId()).getNewData((byte)this.durability);
+ }
+
+ return data;
+ }
+
+ /**
+ * Sets the MaterialData for this stack of items
+ *
+ * @param amount New MaterialData for this item
+ */
+ public void setData(MaterialData data) {
+ Material mat = getType();
+
+ if ((mat == null) || (mat.getData() == null)) {
+ this.data = data;
+ } else {
+ if ((data.getClass() == mat.getData()) || (data.getClass() == MaterialData.class)) {
+ this.data = data;
+ } else {
+ throw new IllegalArgumentException("Provided data is not of type "
+ + mat.getData().getName() + ", found " + data.getClass().getName());
+ }
+ }
+ }
+
+ /**
+ * Sets the durability of this item
+ *
+ * @param durability Durability of this item
+ */
+ public void setDurability(final short durability) {
+ this.durability = durability;
+ }
+
+ /**
+ * Gets the durability of this item
+ *
+ * @return Durability of this item
+ */
+ public short getDurability() {
+ return durability;
+ }
+
+ /**
+ * Get the maximum stacksize for the material hold in this ItemStack
+ * Returns -1 if it has no idea.
+ *
+ * @return The maximum you can stack this material to.
+ */
+ public int getMaxStackSize() {
+ return -1;
+ }
+
+ private void createData(final byte data) {
+ Material mat = Material.getMaterial(type);
+ if (mat == null) {
+ this.data = new MaterialData(type, data);
+ } else {
+ this.data = mat.getNewData(data);
+ }
+ }
+
+ @Override
+ public String toString() {
+ return "ItemStack{"+getType().name()+" x "+getAmount()+"}";
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof ItemStack))
+ return false;
+
+ ItemStack item = (ItemStack)obj;
+ return item.getAmount() == getAmount() && item.getTypeId() == getTypeId();
+ }
+
+ @Override
+ public int hashCode() {
+ int hash = 11;
+ hash = hash * 19 + 7 * getTypeId(); // Overriding hashCode since equals is overridden, it's just
+ hash = hash * 7 + 23 * getAmount(); // too bad these are mutable values... Q_Q
+ return hash;
+ }
+}
diff --git a/src/main/java/org/bukkit/inventory/PlayerInventory.java b/src/main/java/org/bukkit/inventory/PlayerInventory.java
index 0e82ca0e..73f20463 100644
--- a/src/main/java/org/bukkit/inventory/PlayerInventory.java
+++ b/src/main/java/org/bukkit/inventory/PlayerInventory.java
@@ -1,94 +1,94 @@
-package org.bukkit.inventory;
-
-/**
- * Includes interface to the 4 armor slots
- */
-public interface PlayerInventory extends Inventory {
- /**
- * Get all ItemStacks from the armor slots
- *
- * @return All the ItemStacks from the armor slots
- */
- public ItemStack[] getArmorContents();
-
- /**
- * Return the ItemStack from the helmet slot
- *
- * @return The ItemStack in the helmet slot
- */
- public ItemStack getHelmet();
-
- /**
- * Return the ItemStack from the chestplate slot
- *
- * @return The ItemStack in the chestplate slot
- */
- public ItemStack getChestplate();
-
- /**
- * Return the ItemStack from the leg slot
- *
- * @return The ItemStack in the leg slot
- */
- public ItemStack getLeggings();
-
- /**
- * Return the ItemStack from the boots slot
- *
- * @return The ItemStack in the boots slot
- */
- public ItemStack getBoots();
-
- /**
- * Put the given ItemStack into the helmet slot
- * This does not check if the ItemStack is a helmet
- *
- * @param helmet The ItemStack to use as helmet
- */
- public void setHelmet(ItemStack helmet);
-
- /**
- * Put the given ItemStack into the chestplate slot
- * This does not check if the ItemStack is a chestplate
- *
- * @param chestplate The ItemStack to use as chestplate
- */
- public void setChestplate(ItemStack chestplate);
-
- /**
- * Put the given ItemStack into the leg slot
- * This does not check if the ItemStack is a pair of leggings
- *
- * @param leggings The ItemStack to use as leggings
- */
- public void setLeggings(ItemStack leggings);
-
- /**
- * Put the given ItemStack into the boots slot
- * This does not check if the ItemStack is a boots
- *
- * @param boots The ItemStack to use as boots
- */
- public void setBoots(ItemStack boots);
-
- /**
- * Returns the ItemStack currently hold
- *
- * @return The currently held ItemStack
- */
- public ItemStack getItemInHand();
-
- /**
- * Sets the item in hand
- *
- * @param stack Stack to set
- */
- public void setItemInHand(ItemStack stack);
-
- /**
- * Get the slot number of the currently held item
- *
- * @return Held item slot number
- */
- public int getHeldItemSlot();
+package org.bukkit.inventory;
+
+/**
+ * Includes interface to the 4 armor slots
+ */
+public interface PlayerInventory extends Inventory {
+ /**
+ * Get all ItemStacks from the armor slots
+ *
+ * @return All the ItemStacks from the armor slots
+ */
+ public ItemStack[] getArmorContents();
+
+ /**
+ * Return the ItemStack from the helmet slot
+ *
+ * @return The ItemStack in the helmet slot
+ */
+ public ItemStack getHelmet();
+
+ /**
+ * Return the ItemStack from the chestplate slot
+ *
+ * @return The ItemStack in the chestplate slot
+ */
+ public ItemStack getChestplate();
+
+ /**
+ * Return the ItemStack from the leg slot
+ *
+ * @return The ItemStack in the leg slot
+ */
+ public ItemStack getLeggings();
+
+ /**
+ * Return the ItemStack from the boots slot
+ *
+ * @return The ItemStack in the boots slot
+ */
+ public ItemStack getBoots();
+
+ /**
+ * Put the given ItemStack into the helmet slot
+ * This does not check if the ItemStack is a helmet
+ *
+ * @param helmet The ItemStack to use as helmet
+ */
+ public void setHelmet(ItemStack helmet);
+
+ /**
+ * Put the given ItemStack into the chestplate slot
+ * This does not check if the ItemStack is a chestplate
+ *
+ * @param chestplate The ItemStack to use as chestplate
+ */
+ public void setChestplate(ItemStack chestplate);
+
+ /**
+ * Put the given ItemStack into the leg slot
+ * This does not check if the ItemStack is a pair of leggings
+ *
+ * @param leggings The ItemStack to use as leggings
+ */
+ public void setLeggings(ItemStack leggings);
+
+ /**
+ * Put the given ItemStack into the boots slot
+ * This does not check if the ItemStack is a boots
+ *
+ * @param boots The ItemStack to use as boots
+ */
+ public void setBoots(ItemStack boots);
+
+ /**
+ * Returns the ItemStack currently hold
+ *
+ * @return The currently held ItemStack
+ */
+ public ItemStack getItemInHand();
+
+ /**
+ * Sets the item in hand
+ *
+ * @param stack Stack to set
+ */
+ public void setItemInHand(ItemStack stack);
+
+ /**
+ * Get the slot number of the currently held item
+ *
+ * @return Held item slot number
+ */
+ public int getHeldItemSlot();
} \ No newline at end of file
diff --git a/src/main/java/org/bukkit/material/Colorable.java b/src/main/java/org/bukkit/material/Colorable.java
index 05fca12e..ab9608c9 100644
--- a/src/main/java/org/bukkit/material/Colorable.java
+++ b/src/main/java/org/bukkit/material/Colorable.java
@@ -1,27 +1,27 @@
-package org.bukkit.material;
-
-import org.bukkit.DyeColor;
-
-/**
- * An object that can be colored.
- *
- * @author Cogito
- *
- */
-public interface Colorable {
-
- /**
- * Gets the color of this object.
- *
- * @return The DyeColor of this object.
- */
- public DyeColor getColor();
-
- /**
- * Sets the color of this object to the specified DyeColor.
- *
- * @param color The color of the object, as a DyeColor.
- */
- public void setColor(DyeColor color);
-
-}
+package org.bukkit.material;
+
+import org.bukkit.DyeColor;
+
+/**
+ * An object that can be colored.
+ *
+ * @author Cogito
+ *
+ */
+public interface Colorable {
+
+ /**
+ * Gets the color of this object.
+ *
+ * @return The DyeColor of this object.
+ */
+ public DyeColor getColor();
+
+ /**
+ * Sets the color of this object to the specified DyeColor.
+ *
+ * @param color The color of the object, as a DyeColor.
+ */
+ public void setColor(DyeColor color);
+
+}
diff --git a/src/main/java/org/bukkit/plugin/InvalidDescriptionException.java b/src/main/java/org/bukkit/plugin/InvalidDescriptionException.java
index a1a7551a..ce1f7e3e 100644
--- a/src/main/java/org/bukkit/plugin/InvalidDescriptionException.java
+++ b/src/main/java/org/bukkit/plugin/InvalidDescriptionException.java
@@ -1,62 +1,62 @@
-
-package org.bukkit.plugin;
-
-/**
- * Thrown when attempting to load an invalid PluginDescriptionFile
- */
-public class InvalidDescriptionException extends Exception {
- private static final long serialVersionUID = 5721389122281775894L;
- private final Throwable cause;
- private final String message;
-
- /**
- * Constructs a new InvalidDescriptionException based on the given Exception
- *
- * @param throwable Exception that triggered this Exception
- */
- public InvalidDescriptionException(Throwable throwable) {
- this(throwable, "Invalid plugin.yml");
- }
-
- /**
- * Constructs a new InvalidDescriptionException with the given message
- *
- * @param message Brief message explaining the cause of the exception
- */
- public InvalidDescriptionException(final String message) {
- this(null, message);
- }
-
- /**
- * Constructs a new InvalidDescriptionException based on the given Exception
- *
- * @param message Brief message explaining the cause of the exception
- * @param throwable Exception that triggered this Exception
- */
- public InvalidDescriptionException(final Throwable throwable, final String message) {
- this.cause = null;
- this.message = message;
- }
-
- /**
- * Constructs a new InvalidDescriptionException
- */
- public InvalidDescriptionException() {
- this(null, "Invalid plugin.yml");
- }
-
- /**
- * If applicable, returns the Exception that triggered this Exception
- *
- * @return Inner exception, or null if one does not exist
- */
- @Override
- public Throwable getCause() {
- return cause;
- }
-
- @Override
- public String getMessage() {
- return message;
- }
-}
+
+package org.bukkit.plugin;
+
+/**
+ * Thrown when attempting to load an invalid PluginDescriptionFile
+ */
+public class InvalidDescriptionException extends Exception {
+ private static final long serialVersionUID = 5721389122281775894L;
+ private final Throwable cause;
+ private final String message;
+
+ /**
+ * Constructs a new InvalidDescriptionException based on the given Exception
+ *
+ * @param throwable Exception that triggered this Exception
+ */
+ public InvalidDescriptionException(Throwable throwable) {
+ this(throwable, "Invalid plugin.yml");
+ }
+
+ /**
+ * Constructs a new InvalidDescriptionException with the given message
+ *
+ * @param message Brief message explaining the cause of the exception
+ */
+ public InvalidDescriptionException(final String message) {
+ this(null, message);
+ }
+
+ /**
+ * Constructs a new InvalidDescriptionException based on the given Exception
+ *
+ * @param message Brief message explaining the cause of the exception
+ * @param throwable Exception that triggered this Exception
+ */
+ public InvalidDescriptionException(final Throwable throwable, final String message) {
+ this.cause = null;
+ this.message = message;
+ }
+
+ /**
+ * Constructs a new InvalidDescriptionException
+ */
+ public InvalidDescriptionException() {
+ this(null, "Invalid plugin.yml");
+ }
+
+ /**
+ * If applicable, returns the Exception that triggered this Exception
+ *
+ * @return Inner exception, or null if one does not exist
+ */
+ @Override
+ public Throwable getCause() {
+ return cause;
+ }
+
+ @Override
+ public String getMessage() {
+ return message;
+ }
+}
diff --git a/src/main/java/org/bukkit/util/BlockVector.java b/src/main/java/org/bukkit/util/BlockVector.java
index 1d5ab4fc..fc1a49ac 100644
--- a/src/main/java/org/bukkit/util/BlockVector.java
+++ b/src/main/java/org/bukkit/util/BlockVector.java
@@ -1,111 +1,111 @@
-package org.bukkit.util;
-
-/**
- * A vector with a hash function that floors the X, Y, Z components, a la
- * BlockVector in WorldEdit. BlockVectors can be used in hash sets and
- * hash maps. Be aware that BlockVectors are mutable, but it is important
- * that BlockVectors are never changed once put into a hash set or hash map.
- *
- * @author sk89q
- */
-public class BlockVector extends Vector {
- /**
- * Construct the vector with all components as 0.
- */
- public BlockVector() {
- this.x = 0;
- this.y = 0;
- this.z = 0;
- }
-
- /**
- * Construct the vector with another vector.
- */
- public BlockVector(Vector vec) {
- this.x = vec.getX();
- this.y = vec.getY();
- this.z = vec.getZ();
- }
-
- /**
- * Construct the vector with provided integer components.
- *
- * @param x
- * @param y
- * @param z
- */
- public BlockVector(int x, int y, int z) {
- this.x = x;
- this.y = y;
- this.z = z;
- }
-
- /**
- * Construct the vector with provided double components.
- *
- * @param x
- * @param y
- * @param z
- */
- public BlockVector(double x, double y, double z) {
- this.x = x;
- this.y = y;
- this.z = z;
- }
-
- /**
- * Construct the vector with provided float components.
- *
- * @param x
- * @param y
- * @param z
- */
- public BlockVector(float x, float y, float z) {
- this.x = x;
- this.y = y;
- this.z = z;
- }
-
- /**
- * Checks if another object is equivalent.
- *
- * @param obj
- * @return whether the other object is equivalent
- */
- @Override
- public boolean equals(Object obj) {
- if (!(obj instanceof BlockVector)) {
- return false;
- }
- BlockVector other = (BlockVector)obj;
- return (int)other.getX() == (int)this.x && (int)other.getY() == (int)this.y
- && (int)other.getZ() == (int)this.z;
-
- }
-
- /**
- * Returns a hash code for this vector.
- *
- * @return hash code
- */
- @Override
- public int hashCode() {
- return (Integer.valueOf((int)x).hashCode() >> 13) ^
- (Integer.valueOf((int)y).hashCode() >> 7) ^
- Integer.valueOf((int)z).hashCode();
- }
-
- /**
- * Get a new block vector.
- *
- * @return vector
- */
- @Override
- public BlockVector clone() {
- BlockVector v = (BlockVector)super.clone();
- v.x = x;
- v.y = y;
- v.z = z;
- return v;
- }
-}
+package org.bukkit.util;
+
+/**
+ * A vector with a hash function that floors the X, Y, Z components, a la
+ * BlockVector in WorldEdit. BlockVectors can be used in hash sets and
+ * hash maps. Be aware that BlockVectors are mutable, but it is important
+ * that BlockVectors are never changed once put into a hash set or hash map.
+ *
+ * @author sk89q
+ */
+public class BlockVector extends Vector {
+ /**
+ * Construct the vector with all components as 0.
+ */
+ public BlockVector() {
+ this.x = 0;
+ this.y = 0;
+ this.z = 0;
+ }
+
+ /**
+ * Construct the vector with another vector.
+ */
+ public BlockVector(Vector vec) {
+ this.x = vec.getX();
+ this.y = vec.getY();
+ this.z = vec.getZ();
+ }
+
+ /**
+ * Construct the vector with provided integer components.
+ *
+ * @param x
+ * @param y
+ * @param z
+ */
+ public BlockVector(int x, int y, int z) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ /**
+ * Construct the vector with provided double components.
+ *
+ * @param x
+ * @param y
+ * @param z
+ */
+ public BlockVector(double x, double y, double z) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ /**
+ * Construct the vector with provided float components.
+ *
+ * @param x
+ * @param y
+ * @param z
+ */
+ public BlockVector(float x, float y, float z) {
+ this.x = x;
+ this.y = y;
+ this.z = z;
+ }
+
+ /**
+ * Checks if another object is equivalent.
+ *
+ * @param obj
+ * @return whether the other object is equivalent
+ */
+ @Override
+ public boolean equals(Object obj) {
+ if (!(obj instanceof BlockVector)) {
+ return false;
+ }
+ BlockVector other = (BlockVector)obj;
+ return (int)other.getX() == (int)this.x && (int)other.getY() == (int)this.y
+ && (int)other.getZ() == (int)this.z;
+
+ }
+
+ /**
+ * Returns a hash code for this vector.
+ *
+ * @return hash code
+ */
+ @Override
+ public int hashCode() {
+ return (Integer.valueOf((int)x).hashCode() >> 13) ^
+ (Integer.valueOf((int)y).hashCode() >> 7) ^
+ Integer.valueOf((int)z).hashCode();
+ }
+
+ /**
+ * Get a new block vector.
+ *
+ * @return vector
+ */
+ @Override
+ public BlockVector clone() {
+ BlockVector v = (BlockVector)super.clone();
+ v.x = x;
+ v.y = y;
+ v.z = z;
+ return v;
+ }
+}
diff --git a/src/main/java/org/bukkit/util/config/ConfigurationException.java b/src/main/java/org/bukkit/util/config/ConfigurationException.java
index 3b8338fc..68545669 100644
--- a/src/main/java/org/bukkit/util/config/ConfigurationException.java
+++ b/src/main/java/org/bukkit/util/config/ConfigurationException.java
@@ -1,18 +1,18 @@
-package org.bukkit.util.config;
-
-/**
- * Configuration exception.
- *
- * @author sk89q
- */
-public class ConfigurationException extends Exception {
- private static final long serialVersionUID = -2442886939908724203L;
-
- public ConfigurationException() {
- super();
- }
-
- public ConfigurationException(String msg) {
- super(msg);
- }
-}
+package org.bukkit.util.config;
+
+/**
+ * Configuration exception.
+ *
+ * @author sk89q
+ */
+public class ConfigurationException extends Exception {
+ private static final long serialVersionUID = -2442886939908724203L;
+
+ public ConfigurationException() {
+ super();
+ }
+
+ public ConfigurationException(String msg) {
+ super(msg);
+ }
+}