summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-02-14 10:34:56 +1100
committermd_5 <git@md-5.net>2017-02-14 10:34:56 +1100
commit2683195ecdd4ed3b35edd4e26cd3d4b6ba06d16c (patch)
tree955b2c6ba0329edd202f6f46e8efcc460d611d6d /nms-patches
parenta552117725a316dbae014fb85e431e5264e631d4 (diff)
downloadcraftbukkit-2683195ecdd4ed3b35edd4e26cd3d4b6ba06d16c.tar
craftbukkit-2683195ecdd4ed3b35edd4e26cd3d4b6ba06d16c.tar.gz
craftbukkit-2683195ecdd4ed3b35edd4e26cd3d4b6ba06d16c.tar.lz
craftbukkit-2683195ecdd4ed3b35edd4e26cd3d4b6ba06d16c.tar.xz
craftbukkit-2683195ecdd4ed3b35edd4e26cd3d4b6ba06d16c.zip
SPIGOT-3063: Call EntityAirChangeEvent
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/Entity.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch
index 79aa39c0..a947ff74 100644
--- a/nms-patches/Entity.patch
+++ b/nms-patches/Entity.patch
@@ -426,13 +426,14 @@
this.passengers.remove(entity);
entity.j = 60;
}
-@@ -1715,14 +1975,48 @@
+@@ -1715,14 +1975,49 @@
}
public void setAirTicks(int i) {
- this.datawatcher.set(Entity.az, Integer.valueOf(i));
+ // CraftBukkit start
+ EntityAirChangeEvent event = new EntityAirChangeEvent(this.getBukkitEntity(), i);
++ event.getEntity().getServer().getPluginManager().callEvent(event);
+ if (event.isCancelled()) {
+ return;
+ }
@@ -478,7 +479,7 @@
}
}
-@@ -1867,19 +2161,70 @@
+@@ -1867,19 +2162,70 @@
if (!this.world.isClientSide && !this.dead) {
this.world.methodProfiler.a("changeDimension");
MinecraftServer minecraftserver = this.B_();
@@ -552,7 +553,7 @@
BlockPosition blockposition;
if (i == 1) {
-@@ -1908,12 +2253,18 @@
+@@ -1908,12 +2254,18 @@
blockposition = new BlockPosition(this);
}
@@ -572,7 +573,7 @@
if (j == 1 && i == 1) {
BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn());
-@@ -1921,6 +2272,7 @@
+@@ -1921,6 +2273,7 @@
} else {
entity.setPositionRotation(blockposition, entity.yaw, entity.pitch);
}
@@ -580,7 +581,7 @@
boolean flag = entity.attachedToPlayer;
-@@ -1928,13 +2280,21 @@
+@@ -1928,13 +2281,21 @@
worldserver1.addEntity(entity);
entity.attachedToPlayer = flag;
worldserver1.entityJoinedWorld(entity, false);
@@ -603,7 +604,7 @@
return entity;
} else {
return null;
-@@ -2038,6 +2398,11 @@
+@@ -2038,6 +2399,11 @@
}
public void setCustomName(String s) {
@@ -615,7 +616,7 @@
this.datawatcher.set(Entity.aA, s);
}
-@@ -2095,7 +2460,26 @@
+@@ -2095,7 +2461,26 @@
}
public void a(AxisAlignedBB axisalignedbb) {
@@ -643,7 +644,7 @@
}
public float getHeadHeight() {
-@@ -2269,7 +2653,7 @@
+@@ -2269,7 +2654,7 @@
for (Iterator iterator = this.bx().iterator(); iterator.hasNext(); entity.a(oclass, set)) {
entity = (Entity) iterator.next();
if (oclass.isAssignableFrom(entity.getClass())) {