public class ItemOverride
extends java.lang.Object
implements net.kyori.examination.Examinable
Overrides are ignored if it has been already overridden once, for example this avoids recursion on overriding to the same model
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
@NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> |
examinableProperties() |
int |
hashCode() |
net.kyori.adventure.key.Key |
model()
Returns the resource location of the new
item model if the case is met
|
static ItemOverride |
of(net.kyori.adventure.key.Key model,
ItemPredicate... predicates)
Creates a new
ItemOverride instance
from the given values |
static ItemOverride |
of(net.kyori.adventure.key.Key model,
java.util.List<ItemPredicate> predicates)
Creates a new
ItemOverride instance
from the given values |
@Unmodifiable java.util.List<ItemPredicate> |
predicate()
Returns an unmodifiable list of the cases
where this item model override should be
used
|
java.lang.String |
toString() |
public net.kyori.adventure.key.Key model()
public @Unmodifiable java.util.List<ItemPredicate> predicate()
@NotNull public @NotNull java.util.stream.Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
examinableProperties in interface net.kyori.examination.Examinablepublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic static ItemOverride of(net.kyori.adventure.key.Key model, java.util.List<ItemPredicate> predicates)
ItemOverride instance
from the given valuesmodel - The new item modelpredicates - The item override predicatesItemOverride instancepublic static ItemOverride of(net.kyori.adventure.key.Key model, ItemPredicate... predicates)
ItemOverride instance
from the given valuesmodel - The new item modelpredicates - The item override predicatesItemOverride instance