nut.plugin
Plugin Module.
Core system for loading and managing NutScript plugins and schema components.
Functions
nut.plugin.load (uniqueID, path, isSingleFile, variable)
nut.plugin.load
Loads a plugin from specified path
Parameters:
string uniqueID Unique plugin identifierstring path Path to plugin directory
boolean
isSingleFile
optional. default
: false
Whether loading single file
string
variable
optional. default
: "PLUGIN"
Global variable name
Usage:
nut.plugin.loadExtras (path)
nut.plugin.loadExtras
Loads additional plugin resources
Parameters:
string path Base plugin pathUsage:
nut.plugin.loadEntities (path)
nut.plugin.loadEntities
Loads entities from plugin directory
Parameters:
string path Path to entities directoryUsage:
nut.plugin.initialize ()
nut.plugin.initialize
Internal
This is used internally - although you're able to use it you probably shouldn't.
Initializes core plugin system
Usage:
nut.plugin.loadFromDir (directory)
nut.plugin.loadFromDir
Loads all plugins from directory
Parameters:
string directory Directory to scanUsage:
nut.plugin.setDisabled (uniqueID, disabled)
nut.plugin.setDisabled
Sets plugin disabled state
Parameters:
string uniqueID Plugin identifierboolean disabled Whether to disable
Usage:
nut.plugin.isDisabled (uniqueID)
nut.plugin.isDisabled
Checks if plugin is disabled