From ee0e66e9bef38f7546453727b83e2605d2a7b14b Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sat, 6 Nov 2021 14:49:56 +0100 Subject: [PATCH] Fixes the order in which the portal's button is updated to fix one of the bugs in #15 --- .../net/knarcraft/stargate/utility/PortalFileHelper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/knarcraft/stargate/utility/PortalFileHelper.java b/src/main/java/net/knarcraft/stargate/utility/PortalFileHelper.java index 720bdf2..40031e4 100644 --- a/src/main/java/net/knarcraft/stargate/utility/PortalFileHelper.java +++ b/src/main/java/net/knarcraft/stargate/utility/PortalFileHelper.java @@ -261,12 +261,12 @@ public final class PortalFileHelper { Portal portal = new Portal(portalLocation, button, destination, name, network, gate, owner, PortalHandler.getPortalOptions(portalData)); + //Update the portal's button if it's the wrong material + updatePortalButton(portal); + //Register the portal, and close it in case it wasn't properly closed when the server stopped PortalHandler.registerPortal(portal); portal.getPortalOpener().closePortal(true); - - //Update the portal's button if it's the wrong material - updatePortalButton(portal); } /**