Update CraftBukkit to Minecraft 1.4(.2).

This commit is contained in:
Travis Watkins
2012-10-24 22:53:23 -05:00
committed by EvilSeph
parent b9a72531b6
commit 60819c6693
237 changed files with 10104 additions and 4863 deletions

View File

@@ -0,0 +1,62 @@
package net.minecraft.server;
public class TileEntityCommand extends TileEntity implements ICommandListener {
private String a = "";
public TileEntityCommand() {}
public void b(String s) {
this.a = s;
this.update();
}
public void a(World world) {
if (!world.isStatic) {
MinecraftServer minecraftserver = MinecraftServer.getServer();
if (minecraftserver != null && minecraftserver.getEnableCommandBlock()) {
// CraftBukkit start - disable command block TODO: hook this up to bukkit API
// ICommandHandler icommandhandler = minecraftserver.getCommandHandler();
// icommandhandler.a(this, this.a);
// CraftBukkit end
}
}
}
public String getName() {
return "@";
}
public void sendMessage(String s) {}
public boolean a(int i, String s) {
return i <= 2;
}
public String a(String s, Object... aobject) {
return s;
}
public void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
nbttagcompound.setString("Command", this.a);
}
public void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
this.a = nbttagcompound.getString("Command");
}
public ChunkCoordinates b() {
return new ChunkCoordinates(this.x, this.y, this.z);
}
public Packet l() {
NBTTagCompound nbttagcompound = new NBTTagCompound();
this.b(nbttagcompound);
return new Packet132TileEntityData(this.x, this.y, this.z, 2, nbttagcompound);
}
}