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
Custom modules should be inside through the GUI option of the modes config
There are 2 types of custom modules: Command modules & Plain Modules.

Command module

1
custom-modules:
2
# Name of the module, can be anything you want as long as it's a valid yaml key
3
ExampleCommandModule:
4
# Indicates if this module should be enabled
5
enabled: true
6
# Type of command module: COMMAND_STATIC;COMMAND_DYNAMIC;COMMAND_CONSOLE
7
type: COMMAND_STATIC
8
# The material of the item
9
item: DIAMOND
10
name: "&4Ban all god kids"
11
lore: "&4line1, &6line2, &3line3"
12
# The commands to execute when this item is used
13
commands:
14
- "ban Shortninja &4For coding 2hard!!11!1!one!"
Copied!
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 Module

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

Input

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

Confirmation

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.
1
custom-modules:
2
CustomBanModule:
3
enabled: true
4
type: COMMAND_DYNAMIC
5
item: DIAMOND
6
name: '&4Ban target player, provide reason in chat'
7
lore: '&4Ban a player after providing reason'
8
commands:
9
- ban %clicked% %input%
10
require-input: true
11
input-prompt: Please provide a reason for banning %clicked%.
12
confirmation: CHAT
13
confirmation-message: Are you sure you want to ban %clicked% for reason "%input%".
Copied!
input + chat confirm
input + GUI confirm

Example configuration

1
custom-modules:
2
ExampleStaticCommand:
3
enabled: true
4
type: COMMAND_STATIC
5
item: DIAMOND
6
name: "&4Ban all god kids"
7
lore: "&4line1, &6line2, &3line3"
8
commands:
9
- "ban Shortninja &4For coding 2hard!!11!1!one!"
10
11
ExampleDynamicCommand:
12
enabled: true
13
type: COMMAND_DYNAMIC
14
item: QUARTZ
15
name: "&4Ban this kid"
16
lore: "&cyou damn lazy staff"
17
commands:
18
- "ban %clicked% &6for shitposting too much with %clicker%"
19
20
ExampleConsoleCommand:
21
enabled: true
22
type: COMMAND_CONSOLE
23
item: OBSIDIAN
24
name: "&bDisable staff mode"
25
lore: "&7you're so lazy"
26
commands:
27
- "staff %clicker% disable"
28
29
ExamplePlainItem:
30
enabled: true
31
type: ITEM
32
item: WOOD_AXE
33
name: "&7WorldEdit Wand"
34
lore: "&8don't grief shitlord!!"
35
36
ExampleEchantment:
37
enabled: true
38
type: ITEM
39
item: STICK
40
name: "&7Knock out stick"
41
lore: "&8Knock em out!!"
42
enchantment: "knockback:2"
Copied!
Last modified 3mo ago
Copy link