Modify your users hp based on permission groups or individually. Great for RPG servers! Dependency: MPUtils This plugin is for those seeking for a plugin that can modify users max health but couldnt find one that suit their needs yet, just like me! SoftDependency: Vault. Only needed if trying to use the GUI feature or trying to use the per group HP system. For the GUI feature you may also need an economy plugin, and for the per group HP system you may need a permissions plugin.
Groups based max HP (ie: user: 10HP, admins: 20HP)
Individually based HP
HP set (player) command for setting a players max health independently of their group
HP add (player) command for adding hp to a players max health independently of their group
Check and correct a players HP to the HP specified in config on join, with ability to disable this feature
HP GUI for buying or selling HP (needs Vault)
Price formulas for increasing prices on proportion to players' HP
Consumables! (Items your players can consume for modyfing their HP)
HP permission checking - Set a player's HP by giving them a "healthpower.amount.X" permission
Commands:
-/HP - Opens the GUI (if enabled, otherwise shows help) (Also /hp gui to open the GUI)
-/HP help - Shows this list of commands
-/HP version - Show the plugin's current version
-/HP reload - Reloads the plugin's files
-/HP set (player) (HP) - Sets a player's max health to the specified
-/HP add (player) (HP) - Adds HP to a player's max health
-/HP gui - Opens the health buy GUI.
-/HP consumable get (name) - Gets a consumable by its name in the file.
-/HP consumable set (name) (add/set (refers to the health operation, either add hearts or set hearts)
(amount of hearts
)) - Sets a new consumable in the consumables file.
-/HP clear (player) - Clears a player's name from the HP file.
-/HP clearAll - Clears every player's name from the HP file.
-/HP check (player) - Checks and corrects a player's HP.
-/HP checkAll - Checks and corrects every online player's HP.
Permissions:
-healthpower.version - Allows you to check the plugin's current version
-healthpower.reload - Allows you to reload the plugin and its files
-healthpower.set - Allows you to set a player's max health
-healthpower.add - Allows you to add HP to a player's max health
-healthpower.gui - Allows a player to open the GUI
-healthpower.cap.bypass - Allows a player to bypass the maximum amount of health power.
-healthpower.consumables - Allows a player to manage consumable items.
-healthpower.clear - Allows a player to clear player's HP in hp file.
-healthpower.check - Allows a player to check and correct players' HP.
-healthpower.* - Gives access to every permission available
Code (YAML):
config: # Whether to enable metrics or not. Metrics are a way for the developer to know how many people/servers # are using this plugin and other statistics, you will not see a change in performance in the slightest if you keep # them enabled. That said, keeping them enabled is highly appreciated <3. use metrics: true
# Prefix used for messages prefix: '&f
[&cHealthPower&f
]'
# Should the plugin tell the console the group of a player when they join? debug: false
# Maximum amount of HP a player can get. When adding or setting, if enabled and the resulting HP is # higher than this cap and the the player does not have the "HealthPower.cap.bypass" the HP will not be modified. HP cap:
enabled: true
amount: 40
# If true will try to update the player's health bar in order to avoid client side render errors. # This tend to happen when a player has more than 20HP, the client will show the player as if # they only had 20, instead of the right amount, to avoid this inconvenience, even though it does not really affect # their real max health, the plugin will remove hearts and then it will give them back. update HP on join: true
# Whether or not the plugin should check AND CORRECT a players HP based on HP.yml. check HP on join: true
check HP on reload: true
# If the above options are true, and the player was not in the file, should the groups system be used instead? # Needs a permissions plugin AND vault use groups system: true
# If enabled, when reloading the plugin or when a player joins, the plugin will check for players' permissions # to look for permissions with a format similar to "healthpower.amount.X" where X is a given amount # and will correct the player's HP to the highest X found in there. This overrides the group system # and players' manually set HP. use permissions system: true
# Should custom consumable items for adding/setting HP be enabled? # If true, you can create your own consumable items and set them with a simple in-game command # with the following format: # /healthpower consumable add (name) (set/add) (amount) consumables enabled: true
GUI: # Should this feature be enabled? enabled: true
# The title you want for the GUI title: '&c&lBuy HP'
size: 27
# Price formulas. Equations for increasing health buy price on proportion to the player's health power. # To use them, set the price to %formula_INDEX%, where INDEX is the index for the formula in formulas. # For example, in order to get '500+(100*%HP%)', you should use %formula_0%, for '100*%HP%' use %formula_1% and so on. # You can use %HP% for the player's current health power. formulas: - 500+
(100*
%HP%) - -100*
%HP% - '
%HP%^2' -
(6*100
)-
(%HP%*100) # Items go from 0 to the size you specified -1 items:
'8':
material: BOOK
name: '&6
%name%''s Info' lore:
- '&fBalance: &a%balance%' - '&fHP: &c%HP%' type: info
amount: 0.0
price: 0.0
'12':
material: REDSTONE
name: '&cRemove 1 heart'
lore: - '&6&lClick &fon this item'
- '&fto remove 1 heart from your HP'
- '&fPrice: &e%price%' - '&fAffordable: %affordable%' type: add
amount: -2.0
price: '
%formula_1%' '13':
material: DIAMOND
name: '&fSet hp to 3 hearts'
lore: - '&6&lClick &fon this item'
- '&fto set your hp to 3 hearts'
- '&fPrice: &e%price%' - '&fAffordable: %affordable%' type: set
amount: 6.0
price: '
%formula_3%' '14':
material: EMERALD
name: '&aAdd 1 heart'
lore: - '&6&lClick &fon this item'
- '&fto add 1 heart to your hp'
- '&fPrice: &e%price%' - '&fAffordable: %affordable%' type: add
amount: 2.0
price: '
%formula_0%' # the format needed: # items: # material: the type of item # name: the name the item will have # lore: lines of lore to add to the item # type: the hp modify type # (add = add hearts, set = set hearts, info = player info only. Will not modify HP, any other options = add) # amount: the amount of hearte to add or set to # price: the amount of money to be taken from the player (can be negative numbers) messages:
list of commands: '&6List of commands'
no permission: '&cNo permission'
use: '&cUse
: &f/%command%%what% (player) (HP)' not online: '&cThat player is not online'
must be a number: '&cHP must be a double number
(ie
: 1.0
)'
unknown command: '&cUnknown Command, try &e/
%command% help' set HP: '&9
%player% &fjust set your HP to &c%HP%' add HP: '&9
%player% &fjust added you &c%HP% HP' you set HP: '&fYou just set the HP of &6
%player% &fto &c%HP% HP' you add HP: '&fYou just added &6
%player% &c%HP% HP' gui set HP: '&fYour HP is now &c
%HP%' gui add HP: '&c
%value% HP &fhave been &aadded &fto your total health (%HP%)' gui remove HP: '&c
%value% HP &fhave been &cremoved &ffrom your total health (%HP%)' yourself: yourself
hp automatic set: '&aYour &cHP &ahas been set to &c
%HP%' opening gui: '&fOpening buy hp menu!'
error opening gui: '&cThere was an error while trying to open de buy hp menu,
talk to an admin or check console'
no money: '&cYou do not have enough money. You need &f
%price%&c, and you have &f
%balance%' not enough hp: '&cYou do not have &f
%hp% &cspare hp' 'yes': '&ayes'
'no': '&cNo'
player HP above cap: '&cThat player''s resulting HP would be above the HP cap.
HP was not modified.'
HP above cap: '&cYour resulting HP would be above the HP cap. Your HP was not
modified'
default consumable message: '&fYour HP is now
%HP%' consumable given: '&aA consumable has been given to you'
consumable not in hand: '&cYou must be holding the consumable'
consumables disabled: '&cConsumables are disabled in this server!'
hp cannot be 0: '&cHP cannot be 0 or lower than 0'
hp cleared: '&fHP of player
%player% cleared!' hp cleared all: '&fEvery player''s HP has been cleared from the file!'
hp checked: '&aChecked and corrected HP for &f
%player%' hp checked all: '&aChecked and corrected HP for every player online!'
inventory full: '&cYour inventory is full.'
Code (YAML):
# HP values stored here # HP checking priorities: 1- by name (if the players name is under players, that value will be used) # 2- by permission (if player has any permission with the "healthpower.amount.NUMBER" format, that value will be used) # 3- by group (if a player's primary group is under the groups list in this file, the value for that group will be used) # 4- default (if none of the above apply for a player, this default value will be used). # Set default to 0 or any negative number to not use a default value and not modify players' hp when any other methods # apply to them. HP:
default: 20
players: [] groups:
owner: 20
admin: 18
user: 6
Code (YAML):
# MPHealthpower - List of consumables (must be enabled in config). # # None by default. You can add consumables in-game with the following command: # /healthpower consumable set (name) (set/add) (amount) # Ex: /healthpower consumable add consumable1 add 10 # When consuming the item you are holding when executing this command, 10 HP will be ADDED to the player consumables:
example1:
options:
add: 4
message: '&fThat potion has given you 4 extra hearts for a total of &c
%HP% &fHP!' item:
==: org.bukkit.inventory.ItemStack
v: 2580
type: POTION
meta:
==: ItemMeta
meta-type: POTION
display-name: §aMax health modifier!
lore: - §cDrink this potion
- ' to gain 2 extra hearts'
potion-type: minecraft:healing