Fixes the order in which the portal's button is updated to fix one of the bugs in #15
Some checks failed
EpicKnarvik97/Stargate/pipeline/head There was a failure building this commit

This commit is contained in:
Kristian Knarvik 2021-11-06 14:49:56 +01:00
parent f90a09143f
commit ee0e66e9be

View File

@ -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);
}
/**