Skip to content
Anarchick edited this page Oct 25, 2024 · 4 revisions

Skript is a Minecraft plugin for Paper/Spigot, which allows server owners and other people to modify their servers without learning Java. It can also be useful if you do know Java; some tasks are quicker to do with Skript, and so it can be used for prototyping etc.

Skript is very easy to understand and have plenty of tutorials on Youtube and forums !

Since 1.1.0, ServerKeyboardBridge implement optional Skript features :D

Setup

  1. Download the latest Skript release and put it in you plugins folder
  2. Start the server
  3. Create the file plugins/Skript/scripts/ServerKeyboardBridge.sk and open it with any text editor (recommanded Sublime Text 3 or VSCode)
  4. Write this :
on load:
    register key entry with id "horse" named "spawn your horse", description "description", category "page 1" and keycode 72
    register key entry with id "cmdMenu" named "run /menu", category "page 1" and keycode 77
    # 72 for key H , you can find the list here : https://www.glfw.org/docs/latest/group__keys.html
    # 77 is for key M

on key pressed with id "horse":
    set {_playerIsInGui} to event-boolean
    if {_playerIsInGui} is false:
        spawn an horse at event-player
        equip last spawned horse with saddle

on key release with id "cmdMenu":
    # Check if player is not in any GUI
    if event-boolean is false:
        make event-player execute command "/menu"

on skb player join:
    send "<lime>%event-player% has join the game with ServerKeyBoardBridge-%event-string%" to console
    send "<yellow>Thanks to use ServerKeyBoardBridge, enjoy our custom key binds :D" to event-player
  1. Do /sk reload ServerKeyboardBridge to apply the changes (You need to have the permission to run this command)
  2. Done ! You can try your code when you press H (The client will need to reconnect to the server to refresh his local key binds)

Go further

I recommend you to learn Skript with tutorials. You will be free to make awesome scripts, Skript is unlimitless with a ton of addons. Take a look at the documentation and all possibilities

Clone this wiki locally