Staff++
Search…
Custom Staff Modules
To make staff mode more configurable Staff++ has the option to add custom staff modules. These staff modules can be used when a player enters staff mode. Custom modules can be configured inside the configuration/staffmode/custom-modules.yml
To use your custom module, you need to configure it as a gui item inside the staff mode configuration file (modes.yml).
There are 2 types of custom modules: Command modules & Plain Modules.

custom-modules:
# Name of the module, can be anything you want as long as it's a valid yaml key
ExampleCommandModule:
# Indicates if this module should be enabled
enabled: true
# Type of command module: COMMAND_STATIC;COMMAND_DYNAMIC;COMMAND_CONSOLE
type: COMMAND_STATIC
# The material of the item
item: DIAMOND
name: "&4Ban all god kids"
lore: "&4line1, &6line2, &3line3"
# The commands to execute when this item is used
commands:
- "ban Shortninja &4For coding 2hard!!11!1!one!"
Type
Description
COMMAND_STATIC
Execute the configured commands as the player who clicked the item.
This command takes only %clicker% as placeholder. No target must be provided.
COMMAND_DYNAMIC
Execute the configured commands as the staff member who clicked the item.
Use this if you are writing a command module that targets a player. The commands will target the player the staff member is pointing at.
You can use the following placeholders: "%clicker%" & "%clicked%".
Clicker is the name of the staff member, clicked is the name of the target player. If the staff member is not targeting a player, nothing will happen.
COMMAND_CONSOLE
Execute the configured commands as the console. This can either target a player or not. The commands will target the player the staff member is pointing at. You can use the following placeholders: "%clicker%" & "%clicked%".
"Clicker" is the name of the staff member, "clicked" is the name of the target player

Plain modules just add a regular item inside the staff's inventory.
Make sure to define "TYPE: ITEM"
custom-modules:
# Name of the module, can be anything you want as long as it's a valid yaml key
ExamplePlainModule:
# Indicates if this module should be enabled
enabled: true
# Type always ITEM for plain modules.
type: ITEM
# The material of the item
item: STICK
name: "&7Knock out stick"
lore: "&8Knock em out!!"
# Optional enchantment
# The enchantment for the item format is name:level
# for names of enchantments reference https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
enchantment: "knockback:2"

Modules can have an input prompt popup before they get executed. The input can then be used as a placeholder in the command.
custom-modules:
CustomBanModule:
enabled: true
type: COMMAND_DYNAMIC
item: DIAMOND
name: '&4Ban target player, provide reason in chat'
lore: '&4Ban a player after providing reason'
commands:
- ban %clicked% %input%
require-input: true
input-prompt: Please provide a reason for banning %clicked%.

Modules can have a confirmation GUI or Chat pop up before the action is executed. This is useful to prevent accidents from happening, especially for modules that execute severe actions. You can combine confirmation with input as shown in the example below. Confirmation can of course also be used standalone without the input option.
custom-modules:
CustomBanModule:
enabled: true
type: COMMAND_DYNAMIC
item: DIAMOND
name: '&4Ban target player, provide reason in chat'
lore: '&4Ban a player after providing reason'
commands:
- ban %clicked% %input%
require-input: true
input-prompt: Please provide a reason for banning %clicked%.
confirmation: CHAT
confirmation-message: Are you sure you want to ban %clicked% for reason "%input%".
input + chat confirm
input + GUI confirm

custom-modules:
ExampleStaticCommand:
enabled: true
type: COMMAND_STATIC
item: DIAMOND
name: "&4Ban all god kids"
lore: "&4line1, &6line2, &3line3"
commands:
- "ban Shortninja &4For coding 2hard!!11!1!one!"
ExampleDynamicCommand:
enabled: true
type: COMMAND_DYNAMIC
item: QUARTZ
name: "&4Ban this kid"
lore: "&cyou damn lazy staff"
commands:
- "ban %clicked% &6for shitposting too much with %clicker%"
ExampleConsoleCommand:
enabled: true
type: COMMAND_CONSOLE
item: OBSIDIAN
name: "&bDisable staff mode"
lore: "&7you're so lazy"
commands:
- "staff %clicker% disable"
ExamplePlainItem:
enabled: true
type: ITEM
item: WOOD_AXE
name: "&7WorldEdit Wand"
lore: "&8don't grief shitlord!!"
ExampleEchantment:
enabled: true
type: ITEM
item: STICK
name: "&7Knock out stick"
lore: "&8Knock em out!!"
enchantment: "knockback:2"
Copy link
On this page
Input
Confirmation