Mending changing repair cost

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Feb 14, 2024
Category: repair cost?

Suggested name: Mending Repair

Spigot/Skript Version:
- I am running a 1.8.8 paper server and currently have skript 2.2

What I want:

I don't want to completely ban mending, but I want to decrease how OP it is to still encourage caution when using a tool and having to spend resources to repair this. This is why, I would like to decrease the repair cost of any given tool that has mending by half. This means that a tool with mending will have a max repair cost of 20 and wont ever become "too expensive."
Im not sure if Skript allows for configs, but if it does I think it would be nice to have the %off repair cost multiplier to be changeable. Also, while I would want it set to 0, I think there should also be an option to configure how much mending works so it the vanilla concept isnt thrown out the window. For example, with this plugin mending would divide repair cost by 2 but still work just a lot slower.

However, if the config thing is too much, I would still be extremely grateful for a plug in that just divides the repair cost by 2 and removes the "too expensive" cap for tools with mending.

Ideas for commands:

Ideas for permissions:

When I'd like it by: not sure how long these take... maybe in around 5 days?
Using SkBee, you can change repair costs with:

    divide: 2 # How much mending will divide the amount by

on anvil prepare:
    if slot 0 of event-inventory has mending: # The first tool has mending on it
        set repair cost of event-inventory to (repair cost of event-inventory / {@divide})
It will make the too expensive message appear later. It divides the cost which means it could still get up to "too expensive" if used enough.

If you want to completely remove it you could add this:

on anvil prepare:
    if repair cost of event-inventory >= 40: # "Too Expensive" shows at a 40 or more level cost
        set repair cost of event-inventory to 39