Complete Refactor

So, Basically all the code behind the scenes has been changed in this update, This means that there might be new silly bugs or things behaving slightly different. If you run into issues, Please join the Discord for support!

Configuration Changes

1.3 comes with a new configuration format, The plugin will automatically convert your current config to the new version but all the fancy comments & explanation will be missing sadly. (along with new configurable properti

You can find the new format here if you’d like to manually apply it:

  • New Config format

    #
    #   BetterKeepInventory By BeepSterr
    #   Version 1.3
    #
    #   <https://www.spigotmc.org/resources/betterkeepinventory.93081/>
    #
     
    main:
     
      # Quick way to turn off ALL functionality.
      enabled: true
     
      # When enabled will spam the console with debugging data.
      debug: false
     
      # Used internally to determine if migrations need to happen
      # You should __NEVER__ have to change this. (And you might break it if you do)
      config_version: 2
     
    items:
     
      hotbar:
        # Sets the mode used for calculating damage dealt
        # Valid options are:
        # "NONE"          Ignores items in this section (disables)
        # "SIMPLE"        Deals a set amount of damage between min and max
        # "PERCENTAGE"    Deals a percentage of the items durability based on min and max
        mode: "NONE"
        min: 0
        max: 0
     
        # Should enchantments like Unbreaking affect the damage dealt?
        use_enchantments: true
     
        # Should we always leave at least 1 use left on items?
        dont_break: true
     
        # Materials in this list will be ignored
        # Use names from this list: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html>
        # Example:
        # - GOLDEN_HELMET
        # - GOLDEN_CHESTPLATE
        ignored_materials:
          - SHEARS
          - FISHING_ROD
          - CARROT_ON_A_STICK
          - FLINT_AND_STEEL
          - WARPED_FUNGUS_ON_A_STICK
     
      inventory:
        # Sets the mode used for calculating damage dealt
        # Valid options are:
        # "NONE"          Ignores items in this section (disables)
        # "SIMPLE"        Deals a set amount of damage between min and max
        # "PERCENTAGE"    Deals a percentage of the items durability based on min and max
        mode: "NONE"
        min: 0
        max: 0
     
        # Should enchantments like Unbreaking affect the damage dealt?
        use_enchantments: true
     
        # Should we always leave at least 1 use left on items?
        dont_break: true
     
        # Materials in this list will be ignored
        # Use names from this list: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html>
        # Example:
        # - GOLDEN_HELMET
        # - GOLDEN_CHESTPLATE
        ignored_materials:
          - SHEARS
          - FISHING_ROD
          - CARROT_ON_A_STICK
          - FLINT_AND_STEEL
          - WARPED_FUNGUS_ON_A_STICK
     
      armor:
        # Sets the mode used for calculating damage dealt
        # Valid options are:
        # "NONE"          Ignores items in this section (disables)
        # "SIMPLE"        Deals a set amount of damage between min and max
        # "PERCENTAGE"    Deals a percentage of the items durability based on min and max
        mode: "NONE"
        min: 0
        max: 0
     
        # Should enchantments like Unbreaking affect the damage dealt?
        use_enchantments: true
     
        # Should we always leave at least 1 use left on items?
        dont_break: true
     
        # Materials in this list will be ignored
        # Use names from this list: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Material.html>
        # Example:
        # - GOLDEN_HELMET
        # - GOLDEN_CHESTPLATE
        ignored_materials:
          - ELYTRA
    exp:
     
      levels:
        # Sets the mode used for calculating exp loss
        # Valid options are:
        # "NONE"          Do not lose levels on death.
        # "ALL"           Lose all levels
        # "SIMPLE"        Lose a set amount of levels between min and max (min and max are numbers)
     
        # "PERCENTAGE"    Lose a percentage of levels between min and max (min and max are percentages)
        mode: "NONE"
        min: 0
        max: 0
     
      # Decides if progress towards next level will be lost
      reset_level: false
     
    hunger:
      # Sets the mode used for calculating hunger on respawn
      # Valid options are:
      # "NONE"          Use vanilla behavoir of getting full hunger on death
      # "KEEP"          Keep current hunger level, but clamp value between min and max
      mode: "KEEP"
      min: 8  # 6 = 3 Drumsticks  (can't sprint)
      max: 20  # 20 = 10 Drumsticks (max)
      extra_removed_on_death: 1 # Extra hunger lost for dying (Will be applied BEFORE clamping)
     
    potions:
     
      # These potion effects will be kept on death
      kept_effects:
        - ABSORPTION
        - BAD_OMEN
        - BLINDNESS
        - DAMAGE_RESISTANCE
        - FAST_DIGGING
        - FIRE_RESISTANCE
        - HERO_OF_THE_VILLAGE
        - INCREASE_DAMAGE
        - INVISIBILITY
        - JUMP
        - LUCK
        - NIGHT_VISION
        - REGENERATION
        - SLOW_FALLING
        - WATER_BREATHING
        - WEAKNESS
        - UNLUCK
        - SLOW
     
      # Max length a effect will have when respawned
      # (if it has 2 minutes and this is set to 30, you will respawn with 30 seconds of the effect)
      # set to "false" to disable this.
      max_duration: 30
     
      # Levels to reduce the effect by
      # If this is set to 2 Speed IV will become Speed II
      reduce_potency: 1
     
      # Should the reduce & duration rule apply to negative effects?
      reduce_negative: false
     
    # Requires Vault
    eco:
     
      # Amount of money lost on death
      amount: 0

Permission Changes

A Lot of the permissions have changed. All of the “.breaking” nodes have been removed. Nodes for potions & economy have been added and betterkeepinventory.bypass.all has been simplified to betterkeepinventory.bypass

betterkeepinventory.admin & betterkeepinventory.reload has been granted to OP by default.

[betterkeepinventory.help](<http://betterkeepinventory.help>) and [betterkeepinventory.info](<http://betterkeepinventory.info>) have been granted to everyone by default.

/BetterKeepInventory command changes

  • A new alias /bki has been added.
  • A new subcommand /bki info has been added, This is where the config overview lives now
  • /bki now displays a list of subcommands
  • /bki is now usable without a permissions plugin

New in-game config viewer format

New in-game config viewer format

New Features

Potion Effects are now tracked and restored on death! You can configure a penalty to duration and strength as well as whitelist what effects are kept on death.

Economy you can now tax players when they die!

Todo:

Before this version can be released, the following has still to be done

  • Config value validation (Invalid modes)
  • Permission checks
  • Cleanup of debug logs (keep the debug logs sane)
  • Add eco to /bki info command