SPIGOT-6157: Crash when PortalCreateEvent cancelled

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-09-29 18:10:57 +10:00
parent 0920dec75a
commit 8bd3d55e00
2 changed files with 10 additions and 5 deletions

View File

@@ -499,7 +499,7 @@
private void a(WorldServer worldserver, BlockPosition blockposition) {
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = blockposition.i();
@@ -631,14 +886,14 @@
@@ -631,17 +886,17 @@
}
@Override
@@ -517,7 +517,11 @@
+ Optional<BlockUtil.Rectangle> optional1 = worldserver.getTravelAgent().createPortal(blockposition, enumdirection_enumaxis, this, createRadius); // CraftBukkit
if (!optional1.isPresent()) {
EntityPlayer.LOGGER.error("Unable to create a portal, likely target out of worldborder");
- EntityPlayer.LOGGER.error("Unable to create a portal, likely target out of worldborder");
+ // EntityPlayer.LOGGER.error("Unable to create a portal, likely target out of worldborder"); // CraftBukkit
}
return optional1;
@@ -685,10 +940,8 @@
this.activeContainer.c();
}