Called when a player sends a chat command (a message starting with the '/' character).
public override bool ChatCommand(Player player, string command, string args) { return false; }
Type |
Name |
Info |
Player | player | Player instance sending the command. | string | command | The command being used. | string | args | Arguments passed to the command. | Returns: bool | Whether the command was handled by the mod. |
|
Called when text input is given to the server app. Print a new line of help for your command if help is true , otherwise call your custom command code.
public override bool ServerCommand(string text, bool help) { return false; }
Type |
Name |
Info |
string | text | The text input. | bool | help | Whether the help command got called. | Returns: bool | Whether the command was handled by the mod. Ignored if help is true . |
|
Called when a mod net message is received.
public override void NetReceive(BinBuffer bb, int messageID) { }
Type |
Name |
Info |
BinBuffer | bb | BinBuffer instance with the whole received net message | int | messageID | The ID of the message received. | |
Called when a player joins the server.
public override void PlayerConnected(int index) { }
Type |
Name |
Info |
int | index | Index of the connecting player in the Main.player array. | |
Called when a player leaves the server.
public override void PlayerDisconnected(Player player) { }
Type |
Name |
Info |
Player | player | Player instance that got disconnected. | |
Called when a net message is being sent.
public override bool TamperSend(BinBuffer bb, int messageID, int remoteClient, int ignoreClient, string argString, int argInt, float argFloat1, float argFloat2, float argFloat3, float argFloat4) { return true; }
Type |
Name |
Info |
BinBuffer | bb | BinBuffer instance with the whole being sent net message. | int | messageID | The ID of the message being sent. | int | remoteClient | Client ID to send the message to. -1 to send to everyone. | int | ignoreClient | Client ID to ignore when sending to everyone with remoteClient set to -1 . -1 to not ignore anyone. | string | argString | The string argument of the net message. | int | argInt | The int argument of the net message. | float | argFloat1 | The float argument #1 of the net message. | float | argFloat2 | The float argument #2 of the net message. | float | argFloat3 | The float argument #3 of the net message. | float | argFloat4 | The float argument #4 of the net message. | Returns: bool | Whether the vanilla code should continue. |
|
Called when a net message is received.
public override bool TamperReceive(BinBuffer bb, int messageID, MessageBuffer buffer) { return true; }
Type |
Name |
Info |
BinBuffer | bb | BinBuffer instance with the whole received net message. | int | messageID | The ID of the message received. | MessageBuffer | buffer | Buffer which received the message. | Returns: bool | Whether the vanilla code should continue. |
|