Here's a simple script thrown together and scraped of some other pieces I use for my dEssentials package: Gamemode Inventories!
This concept was one of my first scripts inspired by what I believe was originally marked as a "Premium" plugin at the time. I believe something this simple should be free. When a player changes between gamemodes, their inventories are saved and swapped accordingly to that inventory's saved inventory.
The raw code:
Alternatively, here's the link to the script in a haste: Click me!
This concept was one of my first scripts inspired by what I believe was originally marked as a "Premium" plugin at the time. I believe something this simple should be free. When a player changes between gamemodes, their inventories are saved and swapped accordingly to that inventory's saved inventory.
The raw code:
Code:
Gamemode_Inventories:
type: world
debug: false
events:
on player changes gamemode:
- flag player gamemode.inventory.<player.gamemode>:!|:<player.inventory.list_contents>
- inventory clear
- if <player.has_flag[gamemode.inventory.<context.gamemode>]>:
- inventory set d:<player.inventory> o:<player.flag[gamemode.inventory.<context.gamemode>]>
Alternatively, here's the link to the script in a haste: Click me!