Soul Speed enchantment durability loss removal 0.1 beta

Removed the durability loss on boots for the Soul Speed enchantment

  1. SyntaxCheck
    Native Minecraft Version:
    1.16
    Tested Minecraft Versions:
    • 1.16
    About
    This simple plugin removes the Durability loss that occurs when boots have the Soul Speed enchantment and a player moves across Soul Sand or Soul Soil (Referred to just Soul Soil for the below documentation). Please make sure to read the Special Consideration section below before placing this plugin on your server.

    Implementation criteria
    If all the below criteria are true the plugin will cancel the durability loss event (If you have other plugins that mess with the durability loss event then this plugin might not function at all).
    • Player is not riding any type of "Vehicle" ex horse.
    • Block below the players feet is Soul Sand or Soul Soil OR The block below the players feet is any variation of Carpet and the block the Carpet is on is Soul Soil or Soul Block.
    • The player has moved blocks within the last 1 second.

    Special Consideration
    Warning, I could not find a perfect way to implement this so it is possible there are situations where durability gets reduced when walking on Soul Soil or boots could retain their durability in instances where they should have lost durability.

    List of known edge cases where this plugin will not function exactly as intended and I do not have a way to fix:
    • Running on Soul Soil and you take a hit that results in exactly 1 durability loss to the boots (Skeleton arrow for example): boots will not lose durability from the attack
    • You stop running on Soul Soil and for 1 second or so after you stop running your boots will not lose durability when you take a hit that results in exactly 1 durability loss to the boots (Skeleton arrow for example)
    • Moving across Soul Soil at a rate slower than 1 block per second could result in durability loss on the boots.