summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-08-08 20:35:29 +1000
committermd_5 <git@md-5.net>2017-08-08 20:35:29 +1000
commit27b8bf91169642a61f9cf888432cf018773d7df0 (patch)
tree9d625f96b83b1ebae738fab725d62b33d13a7bb6 /nms-patches
parent61a31ca0c7a5398d3b3e0d31469d2af58bb169f3 (diff)
downloadcraftbukkit-27b8bf91169642a61f9cf888432cf018773d7df0.tar
craftbukkit-27b8bf91169642a61f9cf888432cf018773d7df0.tar.gz
craftbukkit-27b8bf91169642a61f9cf888432cf018773d7df0.tar.lz
craftbukkit-27b8bf91169642a61f9cf888432cf018773d7df0.tar.xz
craftbukkit-27b8bf91169642a61f9cf888432cf018773d7df0.zip
SPIGOT-3497: Cancelled EntityPortalEvent leads to incorrect behaviour
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/Entity.patch15
1 files changed, 8 insertions, 7 deletions
diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch
index d4882f35..2bae50a0 100644
--- a/nms-patches/Entity.patch
+++ b/nms-patches/Entity.patch
@@ -539,7 +539,7 @@
}
}
-@@ -1893,19 +2236,75 @@
+@@ -1893,19 +2236,76 @@
if (!this.world.isClientSide && !this.dead) {
this.world.methodProfiler.a("changeDimension");
MinecraftServer minecraftserver = this.C_();
@@ -583,6 +583,7 @@
+ event.useTravelAgent(useTravelAgent);
+ event.getEntity().getServer().getPluginManager().callEvent(event);
+ if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !this.isAlive()) {
++ agent.setCanCreatePortal(oldCanCreate);
+ return null;
+ }
+ exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo();
@@ -618,7 +619,7 @@
BlockPosition blockposition;
if (i == 1) {
-@@ -1934,12 +2333,18 @@
+@@ -1934,12 +2334,18 @@
blockposition = new BlockPosition(this);
}
@@ -638,7 +639,7 @@
if (j == 1 && i == 1) {
BlockPosition blockposition1 = worldserver1.q(worldserver1.getSpawn());
-@@ -1947,6 +2352,7 @@
+@@ -1947,6 +2353,7 @@
} else {
entity.setPositionRotation(blockposition, entity.yaw, entity.pitch);
}
@@ -646,7 +647,7 @@
boolean flag = entity.attachedToPlayer;
-@@ -1954,13 +2360,21 @@
+@@ -1954,13 +2361,21 @@
worldserver1.addEntity(entity);
entity.attachedToPlayer = flag;
worldserver1.entityJoinedWorld(entity, false);
@@ -669,7 +670,7 @@
return entity;
} else {
return null;
-@@ -2064,6 +2478,11 @@
+@@ -2064,6 +2479,11 @@
}
public void setCustomName(String s) {
@@ -681,7 +682,7 @@
this.datawatcher.set(Entity.aB, s);
}
-@@ -2121,7 +2540,26 @@
+@@ -2121,7 +2541,26 @@
}
public void a(AxisAlignedBB axisalignedbb) {
@@ -709,7 +710,7 @@
}
public float getHeadHeight() {
-@@ -2295,7 +2733,7 @@
+@@ -2295,7 +2734,7 @@
for (Iterator iterator = this.bF().iterator(); iterator.hasNext(); entity.a(oclass, set)) {
entity = (Entity) iterator.next();
if (oclass.isAssignableFrom(entity.getClass())) {