Skip to content

Example Scripts

Below is a curated list of example scripts that perform various functions. You are free to use any code from any of these examples.

  • clearinventory.py: Registers a command that clears the player's inventory.
  • communitychest.py: Adds a community chest command that opens an inventory where players can place items to share with the rest of the server.
  • gameoflife.py: Plays Conway's Game of Life in Minecraft.
  • joinmessage.py: Displays notifications when a player joins the server.
  • kickcommand.py: Registers a simple command to kick a player from the server.
  • periodicmessage.py: Creates a task that automatically sends a message to all online players every five seconds.
  • ping.py: Adds an audible ping when a player's name is mentioned in chat; ping is also toggleable via command.
  • protocollib.py: A script that utilizes a ProtocolLib chat packet listener to prevent players from sending chat messages unless if they have permission.
  • placeholder.py: A very brief script that demonstrates how to register a placeholder with PlaceholderAPI.
  • swearfilter.py: Creates a chat listener that filters swear words out of chat messages and replaces them with asterisks (*).
Info

Do you have a script you would like to showcase as an example script? Please get in touch with me!