1
0
Fork 0

Set color as first step instead of last

main
Mari 4 years ago
parent 744e09483b
commit c50408bf11
  1. 6
      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()

Loading…
Cancel
Save