🪛 Developer API

Events

  • CrateObtainRewardEvent - Called when player obtains a reward from a crate.

  • CrateOpenEvent - Called when player is about to open a crate. Cancellable.

Accessing Data

CratesPlugin plugin = CratesAPI.PLUGIN; // ExcellentCrates instance

UserManager userManager = CratesAPI.getUserManager(); // User manager.

CrateManager crateManager = CratesAPI.getCrateManager(); // Crate manager.

KeyManager keyManager = CratesAPI.getKeyManager(); // Key manager.

CrateUser user = userManager.getUserData(Player player); // Get user data.
CrateUser user = userManager.getUserData(UUID playerId);
CrateUser user = userManager.getUserData(String playerName);

Last updated