From c955a4d5d46f86bbc74f77f7a25e625e37c15555 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 20 Apr 2011 22:47:26 +0200 Subject: [PATCH] Update for 1.5_02. By: Erik Broes --- paper-server/pom.xml | 2 +- .../src/main/java/org/bukkit/craftbukkit/CraftServer.java | 2 +- .../src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 2 +- .../java/org/bukkit/craftbukkit/entity/CraftEntity.java | 5 +++-- .../org/bukkit/craftbukkit/entity/CraftHumanEntity.java | 6 +++--- .../java/org/bukkit/craftbukkit/entity/CraftSlime.java | 2 +- .../java/org/bukkit/craftbukkit/entity/CraftWolf.java | 8 ++++---- .../craftbukkit/inventory/CraftInventoryPlayer.java | 2 +- 8 files changed, 15 insertions(+), 14 deletions(-) diff --git a/paper-server/pom.xml b/paper-server/pom.xml index d6b5bef9d2..ffaa4124ee 100644 --- a/paper-server/pom.xml +++ b/paper-server/pom.xml @@ -39,7 +39,7 @@ org.bukkit minecraft-server - 1.4_00_01 + 1.5 jar compile diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 90fbb28c89..987ab35526 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -42,7 +42,7 @@ import org.bukkit.util.config.Configuration; public final class CraftServer implements Server { private final String serverName = "Craftbukkit"; private final String serverVersion; - private final String protocolVersion = "1.4"; + private final String protocolVersion = "1.5_02"; private final PluginManager pluginManager = new SimplePluginManager(this); private final BukkitScheduler scheduler = new CraftScheduler(this); private final CommandMap commandMap = new SimpleCommandMap(this); diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 162a2bfb99..def940e4e1 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -50,7 +50,7 @@ public class CraftWorld implements World { unloadedChunks.put( (chunk.getX() << 16) + chunk.getZ(), chunk ); } - public CraftChunk popPreservedChunk( int x, int z ) { + public Chunk popPreservedChunk( int x, int z ) { return unloadedChunks.remove( (x << 16) + z ); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index c1e03dc82b..61c9edc9ff 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -3,6 +3,7 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.*; import org.bukkit.Location; +import org.bukkit.Server; import org.bukkit.World; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.craftbukkit.CraftWorld; @@ -201,7 +202,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { return "CraftEntity{" + "id=" + getEntityId() + '}'; } - public CraftServer getServer() { + public Server getServer() { return server; } @@ -213,7 +214,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { setVelocity(value); } - public CraftEntity getPassenger() { + public org.bukkit.entity.Entity getPassenger() { return isEmpty() ? null : (CraftEntity) getHandle().passenger.getBukkitEntity(); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index 365d9ad1d9..b7b2d63e5f 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -4,8 +4,8 @@ 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; public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { @@ -31,11 +31,11 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { this.inventory = new CraftInventoryPlayer( entity.inventory ); } - public CraftInventoryPlayer getInventory() { + public PlayerInventory getInventory() { return inventory; } - public CraftItemStack getItemInHand() { + public ItemStack getItemInHand() { return getInventory().getItemInHand(); } diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java index 104683c8f0..0dc57f63d8 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java @@ -21,7 +21,7 @@ public class CraftSlime extends CraftLivingEntity implements Slime { } public int getSize() { - return getHandle().m(); + return getHandle().getSize(); } public void setSize(int size) { diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java index 1a6e59741b..9a6a8a8883 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java @@ -11,19 +11,19 @@ public class CraftWolf extends CraftAnimals implements Wolf { } public boolean isAngry() { - return getHandle().x(); + return getHandle().isAngry(); } public void setAngry(boolean angry) { - getHandle().c(angry); + getHandle().setAngry(angry); } public boolean isSitting() { - return getHandle().y(); + return getHandle().isSitting(); } public void setSitting(boolean sitting) { - getHandle().d(sitting); + getHandle().setSitting(sitting); } @Override diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java index 5d97b4cf99..68adab93a5 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java @@ -18,7 +18,7 @@ public class CraftInventoryPlayer extends CraftInventory implements PlayerInvent return super.getSize() - 4; } - public CraftItemStack getItemInHand() { + public ItemStack getItemInHand() { return new CraftItemStack( getInventory().getItemInHand() ); }