summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/TileEntityCommand.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server/TileEntityCommand.java')
-rw-r--r--src/main/java/net/minecraft/server/TileEntityCommand.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/main/java/net/minecraft/server/TileEntityCommand.java b/src/main/java/net/minecraft/server/TileEntityCommand.java
new file mode 100644
index 00000000..d9a04fae
--- /dev/null
+++ b/src/main/java/net/minecraft/server/TileEntityCommand.java
@@ -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);
+ }
+}