Summary

Hooks

Returns the plugin's author.
Returns the Lua directory the plugin was loaded from.
Returns the CRC of a single-file plugin's path.
Returns the plugin's description.
Returns the plugin's hook order.
Returns the plugin's name.
Returns the plugin's version.
Returns whether the plugin is a single Lua file rather than a folder.
Registers the plugin.
Makes the plugin available as a global variable, so its hooks can be defined as Alias:Hook.

Functions

Converts the plugin to a string of the form Plugin [name].

Hooks

PLUGIN_META.GetAuthor(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:111

Returns the plugin's author.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • String The author; 'Unknown' by default

PLUGIN_META.GetBaseDir(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:90

Returns the Lua directory the plugin was loaded from.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • String The plugin's plugin folder, or the path of a single-file plugin

PLUGIN_META.GetCRC(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:125

Returns the CRC of a single-file plugin's path.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • String The path CRC, or nil for folder plugins

PLUGIN_META.GetDescription(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:83

Returns the plugin's description.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • String The description

PLUGIN_META.GetHookOrder(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:97

Returns the plugin's hook order.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • Number The hook order; 0 by default

PLUGIN_META.GetName(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:118

Returns the plugin's name.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • String The name, as set in plugin.ini

PLUGIN_META.GetVersion(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:104

Returns the plugin's version.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • Number The version; 1.0 by default

PLUGIN_META.IsSingleFile(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:132

Returns whether the plugin is a single Lua file rather than a folder.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • Boolean true for single-file plugins, nil otherwise

PLUGIN_META.Register(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:139

Registers the plugin.

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

See also

PLUGIN_META.SetGlobalAlias(PLUGIN_META, aliasName)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:75

Makes the plugin available as a global variable, so its hooks can be defined as Alias:Hook.

PLUGIN:SetGlobalAlias('cwStorage')

function cwStorage:PlayerSpawn(player) end

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()
  • aliasName String Name of the global variable

Functions

PLUGIN_META.__tostring(PLUGIN_META)

shared gamemodes/catwork/gamemode/core/libraries/sh_plugin.lua:146

Converts the plugin to a string of the form Plugin [name].

Parameters

  • PLUGIN_META Plugin The plugin; passed implicitly when called as PLUGIN:Method()

Returns

  • String The string representation

Defined in