diff options
Diffstat (limited to 'src/main/java/net/minecraft/server')
11 files changed, 28 insertions, 28 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; |