Skip to main content
ExamplePlugin.java
Always check isEmpty() before you index. With no public kits configured, get(0) throws IndexOutOfBoundsException.

Pick a kit by id

Indexing by position breaks as soon as somebody reorders config.yml. Match on the id instead.
A kit in getPublicKits() is declared in config.yml. That does not mean an admin ever saved contents to it with /savepublickit. Loading an empty kit gives the player an empty inventory.