DIMENSION DISABLER
by Redmond Limited co.
Do you have friends who as soon as they start a world think they are in a speedrun, in 5 minutes they are already in the nether and in another 5 minutes they are already in the End? This script prevents them from being able to play in those dimensions.
When they enter a dimension, they will not able to move during some seconds, then will get teleported back to the overworld by default.

Command Usage:
You can change the restriction message and enable or disable restrictions as your will using the command /ddisabler, you dont need to enable cheats to use it.
/ddisabler will open the Restriction Menu, you can customice almost all restriction options from there.



Descriptions:
Restriction Menu:
You can select de dimension restriction from here, Nether, End or view the status of both restrictions.
Nether/End Restriction Menu:
You can customice every thing you want to change from here, all options are self-explanatories.
Enable Restriction will enable/disable movement restriction and put the players to spectator mode on the nether/end when players join the dimension.
Enable Teleporting back what do you think will enable/disable this? exactly, the teleporting back to the overworld.
Show message will enable/disable the message showing to the players that joins the nether/end.
Both timers will set the thime in second until each actions triggers.
Status Menu:
You can check the configs you made from here to both dimensions, additionally Someone got stuck? button will teleport players that got trapped into the dimensions where restriction where enabled to your location on the overworld. (teleporting to the overworld removes automatically all restriction effects)
Some examples:
1- If you disable restriction on nether, but dont disable teleporting back and showing message, you can make players got returned back to the overworld past some time, like a temporal visit to the nether.
2- If you enable restriction but disable teleporting back to the overworld, you can trap players into the dimension until you unlock the corresponding dimension. (You will need to unstuck they using the button on status menu)
What's new on 1.3.3?
Updated API used in the addon manifest.
Fixed players getting stuck/traped into the nether/end if logout before get teleported while restricted, this will reduce the players getting stuck. ("Someone got stuck?" button will stay present a time for now).
Changed the way that players returns to the overworld from the end, now players will get teleported to the closest end portal frame block instead over an oak leaves block.
Fixed some grammar errors on status menu.
For developers:
You can access the addon data using:
world.getDynamicProperty() and player.getDynamicProperty() All data used by this addon will be stored in dd:*data* format. This is usefull if you want to make your own UI to customice this addon behavior or want to take some additional actions with your players.
World Data:
dd:version: number, The current version of the addon config (not the addon itself) when addon boot on an existing world, checks if this version data exists, if not or if its different, sets the data from this list (and their default values) on the world.
dd:isNetherEnabled: boolean, This determines if restriction is enabled on the nether.
dd:isEndEnabled: boolean, This determines if restriction is enabled on the end.
dd:netherMsg: string, Stores the message to show when entering the nether.
dd:endMsg: string, Stores the message to show when entering the end.
dd:netherTpToggle: boolean, This determines if teleport triggers on the nether.
dd:endTpToggle: boolean, This determines if teleport triggers on the end.
dd:netherTimer: number, The time until nether teleporting triggers on the nether.
dd:endTimer: number, The time until end teleporting triggers on the end.
dd:endMsgToggle: boolean, This determines is message shows on the nether.
dd:endMsgToggle: boolean, This determines is message shows on the end.
dd:netherMsgTimer: number, The time until message showing triggers on the nether.
dd:endMsgTimer: number, The time until message showing triggers on the end.
Player Data:
This data will be added to the player who teleports into dimensions.
dd:isRestricted: boolean, This determines if player must be restricted or not, it will be true if some restriction is enabled when joins the nether/end dimension, this data turns "false" when enters the overworld.
dd:isTpPendant: nether/end, This will determines if player must be teleported to the overworld when joins the world, this data doesn't get removed but teleports only triggers on nether/end while teleporting back is enabled.
dd:fromLocX: number, the X coordinate where the player got teleported out of the overworld.
dd:fromLocY: number, " "
dd:fromLocZ: number, " "
Those last data stores the coords thats player enters when get teleported to the nether/end.

