FrameworkZ API - FrameworkZ.Commands

FrameworkZ.Commands

module

Commands module for FrameworkZ. Provides chat-based command system with permissions.

0
Functions
15
Methods
2
Fields

Fields

2
FrameworkZ.Commands 📋 table
Commands module for FrameworkZ. Provides chat-based command system with permissions.
Initial value: {}
FrameworkZ.Commands.PREFIX 📝 string inferred
Initial value: "/"

Methods

15

FrameworkZ.Commands:CanExecuteCommand(player, command)

method
Check if a player can execute a command (fallback method)

Parameters

player ❓ unknown
IsoPlayer
command 🏷️ Command
object

Returns

✅ boolean
Can execute

FrameworkZ.Commands:ExecuteCommand(player, commandName, args)

method
Execute a command

Parameters

player 🏷️ IsoPlayer
executing the command
commandName 🏷️ Command
name or alias
args 🏷️ Array
of arguments

Returns

✅ boolean
Success status

FrameworkZ.Commands:GetAllCommands()

method
Get all registered commands

Returns

📋 table
Map of commandName -> command object

FrameworkZ.Commands:GetCommand(commandName)

method
Get command by name

Parameters

commandName 🏷️ Command
name

Returns

❔ table?
Command object

FrameworkZ.Commands:GetCommandCount()

method
Get count of registered commands

Returns

🔢 number
Count

FrameworkZ.Commands:HookChatSystem()

method
Hook into the chat system to intercept commands

FrameworkZ.Commands:Initialize()

method
Initialize the Commands module

FrameworkZ.Commands:LoadCustomCommands()

method
Load custom commands from command definition files

FrameworkZ.Commands:LogCommandExecution(player, commandName, args, success)

method
Log command execution

FrameworkZ.Commands:New(name)

method
Create a new command object

Parameters

name 🏷️ Command
name

Returns

📋 table
Command object

FrameworkZ.Commands:ParseCommandString(commandText)

method
Parse a command string into parts

Parameters

commandText 🏷️ Command
text (without prefix)

Returns

📋 table
Array of command parts

FrameworkZ.Commands:ProcessCommand(player, message)

method
Process a chat message as a potential command

Parameters

player 🏷️ IsoPlayer
who sent the message
message 🏷️ Chat
message text

Returns

✅ boolean
True if message was a command and was handled

FrameworkZ.Commands:Register(command)

method
Register a command object

Parameters

command 🏷️ Command
object (created with New())

Returns

✅ boolean
Success status

FrameworkZ.Commands:SendMessage(player, message)

method
Send a message to a player

Parameters

player ❓ unknown
IsoPlayer
message 🏷️ Message
text

FrameworkZ.Commands:UnregisterCommand(commandName)

method
Unregister a command

Parameters

commandName 🏷️ Command
name

Returns

✅ boolean
Success