use of io.github.nucleuspowered.nucleus.api.service.NucleusKitService in project Nucleus by NucleusPowered.
the class Kit method redeem.
/**
* Attempts to redeem this kit, saving it beforehand.
*
* @param player The player to redeem the kit for
* @return The result
* @throws KitRedeemException If the kit was not redeemed.
*/
default NucleusKitService.RedeemResult redeem(Player player) throws KitRedeemException {
save();
NucleusKitService kitService = NucleusAPI.getKitService().orElseThrow(() -> new IllegalStateException("No Kit module"));
return kitService.redeemKit(this, player, true);
}
Aggregations