Class ChatHandler [-] [+]
Provides access to in-game and console chat commands, messages, and selection context for command execution.
Used primarily in GM scripts or command handlers to send messages, check permissions, and access selected targets.
Inherits all methods from: none
Methods
| GetPlayer | Returns the Player associated with the handler. Returns nil in the case of a console handler |
| GetSelectedCreature | Returns the selected Creature |
| GetSelectedObject | Returns the selected WorldObject |
| GetSelectedPlayer | Returns the selected Player |
| GetSelectedPlayerOrSelf | Returns the selected Player or the current Player if nothing is targeted or the target is not a player |
| GetSelectedUnit | Returns the selected Unit |
| HasLowerSecurity | Checks if the current security level is lower than the specified Player's account |
| HasLowerSecurityAccount | Checks if the current security level is lower than the specified account's level |
| HasSentErrorMessage | Returns true if other previously called ChatHandler methods sent an error |
| IsAvailable | Checks if the securityLevel is available |
| IsConsole | Returns true if the ChatHandler comes from the console, false if it comes from a player |
| SendGlobalGMSysMessage | Sends a message to all connected Game Masters |
| SendGlobalSysMessage | Sends a message to all connected players |
| SendSysMessage | Sends text to the chat handler |