/
CrazyCrates API has been bumped to 0.9.0
Key Manager class, which allows you to check Items that players are holding.
You can fetch this by doing CratesProvider#get()#getKeyManager()
/**
* A class for the KeyManager, It handles checking physical keys, and anything else we might need soon.
*
* @author Ryder Belserion
* @version 0.9.0
* @since 0.9.0
*/
public abstract class KeyManager<I> {
/**
* The default constructor for {@link KeyManager<I>}.
*
* @author Ryder Belserion
* @since 0.9.0
*/
public KeyManager() {}
/**
* Checks if the item is a valid key.
*
* @param item the ItemStack
* @return true or false
* @since 0.9.0
*/
public abstract boolean isKey(@NotNull final I item);
/**
* Checks if an item matches another item.
*
* @param item the initial ItemStack
* @param comparing the ItemStack to compare
* @return true or false
* @since 0.9.0
*/
public abstract boolean isMatchingKey(@NotNull final I item, @NotNull final I comparing);
/**
* Gets the name of the crate the key belongs to.
*
* @param item the ItemStack
* @return the name of the crate
* @since 0.9.0
*/
public abstract String getKey(@NotNull final I item);
}
ChestLines has been renamed to Rows in the crate config files, 5eec53b
/crazyrates migrate -mt CratesDeprecated to change this, or simply use Find and Replace.examples/crates/CrateExample.yml folder for a full example of how to do it.Items section which can be found on the documentation.Items section.As always, Report 🐛 to https://github.com/Crazy-Crew/CrazyCrates/issues
fde1b0e Update {prefix} replacement for messages
2e73bce Replace all double brace initializers with immutable maps, or new HashMap/List when needed
b92b47f Fix placeholders requiring a player name
5cfc069 Add missing item reward to prize #2 on first startup

Add unlimited crates to your server with 11 different crate types to choose from!