From 52c8fc7633d1ffa403df3b420804b2e6b6bc5fee Mon Sep 17 00:00:00 2001 From: chickeneer Date: Mon, 7 Aug 2017 23:08:50 -0400 Subject: [PATCH] Fix Nether Portal Creation on cancelled event Spigot is manipulating the Travel Agents canCreatePortal, but forgot to reset it on cancel This causes nether portals to not be generated if the event is ever cancelled --- ...r-Portal-Creation-on-cancelled-event.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Spigot-Server-Patches/0230-Fix-Nether-Portal-Creation-on-cancelled-event.patch diff --git a/Spigot-Server-Patches/0230-Fix-Nether-Portal-Creation-on-cancelled-event.patch b/Spigot-Server-Patches/0230-Fix-Nether-Portal-Creation-on-cancelled-event.patch new file mode 100644 index 000000000..65fb36d9a --- /dev/null +++ b/Spigot-Server-Patches/0230-Fix-Nether-Portal-Creation-on-cancelled-event.patch @@ -0,0 +1,24 @@ +From 8e93845e08efce37a5378c954743a983e142ff05 Mon Sep 17 00:00:00 2001 +From: chickeneer +Date: Mon, 7 Aug 2017 23:07:32 -0400 +Subject: [PATCH] Fix Nether Portal Creation on cancelled event + +Spigot is manipulating the Travel Agents canCreatePortal, but forgot to reset it on cancel + +This causes nether portals to not be generated if the event is ever cancelled + +diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java +index 34ac15d5e..190bda020 100644 +--- a/src/main/java/net/minecraft/server/Entity.java ++++ b/src/main/java/net/minecraft/server/Entity.java +@@ -2371,6 +2371,7 @@ public abstract class Entity implements ICommandListener { + event.useTravelAgent(useTravelAgent); + event.getEntity().getServer().getPluginManager().callEvent(event); + if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !this.isAlive()) { ++ agent.setCanCreatePortal(oldCanCreate); // Paper + return null; + } + exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo(); +-- +2.13.0 +