Date: 2024/12/09 10:50:50 UTC-08:00
Type: Denizen Script
portal_linking:
type: world
enabled: true
events:
on entity teleported by portal:
- announce <context.entity.location.world>
- if <context.entity.location.world.environment> matches <element[NETHER]>:
- define world <server.worlds.filter_tag[<[filter_value].advanced_matches[<context.entity.location.world.name.before_last[_nether]>]>]>
- if <context.entity.location.world.environment> matches <element[NORMAL]>:
- define world <server.worlds.filter_tag[<[filter_value].advanced_matches[<context.entity.location.world.name>_nether]>]>
- if !<[world]>:
- narrate "<&c>There is no world to teleport you to." t:<context.entity.as[player]>
- determine cancelled
- determine TARGET_WORLD:<[world].get[1]>
on player enters portal:
- flag <context.entity> entered_portal expire:5s
on player uses portal:
- if <player.location.world.environment> matches <element[THE_END]>:
- define world <server.worlds.filter_tag[<[filter_value].advanced_matches[<player.location.world.name.before_last[_the_end]>]>]>
- announce <[world]>
- announce <[world].get[1].spawn_location>
- determine <[world].get[1].spawn_location>
- if <player.location.world.environment> matches <element[NORMAL]>:
- define world <server.worlds.filter_tag[<[filter_value].advanced_matches[<player.location.world.name>_the_end]>]>
- determine <location[100,49,0,90,0,<[world].get[1]>]>
- if !<[world]>:
- narrate "<&c>There is no world to teleport you to." t:<player>
- announce Fired!
- determine cancelled