|
|
@ -111,12 +111,12 @@ class MinecraftPortalPlugin() : JavaPlugin(), Listener |
|
|
|
PortalFrame.State.INACTIVE |
|
|
|
PortalFrame.State.INACTIVE |
|
|
|
) |
|
|
|
) |
|
|
|
if (newPortal != null) { |
|
|
|
if (newPortal != null) { |
|
|
|
val replacedPortal = portals.activateAndReplacePortal(newPortal) |
|
|
|
|
|
|
|
val otherPortal = portals.getOtherPortal(newPortal) |
|
|
|
|
|
|
|
newPortal.activate() |
|
|
|
|
|
|
|
if (newPortal.color == Material.GLASS) { |
|
|
|
if (newPortal.color == Material.GLASS) { |
|
|
|
newPortal.color = portals.getColorFor(e.player.name) |
|
|
|
newPortal.color = portals.getColorFor(e.player.name) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
val replacedPortal = portals.activateAndReplacePortal(newPortal) |
|
|
|
|
|
|
|
val otherPortal = portals.getOtherPortal(newPortal) |
|
|
|
|
|
|
|
newPortal.activate() |
|
|
|
replacedPortal?.deactivate() |
|
|
|
replacedPortal?.deactivate() |
|
|
|
if (otherPortal != null) { |
|
|
|
if (otherPortal != null) { |
|
|
|
newPortal.open() |
|
|
|
newPortal.open() |
|
|
|