From 681014a431ff1c25ac35353166e63e4d2e202ae6 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 23 Feb 2021 00:35:48 +0100 Subject: [PATCH] Improves some code formatting in the portal open method --- .../java/net/knarcraft/stargate/portal/Portal.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/net/knarcraft/stargate/portal/Portal.java b/src/main/java/net/knarcraft/stargate/portal/Portal.java index 4287748..f65517a 100644 --- a/src/main/java/net/knarcraft/stargate/portal/Portal.java +++ b/src/main/java/net/knarcraft/stargate/portal/Portal.java @@ -371,15 +371,19 @@ public class Portal { // Call the StargateOpenEvent StargateOpenEvent event = new StargateOpenEvent(openFor, this, force); Stargate.server.getPluginManager().callEvent(event); - if (event.isCancelled()) return false; + if (event.isCancelled()) { + return false; + } force = event.getForce(); - if (isOpen() && !force) return false; + if (isOpen() && !force) { + return false; + } Material openType = gate.getPortalOpenBlock(); - Axis ax = openType == Material.NETHER_PORTAL ? rot : null; + Axis axis = openType == Material.NETHER_PORTAL ? rot : null; for (BlockLocation inside : getEntrances()) { - Stargate.blockPopulatorQueue.add(new BloxPopulator(inside, openType, ax)); + Stargate.blockPopulatorQueue.add(new BloxPopulator(inside, openType, axis)); } isOpen = true;