Back to 9Minecraft
Wiki 9Minecraft Wiki 9Minecraft
Skript Plugin Wiki › Guides › Create a Custom Command with Skript

Create a Custom Command with Skript

Writing Your First Command

Skript makes it easy to add custom commands to your server without coding in Java. Commands are defined using simple, readable syntax.

Basic Command Structure

Create a new .sk file in your scripts folder and use this format:

`

command /mycommand [arguments]:

description: What your command does

usage: /mycommand

trigger:

send "Hello, player!" to player

`

Replace mycommand with your desired command name. The trigger: block contains the code that runs when someone uses the command.

Adding Functionality

You can check who ran the command using player, send messages, give items, or trigger events. For example:

`

command /heal:

trigger:

heal the player

send "You have been healed!" to player

`

After saving your script, reload Skript using /skript reload all in-game. Your command is now live and ready to use. Test it by typing the command in chat.