Code (YAML):
# =============================================================================
# PlayerInput Format Configuration
# =============================================================================
# This file contains all predefined input formats for the PlayerInput plugin.
# Each format defines how players will be prompted for input and how that input
# will be validated.
#
# =============================================================================
# FORMAT STRUCTURE
# =============================================================================
# format_name:
# input-timeout: 30 # Time in seconds to wait for player input
# save-answers: true # Whether to save player answers to storage (true/false)
# validation:
# type: STRING|INTEGER|DECIMAL # Type of validation to perform
# rules: # List of validation rules (all optional)
# - "length: min;max" # For STRING: length between min and max
# - "contains: text" # For STRING: must contain specific text
# - "contains: /regex/" # For STRING: must match regex pattern
# - "contains: text1 or text2" # For STRING: must contain text1 OR text2
# - "contains: text1 and text2" # For STRING: must contain text1 AND text2
# - "contains: /regex1/ and /regex2/" # For STRING: must match regex1 AND regex2
# - "value_range: min;max" # For INTEGER/DECIMAL: value between min and max
# actions: # All actions grouped under this section
# start: # List of actions to execute when input starts
# - "send_message: &ePlease enter your text:"
# - "send_title: &6Input Required;&7Type your response;10;70;20"
# success: # List of actions for successful input
# - "send_message: &aText received: {input}"
# - "play_sound: BLOCK_NOTE_BLOCK_PLING;1.0;1.2"
# fail: # List of actions for invalid input
# - "send_message: &cInvalid input! Try again."
# - "play_sound: ENTITY_ENDERMAN_TELEPORT;1.0;0.5"
# timeout: # List of actions for timed out sessions
# - "send_message: &cSession timed out!"
# - "play_sound: ENTITY_ENDERMAN_TELEPORT;1.0;0.5"
#
# PLACEHOLDERS in all actions:
# - INTERNAL PLACEHOLDERS:
# {player} - The name of the player who started the input session
# {input} - The input value the player entered
# {timeout} - The timeout time specified in input-timeout (in seconds)
# - PLACEHOLDERAPI PLACEHOLDERS:
# %playerinput_inputName% - Get stored input value for specific format (e.g., %playerinput_server_announcement%)
# %placeholder% - Any PlaceholderAPI placeholder (e.g., %player_name%, %player_world%)
#
# =============================================================================
# AVAILABLE ACTIONS
# =============================================================================
# All actions can be used in start, success, fail, and timeout sections.
#
# targetPlayer parameter is optional in all actions.
# If targetPlayer is not specified, the action will be executed on the current player.
# Use {input} to target the player whose name was entered in the input.
# Use "ALL" to target all online players.
#
# MESSAGING ACTIONS:
# - "send_message: text;targetPlayer" # Send chat message to player
# - "send_title: title;subtitle;fadeIn;stay;fadeOut;targetPlayer" # Send title
# - "send_actionbar: text;duration;targetPlayer" # Send actionbar message
# - "send_bossbar: text;color;style;progress;duration" # Send boss bar
#
# AUDIO ACTIONS:
# - "play_sound: SOUND;volume;pitch;targetPlayer" # Play sound effect
#
# PLAYER EFFECTS:
# - "add_effect: EFFECT;duration;amplifier;ambient;particles;targetPlayer" # Add potion effect
#
# TELEPORTATION:
# - "teleport: x;y;z;world" # Teleport to coordinates
# - "teleport_to_player: playerName" # Teleport to player
#
# INVENTORY MANAGEMENT:
# - "give_item: MATERIAL;amount;targetPlayer" # Give item to player
# - "take_item: MATERIAL;amount;targetPlayer" # Take item from player
# - "clear_inventory" # Clear player inventory
#
# ECONOMY (requires Vault):
# - "give_money: amount;targetPlayer" # Give money to player
# - "take_money: amount;targetPlayer" # Take money from player
#
# UTILITY:
# - "wait: ticks" # Wait for specified ticks (20 ticks = 1 second)
# - "player_command: command" # Execute command as player
# - "console_command: command" # Execute commandas console
#
# =============================================================================
formats
:
# Example: Player reward system
player_reward:
input-timeout
: 30
save-answers
: true
validation:
type
: STRING
rules:
- "length
: 3;16
"
- "contains
: /^
[a-zA-Z0-9_
]+$/
"
actions:
start:
- "send_message
:
&6&lPlayer Reward System
"
- "send_title
:
&eEnter player name;&7Who should receive the reward?
(
{timeout
}s timeout
);10;70;20
"
- "send_actionbar
:
&aType the player's name
... You have
{timeout
} seconds!;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&a&lRewarding player
:
&f{input}"
- "send_message
:
&e&lGiving reward to
{input
}
...
"
- "give_item
: DIAMOND;5;
{input
}
"
- "give_item
: EMERALD;10;
{input
}
"
- "add_effect
: SPEED;60;1;false;true;
{input
}
"
- "send_message
:
&a&lReward sent to
{input
}!
"
- "send_title
:
&6&lREWARD!;&7You received a special reward!;10;70;20;
{input
}
"
- "play_sound
: ENTITY_PLAYER_LEVELUP;1.0;1.0;
{input
}
"
- "console_command
: say
{player
} rewarded
{input
} with diamonds and emeralds
"
fail:
- "send_message
:
&c&lInvalid player name! Must be 3-16 characters, letters, numbers, and underscores only.
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lReward session timed out after
{timeout
} seconds!
"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Server announcement with broadcast to ALL players. Takes 100 money from the user who created the announcement
server_announcement:
input-timeout: 30
save-answers: false
validation:
type: STRING
rules:
- "length
: 5;200
"
actions:
start:
- "send_message
:
&6&lServer Announcement System
"
- "send_title
:
&eEnter your announcement;&7What should we tell everyone?;10;70;20
"
- "send_actionbar
:
&aType your announcement message
...;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "take_money
: 100
"
- "send_message
:
&a&lAnnouncement created
:
&f{input}"
- "send_message
:
&e&lBroadcasting to
all players
...
"
- "send_message
:
&c&l[ANNOUNCEMENT] &f
{input
};
ALL
"
- "send_title
:
&c&lANNOUNCEMENT;&7{input};10;70;20;ALL"
- "play_sound
: ENTITY_WITHER_SPAWN;1.0;1.0;
ALL
"
fail:
- "send_message
:
&c&lInvalid announcement! Must be 5-200 characters.
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lAnnouncement session timed out!
"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Age verification system
age_verification:
input-timeout: 60
save-answers: true
validation:
type: INTEGER
rules:
- "value_range
: 13;100
"
actions:
start:
- "send_message
:
&6&lAge Verification Required
"
- "send_title
:
&eAge Verification;&7Please enter your age
(
{timeout
}s timeout
);10;70;20
"
- "send_actionbar
:
&aEnter your age
(13+ years old
)
...;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&a&lAge verification successful!
"
- "send_message
:
&e&lYour age
:
&f{input} years old
"
- "send_title
:
&a&lVERIFIED!;&7Age:
{input
} years;10;70;20
"
- "play_sound
: ENTITY_PLAYER_LEVELUP;1.0;1.0
"
- "add_effect
: SPEED;300;0;false;true
"
- "send_message
:
&a&lWelcome! You have been granted access to the server.
"
fail:
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
- "send_message
:
&c&lInvalid age! Please enter a number greater than 13.
"
- "send_title
:
&c&lINVALID AGE;&7Must be 13+ years old;10;70;20
"
- "wait
: 40
"
- "console_command
: kick
{player
} Invalid age! You must be 13+ years old to play.
"
timeout:
- "send_message
:
&c&lAge verification timed out after
{timeout
} seconds!
"
- "send_title
:
&c&lVERIFICATION FAILED;&7It took you too much time!;10;70;20
"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Player punishment system with target player
player_punishment:
input-timeout: 30
save-answers: true
validation:
type: STRING
rules:
- "length
: 3;16
"
- "contains
: /^
[a-zA-Z0-9_
]+$/
"
actions:
start:
- "send_message
:
&c&lPlayer Punishment System
"
- "send_title
:
&eEnter player name;&7Who should be punished?;10;70;20
"
- "send_actionbar
:
&aType the player's name
...;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&c&lPunishing player
:
&f{input}"
- "send_message
:
&e&lApplying punishment to
{input
}
...
"
- "add_effect
: SLOWNESS;300;2;false;true;
{input
}
"
- "add_effect
: WEAKNESS;300;1;false;true;
{input
}
"
- "send_title
:
&c&lPUNISHED!;&7You have been punished!;10;70;20;
{input
}
"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5;
{input
}
"
- "send_message
:
&c&lPunishment applied to
{input
}!
"
fail:
- "send_message
:
&c&lInvalid player name! Must be 3-16 characters, letters, numbers, and underscores only.
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lPunishment session timed out!
"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Teleport to player
teleport_to_player:
input-timeout: 30
save-answers: false
validation:
type: STRING
rules:
- "length
: 3;16
"
- "contains
: /^
[a-zA-Z0-9_
]+$/
" # Only letters, numbers, and underscores
actions:
start:
- "send_message
:
&6&lTeleportation Request
"
- "send_bossbar
:
&eEnter player name to teleport to
...
(
{timeout
}s timeout
);YELLOW;SOLID;0.0;200
"
- "send_title
:
&aPlayer Teleport;&7Enter the player's name
(
{timeout
}s timeout
);10;100;20
"
- "send_actionbar
:
&ePlayer name must be 3-16 characters. Timeout
:
{timeout
}s;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&a&lTeleporting to
{input
}
...
"
- "send_bossbar
:
&a&lTELEPORTING!;GREEN;SOLID;1.0;100"
- "teleport_to_player
:
{input
}
"
- "send_message
:
&aSuccessfully teleported to
{input
}!
"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;1.0
"
fail:
- "send_message
:
&c&lInvalid player name! Must be 3-16 characters, letters, numbers, and underscores only.
"
- "send_bossbar
:
&c&lINVALID NAME!;RED;SOLID;0.5;100
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lTeleportation request timed out after
{timeout
} seconds!
"
- "send_bossbar
:
&c&lTIMEOUT!
(
{timeout
}s
);RED;SOLID;0.0;100
"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Give item to player
give_item_to_player:
input-timeout: 30
save-answers: true
validation:
type: STRING
rules:
- "length
: 3;16
"
- "contains
: /^
[a-zA-Z0-9_
]+$/
"
actions:
start:
- "send_message
:
&6&lItem Give Request
"
- "send_bossbar
:
&eEnter player name to give item to
...;YELLOW;SOLID;0.0;200
"
- "send_title
:
&aGive Item;&7Enter the player's name;10;100;20
"
- "send_actionbar
:
&ePlayer name must be 3-16 characters;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&a&lGiving diamond to
{input
}
...
"
- "send_bossbar
:
&a&lGIVING ITEM!;GREEN;SOLID;1.0;100
"
- "take_item
: DIAMOND;1
"
- "give_item
: DIAMOND;1;
{input
}
"
- "send_message
:
&aSuccessfully gave diamond to
{input
}!
"
- "play_sound
: ENTITY_PLAYER_LEVELUP;1.0;1.0
"
- "console_command
: say
{player
} gave diamond to
{input
}
"
fail:
- "send_message
:
&c&lInvalid player name! Must be 3-16 characters, letters, numbers, and underscores only.
"
- "send_bossbar
:
&c&lINVALID NAME!;RED;SOLID;0.5;100
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lGive item request timed out!
"
- "send_bossbar
:
&c&lTIMEOUT!;RED;SOLID;0.0;100"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Set player gamemode
set_gamemode:
input-timeout: 30
save-answers: false
validation:
type: STRING
rules:
- "contains
: creative or survival or adventure or spectator
"
actions:
start:
- "send_message
:
&6&lGamemode Change
"
- "send_bossbar
:
&eEnter gamemode
(creative/survival/adventure/spectator
)
...;YELLOW;SOLID;0.0;200
"
- "send_title
:
&aGamemode Change;&7Choose your gamemode;10;100;20
"
- "send_actionbar
:
&eOptions: creative, survival, adventure, spectator;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&a&lChanging gamemode to
{input
}
...
"
- "send_bossbar
:
&a&lCHANGING!;GREEN;SOLID;1.0;100"
- "console_command
: gamemode
{input
}
{player
}
"
- "send_message
:
&aSuccessfully changed gamemode to
{input
}!
"
- "play_sound
: ENTITY_PLAYER_LEVELUP;1.0;1.0
"
fail:
- "send_message
:
&c&lInvalid gamemode! Choose from
: creative, survival, adventure, spectator
"
- "send_bossbar
:
&c&lINVALID GAMEMODE!;RED;SOLID;0.5;100
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lGamemode change timed out!
"
- "send_bossbar
:
&c&lTIMEOUT!;RED;SOLID;0.0;100"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Heal player
heal_player:
input-timeout: 20
save-answers: true
validation:
type: STRING
rules:
- "length
: 3;16
"
- "contains
: /^
[a-zA-Z0-9_
]+$/
"
actions:
start:
- "send_message
:
&6&lHeal Player Request
"
- "send_bossbar
:
&eEnter player name to heal
...;YELLOW;SOLID;0.0;200
"
- "send_title
:
&aHeal Player;&7Enter the player's name;10;100;20
"
- "send_actionbar
:
&ePlayer name must be 3-16 characters;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&a&lHealing
{input
}
...
"
- "send_bossbar
:
&a&lHEALING!;GREEN;SOLID;1.0;100"
- "console_command
: heal
{input
}
"
- "send_message
:
&aSuccessfully healed
{input
}!
"
- "send_message
:
&aYou have been healed by
{player
}!;
{input
}
"
- "play_sound
: ENTITY_PLAYER_LEVELUP;1.0;1.0
"
fail:
- "send_message
:
&c&lInvalid player name! Must be 3-16 characters, letters, numbers, and underscores only.
"
- "send_bossbar
:
&c&lINVALID NAME!;RED;SOLID;0.5;100
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lHeal request timed out!
"
- "send_bossbar
:
&c&lTIMEOUT!;RED;SOLID;0.0;100"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Set player time
set_time:
input-timeout: 30
save-answers: false
validation:
type: STRING
rules:
- "contains
: day or night or sunrise or sunset
"
actions:
start:
- "send_message
:
&6&lTime Change
"
- "send_bossbar
:
&eEnter time
(day/night/sunrise/sunset
)
...;YELLOW;SOLID;0.0;200
"
- "send_title
:
&aTime Change;&7Choose the time;10;100;20
"
- "send_actionbar
:
&eOptions: day, night, sunrise, sunset;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&a&lSetting time to
{input
}
...
"
- "send_bossbar
:
&a&lSETTING TIME!;GREEN;SOLID;1.0;100
"
- "console_command
: time set
{input
}
"
- "send_message
:
&aSuccessfully set time to
{input
}!
"
- "play_sound
: ENTITY_PLAYER_LEVELUP;1.0;1.0
"
- "console_command
: say
{player
} set time to
{input
}
"
fail:
- "send_message
:
&c&lInvalid time! Choose from
: day, night, sunrise, sunset
"
- "send_bossbar
:
&c&lINVALID TIME!;RED;SOLID;0.5;100
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lTime change timed out!
"
- "send_bossbar
:
&c&lTIMEOUT!;RED;SOLID;0.0;100"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"
# Example: Set player weather
set_weather:
input-timeout: 30
save-answers: false
validation:
type: STRING
rules:
- "contains
: sun or storm
"
actions:
start:
- "send_message
:
&6&lWeather Change
"
- "send_bossbar
:
&eEnter weather
(clear/rain/thunder
)
...;YELLOW;SOLID;0.0;200
"
- "send_title
:
&aWeather Change;&7Choose the weather;10;100;20
"
- "send_actionbar
:
&eOptions: clear, rain, thunder;200
"
- "play_sound
: BLOCK_NOTE_BLOCK_PLING;1.0;1.2
"
success:
- "send_message
:
&a&lSetting weather to
{input
}
...
"
- "send_bossbar
:
&a&lSETTING WEATHER!;GREEN;SOLID;1.0;100
"
- "console_command
: weather
{input
}
"
- "send_message
:
&aSuccessfully set weather to
{input
}!
"
- "play_sound
: ENTITY_PLAYER_LEVELUP;1.0;1.0
"
- "console_command
: say
{player
} set weather to
{input
}
"
fail:
- "send_message
:
&c&lInvalid weather! Choose from
: clear, rain, thunder
"
- "send_bossbar
:
&c&lINVALID WEATHER!;RED;SOLID;0.5;100
"
- "play_sound
: ENTITY_VILLAGER_NO;1.0;0.8
"
timeout:
- "send_message
:
&c&lWeather change timed out!
"
- "send_bossbar
:
&c&lTIMEOUT!;RED;SOLID;0.0;100"
- "play_sound
: ENTITY_ENDERMAN_TELEPORT;1.0;0.5
"