BentoBox icon indicating copy to clipboard operation
BentoBox copied to clipboard

Feature request: Inventory clear on island reset

Open SlimeDog opened this issue 5 years ago • 1 comments

Description

Describe the bug

Per configuration option island.reset.on-join.inventory: true inventory is cleared. Unfortunately, that includes locked ItemJoin items. It would be nice if such items remained in inventory. In my case, they are used for inter-world navigation and other server-specific features.

Steps to reproduce the behavior

  • Start server with
    • ItemJoin, including locked items
    • Multiverse-Core
    • Multiverse-Inventories
  • Configure BSB to include island.reset.on-join.inventory: true
  • Rest BSB island
  • Observer that inventory is cleared, including locked items.

Expected behavior

It would be nice if BSB recognized locked items and left them in the inventory. Recognizing ItemJoin locked items would be fine, but very plugin-specific. As a generic solution: allow (arbitrary) commands that are run at the beginning and end of the reset sequence. Something like:

island:
  reset:
    on-join:
      # Reset inventory - if true, the player's inventory will be cleared.
      # Note: if you have MultiInv running or a similar inventory control plugin, that
      # plugin may still reset the inventory when the world changes.
      inventory: true
      commands-pre-reset: []
      commands-post-reset: []

which for me would be:

      commands-pre-reset: []
      commands-post-reset: 
      - itemjoin:ij getAll

Environment

Output of /bbox version (Mandatory)
>bbox version
[18:01:12] [Server thread/INFO]: Running SPIGOT 1.16.1.
[18:01:12] [Server thread/INFO]: BentoBox version: 1.15.0-SNAPSHOT-b1843
[18:01:12] [Server thread/INFO]: Database: JSON
[18:01:12] [Server thread/INFO]: Loaded Game Worlds:
[18:01:12] [Server thread/INFO]: world_skyblock (SkyBlock): Overworld, [nether_color]Nether, [end_color]End
[18:01:12] [Server thread/INFO]: Loaded Addons:
[18:01:12] [Server thread/INFO]: Biomes 1.13.0-SNAPSHOT-b180 (ENABLED)
[18:01:12] [Server thread/INFO]: BSkyBlock 1.13.0-SNAPSHOT-b601 (ENABLED)
[18:01:12] [Server thread/INFO]: Challenges 0.8.4-SNAPSHOT-b428 (ENABLED)
[18:01:12] [Server thread/INFO]: ExtraMobs 1.11.0.4-SNAPSHOT-b7 (ENABLED)
[18:01:12] [Server thread/INFO]: Level 2.3.3-SNAPSHOT-b399 (ENABLED)

Plugins (Optional)

>version Multiverse-Core
[18:06:19] [Server thread/INFO]: Multiverse-Core version 4.1.1-SNAPSHOT-b777
[18:06:19] [Server thread/INFO]: Website: https://dev.bukkit.org/projects/multiverse-core
[18:06:19] [Server thread/INFO]: Authors: Rigby, fernferret, lithium3141, main-- and dumptruckman
>version Multiverse-Inventories
[18:06:25] [Server thread/INFO]: Multiverse-Inventories version 4.0.0-SNAPSHOT-b469
[18:06:25] [Server thread/INFO]: Author: dumptruckman
>version ItemJoin
[18:01:34] [Server thread/INFO]: ItemJoin version 5.0.7-SNAPSHOT-b474
[18:01:34] [Server thread/INFO]: Get custom items on join.
[18:01:34] [Server thread/INFO]: Website: https://www.spigotmc.org/resources/itemjoin.12661/
[18:01:34] [Server thread/INFO]: Author: RockinChaos

SlimeDog avatar Jul 19 '20 01:07 SlimeDog

https://github.com/BentoBoxWorld/InvSwitcher/issues/27

RedstoneFuture avatar Jun 05 '24 16:06 RedstoneFuture