Loadout
This plugin allows users to save loadouts (positions of items in inventory), which will then be loaded upon spawn. When a player with a saved loadout spawns, the plugin will check the player's inventory and then move their items according to loadouts.yml. Items saved in a loadout that the player does not have upon spawn will not be loaded. Additional items not saved in the loadout will randomly fill the player's inventory. This is a useful plugin for any PvP server.
Configuration
prefix : Sets the chat prefix the plugin should use. Default is [Loadout]. Set to "none" for no prefix.
load_delay : Sets the delay (in ms) for when the loadout is set after join & respawn events. This gives time for other plugins to load inventories before changing the layout. If you're experiencing issues with inventories not loading soon enough, increase this number. We recommend the use of the API below rather than join & respawn events.
load_message : Determines whether a message will be sent to the user after loading their loadout (set to false for no message).
on_player_join : Whether a player's loadout should be loaded upon joining the server.
on_player_respawn : Whether a player's loadout should be loaded upon respawning.
Commands & Permissions
/loadout : loadout.save : Allows the user to save a loadout.
Loading : loadout.load : Allows the user to load their loadout upon spawn.
Changelog
v1.0 - Plugin release v1.1 - Added more config options and API.
API
This is a very basic API for loading and saving loadouts for external plugins to use. We recommend utilizing this in your kits plugin rather than using the join & respawn events set in the config.
- Loadout loadout = (Loadout) getPluginManager().getPlugin("loadout")
Saving Loadouts:
- loadout.saveLayout(Player player, Inventory inventory)
Loading Loadouts:
- loadout.loadLayout(Player player)
This API does not check player permissions. Please do this yourself if you need to.
Please leave below any feedback/bugs. Thank you!
Comments