mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
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
This commit is contained in:
parent
64b2b87256
commit
0e9f94b07a
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: chickeneer <emcchickeneer@gmail.com>
|
||||
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
|
||||
@@ -0,0 +0,0 @@ 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();
|
||||
--
|
Loading…
Reference in a new issue