Update for 1.5_02.

By: Erik Broes <erikbroes@grum.nl>
This commit is contained in:
CraftBukkit/Spigot 2011-04-20 22:47:26 +02:00
parent dfa9522464
commit c955a4d5d4
8 changed files with 15 additions and 14 deletions

View file

@ -39,7 +39,7 @@
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>minecraft-server</artifactId>
<version>1.4_00_01</version>
<version>1.5</version>
<type>jar</type>
<scope>compile</scope>
</dependency>

View file

@ -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);

View file

@ -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 );
}

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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) {

View file

@ -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

View file

@ -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() );
}