public class EnchantmentPredicate extends Object
Modifier and Type | Field and Description |
---|---|
static EnchantmentPredicate |
ANY |
static EnchantmentPredicate[] |
ARRAY_OF_ANY |
private Enchantment |
enchantment |
private NumberRange.IntRange |
levels |
Constructor and Description |
---|
EnchantmentPredicate() |
EnchantmentPredicate(Enchantment enchantment,
NumberRange.IntRange levels) |
Modifier and Type | Method and Description |
---|---|
static EnchantmentPredicate |
deserialize(JsonElement el) |
static EnchantmentPredicate[] |
deserializeAll(JsonElement el) |
JsonElement |
serialize() |
boolean |
test(Map<Enchantment,Integer> map) |
public static final EnchantmentPredicate ANY
public static final EnchantmentPredicate[] ARRAY_OF_ANY
private final Enchantment enchantment
private final NumberRange.IntRange levels
public EnchantmentPredicate()
public EnchantmentPredicate(@Nullable Enchantment enchantment, NumberRange.IntRange levels)
public boolean test(Map<Enchantment,Integer> map)
public JsonElement serialize()
public static EnchantmentPredicate deserialize(@Nullable JsonElement el)
public static EnchantmentPredicate[] deserializeAll(@Nullable JsonElement el)