summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/BlockDispenser.java10
-rw-r--r--src/main/java/net/minecraft/server/BlockFire.java12
-rw-r--r--src/main/java/net/minecraft/server/EntityPlayer.java2
-rw-r--r--src/main/java/net/minecraft/server/ItemBlock.java2
-rw-r--r--src/main/java/net/minecraft/server/ItemSign.java2
-rw-r--r--src/main/java/net/minecraft/server/MinecraftServer.java2
-rw-r--r--src/main/java/net/minecraft/server/NetServerHandler.java2
-rw-r--r--src/main/java/net/minecraft/server/WorldGenBigTree.java6
-rw-r--r--src/main/java/net/minecraft/server/WorldGenForest.java6
-rw-r--r--src/main/java/net/minecraft/server/WorldGenTaiga1.java6
-rw-r--r--src/main/java/net/minecraft/server/WorldGenTaiga2.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java60
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java11
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java1
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPoweredMinecart.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java8
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java2
32 files changed, 83 insertions, 99 deletions
diff --git a/src/main/java/net/minecraft/server/BlockDispenser.java b/src/main/java/net/minecraft/server/BlockDispenser.java
index aabbd03e..473a79bf 100644
--- a/src/main/java/net/minecraft/server/BlockDispenser.java
+++ b/src/main/java/net/minecraft/server/BlockDispenser.java
@@ -69,14 +69,14 @@ public class BlockDispenser extends BlockContainer {
CraftBlock block = (CraftBlock) craftWorld.getBlockAt(i, j, k);
LivingEntity who = (entityhuman == null)?null:(LivingEntity)entityhuman.getBukkitEntity();
- BlockInteractEvent bie = new BlockInteractEvent(eventType, block, who);
- server.getPluginManager().callEvent(bie);
+ BlockInteractEvent event = new BlockInteractEvent(eventType, block, who);
+ server.getPluginManager().callEvent(event);
- if (bie.isCancelled()) {
+ if (event.isCancelled()) {
return true;
}
// CraftBukkit end
-
+
TileEntityDispenser tileentitydispenser = (TileEntityDispenser) world.getTileEntity(i, j, k);
entityhuman.a(tileentitydispenser);
@@ -196,4 +196,4 @@ public class BlockDispenser extends BlockContainer {
world.c(i, j, k, 4);
}
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 3e862e47..aacec771 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -113,7 +113,7 @@ public class BlockFire extends Block {
}
}
}
-
+
// Craftbukkit start - won't be needed next port hopefully
if(l == 15) {
this.a(world, i + 1, j, k, 1, random);
@@ -131,13 +131,13 @@ public class BlockFire extends Block {
if (random.nextInt(l) < i1) {
boolean flag = world.getTypeId(i, j, k) == Block.TNT.id;
- // CraftBukkit start: BlockBurnEvent
+ // CraftBukkit start
Server server = ((WorldServer)world).getServer();
CraftWorld cworld = ((WorldServer)world).getWorld();
org.bukkit.block.Block theBlock = (cworld.getBlockAt(i, j, k));
- BlockBurnEvent burnEvent = new BlockBurnEvent(theBlock);
- server.getPluginManager().callEvent(burnEvent);
- if(!burnEvent.isCancelled()) {
+ BlockBurnEvent event = new BlockBurnEvent(theBlock);
+ server.getPluginManager().callEvent(event);
+ if(!event.isCancelled()) {
if (random.nextInt(2) == 0) {
world.e(i, j, k, this.id);
} else {
@@ -148,7 +148,7 @@ public class BlockFire extends Block {
Block.TNT.a(world, i, j, k, 0);
}
}
- // CraftBukkit end: BlockBurnEvent
+ // CraftBukkit end
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 86a298fe..ae2d84f6 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -79,7 +79,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public void f(Entity entity) {
// Craftbukkit start
List<org.bukkit.inventory.ItemStack> loot = new ArrayList<org.bukkit.inventory.ItemStack>();
-
+
for (int i = 0; i < inventory.a.length; ++i) {
if (inventory.a[i] != null) {
loot.add(new CraftItemStack(inventory.a[i]));
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index b1ae3950..270b823e 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -65,7 +65,7 @@ public class ItemBlock extends Item {
return false;
} else {
// CraftBukkit start
- /* We store the old data so we can undo it. Snow(78) and half-steps(44) are special in that they replace the block itself,
+ /* We store the old data so we can undo it. Snow(78) and half-steps(44) are special in that they replace the block itself,
* rather than the block touching the face we clicked on.
*/
org.bukkit.block.Block replacedBlock = (blockClicked.getTypeId() == Block.SNOW.id || blockClicked.getTypeId() == Block.STEP.id) ? blockClicked:blockClicked.getFace(faceClicked);
diff --git a/src/main/java/net/minecraft/server/ItemSign.java b/src/main/java/net/minecraft/server/ItemSign.java
index 5d68b0b6..a7ca85bb 100644
--- a/src/main/java/net/minecraft/server/ItemSign.java
+++ b/src/main/java/net/minecraft/server/ItemSign.java
@@ -29,7 +29,7 @@ public class ItemSign extends Item {
CraftWorld craftWorld = ((WorldServer) world).getWorld();
CraftServer craftServer = ((WorldServer) world).getServer();
org.bukkit.block.Block blockClicked = craftWorld.getBlockAt(i, j, k);
- //CraftBukkit end
+ // CraftBukkit end
if (l == 1) {
++j;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7ef0a446..79ae3ee0 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -167,7 +167,7 @@ public class MinecraftServer implements ICommandListener, Runnable {
if(server != null) {
server.disablePlugins();
}
-
+
if (this.f != null) {
this.f.d();
}
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java
index 64df900d..f0815a03 100644
--- a/src/main/java/net/minecraft/server/NetServerHandler.java
+++ b/src/main/java/net/minecraft/server/NetServerHandler.java
@@ -427,7 +427,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
Player who = (this.e == null) ? null : (Player) this.e.getBukkitEntity();
org.bukkit.inventory.ItemStack itemInHand = new CraftItemStack(itemstack);
- PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockFace);
+ PlayerItemEvent event = new PlayerItemEvent(eventType, who, itemInHand, blockClicked, blockFace);
// CraftBukkit We still call this event even in spawn protection.
// Don't call this event if using Buckets / signs
diff --git a/src/main/java/net/minecraft/server/WorldGenBigTree.java b/src/main/java/net/minecraft/server/WorldGenBigTree.java
index 7e093a64..6013d625 100644
--- a/src/main/java/net/minecraft/server/WorldGenBigTree.java
+++ b/src/main/java/net/minecraft/server/WorldGenBigTree.java
@@ -2,9 +2,9 @@ package net.minecraft.server;
import java.util.Random;
-//CraftBukkit start
+// CraftBukkit start
import org.bukkit.BlockChangeDelegate;
-//CraftBukkit end
+// CraftBukkit end
public class WorldGenBigTree extends WorldGenerator {
@@ -346,7 +346,7 @@ public class WorldGenBigTree extends WorldGenerator {
// then allows plugins to catch manually-invoked generation events
return generate((BlockChangeDelegate)world, random, i, j, k);
}
-
+
public boolean generate(BlockChangeDelegate world, Random random, int i, int j, int k) {
// CraftBukkit end
this.c = world;
diff --git a/src/main/java/net/minecraft/server/WorldGenForest.java b/src/main/java/net/minecraft/server/WorldGenForest.java
index 6830fb93..8ea1b9be 100644
--- a/src/main/java/net/minecraft/server/WorldGenForest.java
+++ b/src/main/java/net/minecraft/server/WorldGenForest.java
@@ -2,9 +2,9 @@ package net.minecraft.server;
import java.util.Random;
-//CraftBukkit start
+// CraftBukkit start
import org.bukkit.BlockChangeDelegate;
-//CraftBukkit end
+// CraftBukkit end
public class WorldGenForest extends WorldGenerator {
@@ -18,7 +18,7 @@ public class WorldGenForest extends WorldGenerator {
// then allows plugins to catch manually-invoked generation events
return generate((BlockChangeDelegate)world, random, i, j, k);
}
-
+
public boolean generate(BlockChangeDelegate world, Random random, int i, int j, int k) {
// CraftBukkit end
int l = random.nextInt(3) + 5;
diff --git a/src/main/java/net/minecraft/server/WorldGenTaiga1.java b/src/main/java/net/minecraft/server/WorldGenTaiga1.java
index f7fea2c4..f1395932 100644
--- a/src/main/java/net/minecraft/server/WorldGenTaiga1.java
+++ b/src/main/java/net/minecraft/server/WorldGenTaiga1.java
@@ -2,9 +2,9 @@ package net.minecraft.server;
import java.util.Random;
-//CraftBukkit start
+// CraftBukkit start
import org.bukkit.BlockChangeDelegate;
-//CraftBukkit end
+// CraftBukkit end
public class WorldGenTaiga1 extends WorldGenerator {
@@ -18,7 +18,7 @@ public class WorldGenTaiga1 extends WorldGenerator {
// then allows plugins to catch manually-invoked generation events
return generate((BlockChangeDelegate)world, random, i, j, k);
}
-
+
public boolean generate(BlockChangeDelegate world, Random random, int i, int j, int k) {
// CraftBukkit end
int l = random.nextInt(5) + 7;
diff --git a/src/main/java/net/minecraft/server/WorldGenTaiga2.java b/src/main/java/net/minecraft/server/WorldGenTaiga2.java
index f2904b4e..94dfa9a8 100644
--- a/src/main/java/net/minecraft/server/WorldGenTaiga2.java
+++ b/src/main/java/net/minecraft/server/WorldGenTaiga2.java
@@ -2,9 +2,9 @@ package net.minecraft.server;
import java.util.Random;
-//CraftBukkit start
+// CraftBukkit start
import org.bukkit.BlockChangeDelegate;
-//CraftBukkit end
+// CraftBukkit end
public class WorldGenTaiga2 extends WorldGenerator {
@@ -18,7 +18,7 @@ public class WorldGenTaiga2 extends WorldGenerator {
// then allows plugins to catch manually-invoked generation events
return generate((BlockChangeDelegate)world, random, i, j, k);
}
-
+
public boolean generate(BlockChangeDelegate world, Random random, int i, int j, int k) {
// CraftBukkit end
int l = random.nextInt(4) + 6;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 8a26e0ad..dc3945db 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -24,7 +24,7 @@ import org.bukkit.World;
public class CraftWorld implements World {
private final WorldServer world;
-
+
private static final Random rand = new Random();
public CraftWorld(WorldServer world) {
@@ -42,7 +42,7 @@ public class CraftWorld implements World {
public int getHighestBlockYAt(int x, int z) {
return world.d(x, z);
}
-
+
public Location getSpawnLocation() {
return new Location(this, world.spawnX, world.e(world.spawnX, world.spawnZ), world.spawnZ);
}
@@ -89,7 +89,7 @@ public class CraftWorld implements World {
// However, this entity is not at the moment backed by a server entity class so it may be left.
return new CraftItemDrop(world.getServer(), entity);
}
-
+
public ItemDrop dropItemNaturally(Location loc, ItemStack item) {
double xs = world.l.nextFloat() * 0.7F + (1.0F - 0.7F) * 0.5D;
double ys = world.l.nextFloat() * 0.7F + (1.0F - 0.7F) * 0.5D;
@@ -108,7 +108,7 @@ public class CraftWorld implements World {
arrow.a(velocity.getX(), velocity.getY(), velocity.getZ(), speed, spread);
return (Arrow) arrow.getBukkitEntity();
}
-
+
public Minecart spawnMinecart(Location loc) {
EntityMinecart minecart = new EntityMinecart(
world,
@@ -120,7 +120,7 @@ public class CraftWorld implements World {
world.a(minecart);
return (Minecart) minecart.getBukkitEntity();
}
-
+
public StorageMinecart spawnStorageMinecart(Location loc) {
EntityMinecart minecart = new EntityMinecart(
world,
@@ -132,7 +132,7 @@ public class CraftWorld implements World {
world.a(minecart);
return (StorageMinecart) minecart.getBukkitEntity();
}
-
+
public PoweredMinecart spawnPoweredMinecart(Location loc) {
EntityMinecart minecart = new EntityMinecart(
world,
@@ -144,13 +144,13 @@ public class CraftWorld implements World {
world.a(minecart);
return (PoweredMinecart) minecart.getBukkitEntity();
}
-
+
public Boat spawnBoat(Location loc) {
EntityBoat boat = new EntityBoat(world, loc.getX(), loc.getY(), loc.getZ());
world.a(boat);
return (Boat) boat.getBukkitEntity();
}
-
+
public boolean generateTree(Location loc, TreeType type) {
return generateTree(loc, type, world);
}
@@ -158,29 +158,19 @@ public class CraftWorld implements World {
public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
switch (type) {
case BIG_TREE:
- return (new WorldGenBigTree())
- .generate(delegate, rand,
- loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
+ return new WorldGenBigTree().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
case BIRCH:
- return (new WorldGenForest())
- .generate(delegate, rand,
- loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
+ return new WorldGenForest().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
case REDWOOD:
- return (new WorldGenTaiga2())
- .generate(delegate, rand,
- loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
+ return new WorldGenTaiga2().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
case TALL_REDWOOD:
- return (new WorldGenTaiga1())
- .generate(delegate, rand,
- loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
+ return new WorldGenTaiga1().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
case TREE:
default:
- return (new WorldGenTrees())
- .generate(delegate, rand,
- loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
+ return new WorldGenTrees().generate(delegate, rand, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ());
}
}
-
+
public TileEntity getTileEntityAt(final int x, final int y, final int z) {
return world.getTileEntity(x, y, z);
}
@@ -256,12 +246,10 @@ public class CraftWorld implements World {
public List<Entity> getEntities() {
List<Entity> list = new ArrayList<Entity>();
-
- for (Object o : world.b) {
+
+ for (Object o: world.b) {
if (o instanceof net.minecraft.server.Entity) {
- net.minecraft.server.Entity mcEnt
- = (net.minecraft.server.Entity)o;
-
+ net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity)o;
Entity bukkitEntity = mcEnt.getBukkitEntity();
// Assuming that bukkitEntity isn't null
@@ -270,27 +258,25 @@ public class CraftWorld implements World {
}
}
}
-
+
return list;
}
public List<LivingEntity> getLivingEntities() {
List<LivingEntity> list = new ArrayList<LivingEntity>();
-
- for (Object o : world.b) {
+
+ for (Object o: world.b) {
if (o instanceof net.minecraft.server.Entity) {
- net.minecraft.server.Entity mcEnt
- = (net.minecraft.server.Entity)o;
-
+ net.minecraft.server.Entity mcEnt = (net.minecraft.server.Entity)o;
Entity bukkitEntity = mcEnt.getBukkitEntity();
-
+
// Assuming that bukkitEntity isn't null
if (bukkitEntity != null && bukkitEntity instanceof LivingEntity) {
list.add((LivingEntity)bukkitEntity);
}
}
}
-
+
return list;
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index b2fb6669..4417788e 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -134,10 +134,10 @@ public class CraftBlock implements Block {
public int getTypeId() {
return chunk.getHandle().a(this.x & 0xF, this.y & 0x7F, this.z & 0xF);
}
-
+
/**
* Gets the light level between 0-15
- *
+ *
* @return light level
*/
public byte getLightLevel() {
@@ -170,8 +170,7 @@ public class CraftBlock implements Block {
* @return Block at the given face
*/
public Block getFace(final BlockFace face, final int distance) {
- return getRelative(face.getModX() * distance, face.getModY() * distance,
- face.getModZ() * distance);
+ return getRelative(face.getModX() * distance, face.getModY() * distance, face.getModZ() * distance);
}
/**
@@ -232,11 +231,11 @@ public class CraftBlock implements Block {
public String toString() {
return "CraftBlock{" + "chunk=" + chunk + "x=" + x + "y=" + y + "z=" + z + '}';
}
-
+
/**
* Notch uses a 0-5 to mean DOWN, UP, EAST, WEST, NORTH, SOUTH
* in that order all over. This method is convenience to convert for us.
- *
+ *
* @return BlockFace the BlockFace represented by this number
*/
public static BlockFace notchToBlockFace(int notch) {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index 00d5f9fb..79724643 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -125,7 +125,7 @@ public class CraftBlockState implements BlockState {
public void setTypeId(final int type) {
this.type = type;
world.getHandle().e(x, y, z, type);
-
+
createData((byte)0);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
index 0a023326..602feb5e 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
@@ -12,7 +12,7 @@ import org.bukkit.inventory.Inventory;
/**
* Represents a dispenser.
- *
+ *
* @author sk89q
*/
public class CraftDispenser extends CraftBlockState implements Dispenser {
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java
index 333b1cb0..d4116e93 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java
@@ -8,7 +8,7 @@ import org.bukkit.craftbukkit.CraftWorld;
/**
* Represents a note block.
- *
+ *
* @author sk89q
*/
public class CraftNoteBlock extends CraftBlockState implements NoteBlock {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
index b4d299ff..36a966d2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
@@ -6,7 +6,7 @@ import org.bukkit.craftbukkit.CraftServer;
/**
* Represents an arrow.
- *
+ *
* @author sk89q
*/
public class CraftArrow extends CraftEntity implements Arrow {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
index 6dbfddd9..0712edce 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
@@ -6,7 +6,7 @@ import org.bukkit.entity.Boat;
/**
* A minecart.
- *
+ *
* @author sk89q
*/
public class CraftBoat extends CraftVehicle implements Boat {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java
index a283f797..d7d6d9d8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java
@@ -6,7 +6,7 @@ import org.bukkit.entity.Egg;
/**
* An egg.
- *
+ *
* @author sk89q
*/
public class CraftEgg extends CraftEntity implements Egg {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index caac43cc..99326530 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -37,7 +37,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
}
// Monsters
else if (entity instanceof EntityMonster) {
- if (entity instanceof EntityZombie) {
+ if (entity instanceof EntityZombie) {
if (entity instanceof EntityPigZombie) { return new CraftPigZombie( server, (EntityPigZombie) entity); }
else { return new CraftZombie( server, (EntityZombie) entity); }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
index cfa8666e..364942ae 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
@@ -7,7 +7,7 @@ import org.bukkit.entity.Fireball;
/**
* A Fireball.
- *
+ *
* @author Cogito
*/
public class CraftFireball extends CraftEntity implements Fireball {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
index 7bc7af4d..7e2682c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
@@ -7,7 +7,7 @@ import org.bukkit.entity.Fish;
/**
* A Fish.
- *
+ *
* @author Cogito
*/
public class CraftFish extends CraftEntity implements Fish {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index d535c049..869e76a8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -4,7 +4,6 @@ package org.bukkit.craftbukkit.entity;
import net.minecraft.server.EntityHuman;
import org.bukkit.entity.HumanEntity;
import org.bukkit.inventory.ItemStack;
-import org.bukkit.inventory.PlayerInventory;
import org.bukkit.craftbukkit.inventory.CraftInventoryPlayer;
import org.bukkit.craftbukkit.inventory.CraftItemStack;
import org.bukkit.craftbukkit.CraftServer;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java
index 70b3c06b..686b854e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDrop.java
@@ -8,12 +8,12 @@ import org.bukkit.craftbukkit.CraftServer;
/**
* Represents an item drop.
- *
+ *
* @author sk89q
*/
public class CraftItemDrop extends CraftEntity implements ItemDrop {
private EntityItem item;
-
+
public CraftItemDrop(CraftServer server, EntityItem entity) {
super(server, entity);
this.item = entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 89dd9e34..6606dc0b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -79,7 +79,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (entity.vehicle == null) {
return false;
}
-
+
entity.setPassengerOf(null);
return true;
}
@@ -88,12 +88,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (entity.vehicle == null) {
return null;
}
-
+
org.bukkit.entity.Entity vehicle = (entity.vehicle.getBukkitEntity());
if (vehicle instanceof Vehicle) {
return (Vehicle) vehicle;
}
-
+
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPoweredMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPoweredMinecart.java
index a492237b..bedfe06d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPoweredMinecart.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPoweredMinecart.java
@@ -7,7 +7,7 @@ import org.bukkit.entity.PoweredMinecart;
/**
* A powered minecart.
- *
+ *
* @author sk89q
*/
public class CraftPoweredMinecart extends CraftMinecart
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
index 7d0d6e23..1a7939d0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
@@ -6,7 +6,7 @@ import org.bukkit.entity.Snowball;
/**
* A snowball.
- *
+ *
* @author sk89q
*/
public class CraftSnowball extends CraftEntity implements Snowball {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java
index 2726c6ae..4f32bbdf 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftStorageMinecart.java
@@ -9,12 +9,12 @@ import org.bukkit.entity.StorageMinecart;
/**
* A storage minecart.
- *
+ *
* @author sk89q
*/
public class CraftStorageMinecart extends CraftMinecart implements StorageMinecart {
private CraftInventory inventory;
-
+
public CraftStorageMinecart(CraftServer server, EntityMinecart entity) {
super(server, entity);
inventory = new CraftInventory( entity );
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
index 0f71f15b..cec4bc3d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
@@ -6,7 +6,7 @@ import org.bukkit.entity.Vehicle;
/**
* A vehicle.
- *
+ *
* @author sk89q
*/
public abstract class CraftVehicle extends CraftEntity implements Vehicle {
@@ -17,7 +17,7 @@ public abstract class CraftVehicle extends CraftEntity implements Vehicle {
public Entity getPassenger() {
return isEmpty() ? null : (getHandle().passenger.getBukkitEntity());
}
-
+
public boolean setPassenger(Entity passenger) {
if(passenger instanceof CraftEntity){
((CraftEntity)passenger).getHandle().setPassengerOf(getHandle());
@@ -30,12 +30,12 @@ public abstract class CraftVehicle extends CraftEntity implements Vehicle {
public boolean isEmpty() {
return getHandle().passenger == null;
}
-
+
public boolean eject() {
if (getHandle().passenger == null) {
return false;
}
-
+
getHandle().passenger.setPassengerOf(null);
return true;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index d1ce5510..3387235d 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -159,7 +159,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
public int firstPartial(ItemStack item) {
return firstPartial(item.getTypeId());
}
-
+
public HashMap<Integer, ItemStack> addItem(ItemStack... items) {
HashMap<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>();
@@ -202,13 +202,13 @@ public class CraftInventory implements org.bukkit.inventory.Inventory {
int amount = item.getAmount();
int partialAmount = partialItem.getAmount();
int maxAmount = partialItem.getMaxStackSize();
-
+
// Check if it fully fits
if (amount + partialAmount <= maxAmount) {
partialItem.setAmount( amount + partialAmount );
break;
}
-
+
// It fits partially
partialItem.setAmount( maxAmount );
item.setAmount( amount + partialAmount - maxAmount );
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
index 7f7eca66..4f715bfd 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
@@ -9,7 +9,7 @@ public class CraftInventoryPlayer extends CraftInventory implements PlayerInvent
public CraftInventoryPlayer(net.minecraft.server.InventoryPlayer inventory) {
super(inventory);
}
-
+
public InventoryPlayer getInventory() {
return (InventoryPlayer) inventory;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 122ad08a..cecafa94 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -106,7 +106,7 @@ public class CraftItemStack extends ItemStack {
if (item != null) {
super.setDurability(durability);
item.damage = durability;
- }
+ }
}
@Override