Skip to content

/heal only restores up to 2000 HP in the latest CMI version #10047

@lidashuai-li

Description

@lidashuai-li

Description of Issue

In the latest version of CMI (9.8.4.3), the /heal (and /cmi heal) command fails to fully restore a player's health to their maximum health value when the player's max health exceeds 2000 HP. There is a hard-coded cap of 2000 HP for the heal command—regardless of the player's actual maximum health attribute, executing the heal command will only restore health up to 2000 HP, leaving the player with incomplete health restoration if their max HP is higher than this threshold.
Steps to Reproduce
Install CMI version 9.8.4.3 (latest) on a Paper 1.12.2 server (build 1620).
Set a player's maximum health to a value higher than 2000 HP (e.g., 3000 HP) using attribute modifiers or third-party plugins.
Reduce the player's current health to a value below 2000 HP (e.g., 1000 HP) to verify the heal effect.
Execute /heal or /cmi heal as the player (or target the player with /heal [playername]).
Check the player's health via in-game HUD or /health command—health will be set to exactly 2000 HP instead of the max 3000 HP.

Expected Behavior

The /heal command should restore the target player's health exactly to their current maximum health value, regardless of whether the max health is above or below 2000 HP.
Actual Behavior
The /heal command enforces a hard cap of 2000 HP:
If the player's max health ≤ 2000 HP: Heal works correctly (restores to max health).
If the player's max health > 2000 HP: Heal only sets health to 2000 HP, leaving the player with missing health (e.g., 3000 max HP → 2000 HP after heal, 1000 HP short).
This behavior is consistent across all usages of the heal command (self/target, /heal//cmi heal).

Environment

CMI version: 9.8.4.3 (BungeeCord CMIB MySQL)
CMILib version: 1.5.8.2
Server software: Paper (build 1620) 1.12.2-R0.1-SNAPSHOT
Minecraft version: 1.12.2
Java version: JDK 8 (compatible with 1.12.2)
Economy: CMI Economy disabled, Vault 1.7.3-CMI installed
CMI Modules: 63 enabled, 6 disabled (coloredArmor, deathMessages, customMessages, tablist, armorEffects, votifier)
Additional Information
No error logs are generated in the server console or CMI logs when this issue occurs.
The 2000 HP cap appears to be hard-coded in the plugin logic, as no configurable max health limit for the heal command was found in CMI.yml or related config files.
Third-party plugins (attribute modifiers) that adjust max health are functioning correctly—only the CMI heal command is affected by this cap.

Version Information

[13:46:44 INFO]: --------------------------------------------------
[13:46:44 INFO]: CMI version: 9.8.4.3 BungeeCord CMIB MySQL
[13:46:44 INFO]: CMILib version: 1.5.8.2
[13:46:44 INFO]: Server version: Paper (1620) 1.12.2-R0.1-SNAPSHOT
[13:46:44 INFO]: CMI economy: Disabled
[13:46:44 INFO]: Vault version: 1.7.3-CMI
[13:46:44 INFO]: CMI chat system: Disabled
[13:46:44 INFO]: Modules -> 63 enabled, 6 disabled: coloredArmor, deathMessages, customMessages, tablist, armorEffects, votifier
[13:46:44 INFO]: --------------------------------------------------

Agreements

  • My server is supported by CMI.
  • My version of CMI at the time of this report is up to date.
  • I have searched the github and asked around before making this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug reportReports of bugs/inconsistencies

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions