OpenJS-docs
Download plugin
  • Overview
    • Welcome
  • Getting Started
    • Installing the plugin
    • Configuration file
    • Commands
    • Creating scripts
  • OpenJS Components
    • Feature Flags
    • Managing scripts within scripts
    • Sharing variables between scripts
    • Custom Commands
    • Using PlaceHolderApi
    • Listening and cancelling events
    • Custom events
    • Loading and saving data
    • Logging in console
    • Scheduling
    • Java imports
  • Example Scripts
    • spawn hit stand command
    • Knockbackstick command
    • No hit-cooldown script
    • NoBlockPlacing script
    • Saving Player data script
    • running code asynchronously
    • WhileTrue do script
Powered by GitBook
On this page
  1. OpenJS Components

Managing scripts within scripts

LoadScript(ScriptName : string)
LoadScript("ScriptExample.js")
// this will load or reload the specified script
UnloadScript(ScriptName : string)
UnloadScript("ScriptExample.js")
// this will unload the script, if the script is active
waitForScript(ScriptName : string)
waitForScript("ScriptExample.js")
// this will yield the current script calling this function, until the specified script is loaded and running
PreviousFeature FlagsNextSharing variables between scripts

Last updated 7 days ago