diff options
author | Rigby <rigby@onarandombox.com> | 2011-04-29 23:34:37 +0100 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-05-02 00:32:26 -0400 |
commit | f342db744ad9367417c6fc85439d8c22410f15a5 (patch) | |
tree | f33d55406a5d91b3e8194971e470d95e0f85f0c0 /src/main/java/net/minecraft/server | |
parent | 5a5ce79035f7ed3d77974c4eb8bc94b2ffae54e7 (diff) | |
download | craftbukkit-f342db744ad9367417c6fc85439d8c22410f15a5.tar craftbukkit-f342db744ad9367417c6fc85439d8c22410f15a5.tar.gz craftbukkit-f342db744ad9367417c6fc85439d8c22410f15a5.tar.lz craftbukkit-f342db744ad9367417c6fc85439d8c22410f15a5.tar.xz craftbukkit-f342db744ad9367417c6fc85439d8c22410f15a5.zip |
Added per world PVP setting support.
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityPlayer.java | 2 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/World.java | 1 | ||||
-rw-r--r-- | src/main/java/net/minecraft/server/WorldServer.java | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index eb8d9d32..e04fa6e1 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -132,7 +132,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { if (this.bG > 0) { return false; } else { - if (!this.b.pvpMode) { + if (!this.world.pvpMode) { // CraftBukkit this.b.pvpMode -> this.world.pvpMode if (entity instanceof EntityHuman) { return false; } diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index ed7a5636..7a2c67fa 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -57,6 +57,7 @@ public class World implements IBlockAccess { private int J = 0; public boolean allowMonsters = true; // CraftBukkit private->public public boolean allowAnimals = true; // CraftBukkit private->public + public boolean pvpMode; // CraftBukkit static int u = 0; private Set M = new HashSet(); private int N; diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java index e0c73c28..852c89d7 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -26,6 +26,7 @@ public class WorldServer extends World implements BlockChangeDelegate { this.cserver = minecraftserver.server; this.world = new CraftWorld(this); this.manager = new PlayerManager(minecraftserver, this); + this.pvpMode = minecraftserver.pvpMode; } public PlayerManager manager; |