Extra heart

Discussion in 'Plugin Requests' started by xsvkaa, Feb 11, 2023.

Thread Status:
Not open for further replies.
  1. Offline

    xsvkaa

    Minecraft version: 1.18.2 Paper

    Suggested name: ExtraHeart

    What I want: I would like to ask the plugin for an extra heart, but you can only use it when you have less than 15 hp. I would like the item to be a gray dye item named "&6&lextra heart" with the lore "&7Use if you have less than 15 hp" (it's in the config). When a player has more than 15 hp, eg 16, he gets the message "You can't use this, you have more than 15 hp!"


    Ideas for commands: /addheart

    Ideas for permissions: admin.heart
     
  2. Offline

    raffel080108

    Should be easy enough, give me ~30 minutes at most I'd say

    Done - Tested on 1.19.3 PaperMC server (API version is 1.18.2 so it should work for you aswell, I was just too lazy to install an earlier server version just for a simple test like this)

    Please tell me if you find any bugs or have requests for extra features/changes

    (see below for updated version)
     
    Last edited: Feb 11, 2023
    xsvkaa likes this.
  3. Offline

    xsvkaa

    works, but would you add the ability to add multiple lines to the lore?
     
  4. Offline

    raffel080108

    So you want to be able to configure the lore on the item trough a config?

    EDIT: I just went on the assumption of interpreting your request that way. I have attached an updated version that includes a configuration for the extra-heart-item's name and lore

    EDIT 2: Attachment updated - I always like to include a built-in reload command when dealing with configurations in a plugin. I forgot to add that, so I just corrected that

    EDIT 3: I just realized I made a mistake when checking for the item when listening for when a player right-clicks, please give me a few minutes to fix this

    EDIT 4: Ok, mistake fixed - Updated version attached. Everything should work correctly now. Sorry for that :)
     

    Attached Files:

    Last edited: Feb 11, 2023
    xsvkaa likes this.
  5. Offline

    xsvkaa

Thread Status:
Not open for further replies.

Share This Page