Keep inventory after map reset

Discussion in 'Plugin Requests' started by cactuspy, Sep 17, 2021.

  1. Offline

    cactuspy

    im tryna make it so you can keep one item from your inventory after we reset the map of a server,
    basically the gui of your old inventory will appear when you join a reset game, and you can choose a certain number of slots you can keep

    version :1.16, Paper
    command: /KeepInvReset, /KeepInvReset ItemAmount [the number of how many items you can choose], /KeepInvReset ResetMap
    name: KeepInvReset
     
  2. Offline

    cactuspy

    a cool way to do this would be to save the uuid of the player in the server files, and then apply that after the reset and create a gui of two large chest inventories side by side with the one on the left having all your old inventory stuff in it, and depending how many items are to be selected thats how big the other inventory would be, and then y0u just stick the item in and press a button to verify it, maybe every time a player leaves it saves their uuid, and kicks them out when a reset is commencing so it saves their uuid then too
     
    Last edited: Sep 20, 2021
  3. Offline

    LAD

    Should the plugin also do the reset for you, or should it just kick all players and then maybe shutdown the server, so you can reset yourself?
     
  4. Offline

    cactuspy

    honestly, id prefer if it could just reset the server itself, but if the other way does the job and is easier to develop then in the end thats the one id choose, a finished product is better than no product

    or even just make the plugin create a folder that i can stick the old uuid files in manually after resetting the server, and then the plugin takes that and once the players join with the correlating uuid player number, it gives them the option to take that item(s) out of their old uuid and put into their new uuid, basically like a chat message saying "detected items able to be transferred from your previous lineage, would you like to see, Y or N" and once you say yes a chest gui will appear on your screen and you can grab # amount of items out of that inventory and stick it into your new inventory, but once it gets past said amount of items it doesnt let you claim any more and kicks you off the gui, and since the player inventory takes more slots there can basically be two pages you can select from and you can switch from them by pressing an item slot on the bottom right of the chest gui and or bottom left

    im making it more broad for others to be able to use but my main focus is for a player to select a single item to take with them through the reset, which allows for lineage type gameplay, that like once the players get bored they can decide to reset the server, take one item with them and select a few abilities from when they were alive in their last life, basically items

    But in the end if you want to create it in a more automatic way its up to you completely
     
    Last edited: Sep 20, 2021
  5. Offline

    LAD

  6. Offline

    cactuspy

    after a bit of testing i realized i wanted one thing to change, i want it so you cant bring shulker boxes through the reset and set it so if keepinventory number is 0, dont open the gui at all, because it often believes the server has been resetted although it hasent been, and even if you set keepinventory number to 0, the gui opens up and they can still grab 1 thing, and in the event its a shulker box, they can simply leave and join back, and dupe the box again
     
    Last edited: Oct 23, 2021 at 7:54 AM

Share This Page