Manages player stamina by handling consumption recovery and restrictions based on actions.
Commands
/stamina view <player> - View a player's current stamina
/stamina set <player> <amount> - Set a player's stamina to a specific value
/stamina reload - Reload plugin
Permissions
stamina.view - Allows use of the /stamina view command
stamina.set - Allows use of the /stamina set command
stamina.reload - Allows use of the /stamina reload command
PlaceholderAPI Expansion
%stamina_stamina% - Displays the player's current stamina
%stamina_stamina_max% - Displays the player's maximum stamina
%stamina_stamina_percent% - Displays the player's stamina as a percentage
How does it work? Stamina is consumed when a player jumps, deals damage to players or mobs, or breaks blocks. If stamina reaches 0, these actions become impossible. Stamina can be recovered by eating food or drinking potions. All data is saved in the database.db file.
config.yml
main_command:
name: "stamina"
description: "Main Stamina command"
aliases:
- "st"
database:
type: sqlite
mysql:
host: localhost
port: 3306
database: stamina
username: root
password: password
stamina:
max: 100.0
regen_per_second: 4.0
sprint_drain_per_second: 8.0
sprint_minimum: 10.0
sprint_threshold: 5.0
jump_cost: 0.1
attack_cost: 1.0
mine_cost: 1.0
interact_blacklist:
- CHEST
- ENDER_CHEST
- CRAFTING_TABLE
- FURNACE
- BEACON
block_costs:
STONE: 1.0
COAL_ORE: 1.5
COPPER_ORE: 1.4
IRON_ORE: 1.6
GOLD_ORE: 1.8
REDSTONE_ORE: 2.0
LAPIS_ORE: 2.0
DIAMOND_ORE: 2.5
EMERALD_ORE: 2.5
NETHER_GOLD_ORE: 2.0
NETHER_QUARTZ_ORE: 2.2
ANCIENT_DEBRIS: 3.0
DEEPSLATE_COAL_ORE: 1.6
DEEPSLATE_COPPER_ORE: 1.5
DEEPSLATE_IRON_ORE: 1.7
DEEPSLATE_GOLD_ORE: 1.9
DEEPSLATE_REDSTONE_ORE: 2.1
DEEPSLATE_LAPIS_ORE: 2.1
DEEPSLATE_DIAMOND_ORE: 2.6
DEEPSLATE_EMERALD_ORE: 2.6
OBSIDIAN: 2.5
recovery:
APPLE: 4.0
BREAD: 5.0
CARROT: 3.0
BAKED_POTATO: 5.0
COOKED_BEEF: 10.0
COOKED_CHICKEN: 8.0
COOKED_MUTTON: 9.0
COOKED_PORKCHOP: 9.0
COOKED_RABBIT: 8.0
COOKED_SALMON: 8.0
COOKED_COD: 7.0
MUSHROOM_STEW: 7.5
RABBIT_STEW: 8.0
BEETROOT_SOUP: 6.0
PUMPKIN_PIE: 5.0
HONEY_BOTTLE: 6.0
GOLDEN_APPLE: 25.0
ENCHANTED_GOLDEN_APPLE: 60.0
POTION: 20.0
SPLASH_POTION: 20.0
LINGERING_POTION: 20.0
messages.yml
messages:
no-permission: '&cYou don''t have permission to use this command!'