Trying to stop a player from entering The End

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Jun 14, 2024
1
0
1
23
So I am a Skripter for a server where we heavily lean on lore and storytelling, and I need to code a feature for one scene where basically the character is not allowed to go through the end portal. My problem however is that for some reason, even though "end portal" is listed in the documentation as a valid teleport cause, the parser still spits out an error saying that I can't compare a teleport cause to an item type. What should I do?
Code:
#make Allan not be able to go through into The End
on teleport:
    event-player's tab list name is "AlienoidTv"
    teleport cause is an end portal
    send action bar "<red>The ministry of communications and transport has revoked your access to the dimensional gates" to the event-player
    cancel event
 
Code:
on teleport:
    set {_reason} to "end portal" parsed as teleport cause
    if teleport cause contain {_reason}:
        send "ZzZ" to player