Skip to content

Getting the hang of it

You've made your first plugin, so now it's time to practice. The six plugins in this section are all small, and each one reuses what you already know and adds just one new thing. By the end, the same few shapes will start to look familiar.

Every page gives you the code for one plugin. You can add each one to the bottom of the main.lua you already have, so your plugin keeps growing, because each command and event works on its own. After you change your code, restart the server, or run /luacord dev reload myplugin to reload it without restarting.

  1. /heal fills your health bar.
  2. /feed fills your hunger bar.
  3. /fly turns flying on and off.
  4. /rules sends the server rules.
  5. A welcome with the player's name greets people by name when they join.
  6. A leave message prints to the console when someone leaves.

When you're done, you'll put them all together into one plugin you can share.

Start with /heal.