diff --git a/src/main/kotlin/net/deliciousreya/minecraftportal/MinecraftPortalPlugin.kt b/src/main/kotlin/net/deliciousreya/minecraftportal/MinecraftPortalPlugin.kt index 3a2209c..5940a77 100644 --- a/src/main/kotlin/net/deliciousreya/minecraftportal/MinecraftPortalPlugin.kt +++ b/src/main/kotlin/net/deliciousreya/minecraftportal/MinecraftPortalPlugin.kt @@ -111,12 +111,12 @@ class MinecraftPortalPlugin() : JavaPlugin(), Listener PortalFrame.State.INACTIVE ) if (newPortal != null) { - val replacedPortal = portals.activateAndReplacePortal(newPortal) - val otherPortal = portals.getOtherPortal(newPortal) - newPortal.activate() if (newPortal.color == Material.GLASS) { newPortal.color = portals.getColorFor(e.player.name) } + val replacedPortal = portals.activateAndReplacePortal(newPortal) + val otherPortal = portals.getOtherPortal(newPortal) + newPortal.activate() replacedPortal?.deactivate() if (otherPortal != null) { newPortal.open()