Skip to main content
Version: Current

API Usage

Add virtual keys to a player

UserManager userManager = CratesProvider.get().getUserManager():

userManager.addKeys(uuid, "CrateName", KeyType.virtual_key, 5);

Add physical keys to a player

UserManager userManager = CratesProvider.get().getUserManager():

userManager.addKeys(uuid, "CrateName", KeyType.physical_key, 5);

Update or add how many times a player has opened a crate.

UserManager userManager = CratesProvider.get().getUserManager():

userManager.addOpenedCrate(uuid, "CrateName");

An example of the api in use in a plugin.

https://github.com/Crazy-Crew/ExamplePlugin/tree/ver/1.21 You can compile the plugin using gradle build