summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZenexer <paul@vimae.com>2011-02-10 11:57:28 +0800
committertahg <tahgtahv@gmail.com>2011-02-10 12:16:30 +0800
commit1da852265a2b74d201af4495d8b4b6a59bae234b (patch)
tree15ab6cf82fad87fe60139e1140ba6e3bdfd85b20 /src
parentfbe54b05f40f7e27e5d209b746af22a4d850f078 (diff)
downloadcraftbukkit-1da852265a2b74d201af4495d8b4b6a59bae234b.tar
craftbukkit-1da852265a2b74d201af4495d8b4b6a59bae234b.tar.gz
craftbukkit-1da852265a2b74d201af4495d8b4b6a59bae234b.tar.lz
craftbukkit-1da852265a2b74d201af4495d8b4b6a59bae234b.tar.xz
craftbukkit-1da852265a2b74d201af4495d8b4b6a59bae234b.zip
Added spawn-protection property to server.properties
Diffstat (limited to 'src')
-rw-r--r--src/main/java/net/minecraft/server/ItemBlock.java2
-rw-r--r--src/main/java/net/minecraft/server/WorldServer.java14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index e0383f06..c2a9a070 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -100,7 +100,7 @@ public class ItemBlock extends Item {
// CraftBukkit hardcoded Spawn distance for now
// TODO make spawn size configurable
- boolean canBuild = distanceFromSpawn > ((WorldServer) world).minecraftServer.spawnProtection || thePlayer.isOp();
+ boolean canBuild = distanceFromSpawn > ((WorldServer) world).D.spawnProtection || thePlayer.isOp();
BlockPlaceEvent event = new BlockPlaceEvent(eventType, placedBlock, replacedBlockState, blockClicked, itemInHand, thePlayer, canBuild);
server.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index a6974193..cfe75566 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -16,13 +16,13 @@ public class WorldServer extends World implements BlockChangeDelegate {
public ChunkProviderServer A;
public boolean B = false;
public boolean C;
- public final MinecraftServer minecraftServer;
+ public final MinecraftServer D;
private EntityList E = new EntityList();
public PlayerManager manager; // Craftbukkit
public WorldServer(MinecraftServer minecraftserver, File file1, String s, int i) {
super(file1, s, (new Random()).nextLong(), WorldProvider.a(i));
- this.minecraftServer = minecraftserver;
+ this.D = minecraftserver;
// CraftBukkit start
this.server = minecraftserver.server;
@@ -47,7 +47,7 @@ public class WorldServer extends World implements BlockChangeDelegate {
}
public void a(Entity entity, boolean flag) {
- if (!this.minecraftServer.m && (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal)) {
+ if (!this.D.m && (entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal)) {
entity.q();
}
@@ -87,7 +87,7 @@ public class WorldServer extends World implements BlockChangeDelegate {
i1 = l;
}
- return i1 > this.minecraftServer.spawnProtection || this.minecraftServer.f.g(entityhuman.name);
+ return i1 > this.D.spawnProtection || this.D.f.g(entityhuman.name);
}
protected void b(Entity entity) {
@@ -107,7 +107,7 @@ public class WorldServer extends World implements BlockChangeDelegate {
public void a(Entity entity, byte b0) {
Packet38EntityStatus packet38entitystatus = new Packet38EntityStatus(entity.id, b0);
- this.minecraftServer.k.b(entity, packet38entitystatus);
+ this.D.k.b(entity, packet38entitystatus);
}
public Explosion a(Entity entity, double d0, double d1, double d2, float f, boolean flag) {
@@ -119,12 +119,12 @@ public class WorldServer extends World implements BlockChangeDelegate {
}
// Craftbukkit end
- this.minecraftServer.f.a(d0, d1, d2, 64.0D, new Packet60Explosion(d0, d1, d2, f, explosion.g));
+ this.D.f.a(d0, d1, d2, 64.0D, new Packet60Explosion(d0, d1, d2, f, explosion.g));
return explosion;
}
public void c(int i, int j, int k, int l, int i1) {
super.c(i, j, k, l, i1);
- this.minecraftServer.f.a((double) i, (double) j, (double) k, 64.0D, new Packet54PlayNoteBlock(i, j, k, l, i1));
+ this.D.f.a((double) i, (double) j, (double) k, 64.0D, new Packet54PlayNoteBlock(i, j, k, l, i1));
}
}