Raft Dedicated Server
  • Introducing Raft Dedicated Servers
    • Introducing RTCP (Our custom networking layer)
  • Tutorials
    • Windows: Installing your server
    • Linux: Installing your server
      • GUI based distro: Installing your server
      • CLI based Distro: Installing your server
    • Pterodactyl: Installing your Server
    • Docker: Installing your Server
    • Configuring your server
    • Managing Player Permissions
    • How to create a plugin project
      • How to load my plugin
  • Programming
    • Creating chat commands
    • Creating console commands
    • Player Permissions
Powered by GitBook
On this page
  1. Programming

Creating console commands

This page will help you to create console commands on the server for your plugins.

Console commands are created through attributes and only works with STATIC methods. Here's different examples :

[ConsoleCommand("hi", "Says hi to you")]
public static string TestCommand()
{
    return "Hi console"
}

Console commands can also have arguments with a string[] args parameter as shown below.

[ConsoleCommand("mycommand")]
public static void TestCommand(string[] args)
{
    // Do your stuff with the args string array. (does not include the initial command)
}
PreviousCreating chat commandsNextPlayer Permissions

Last updated 2 years ago