mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-20 23:21:24 +01:00
ItemMeta#getOrDefault annotation
This commit is contained in:
parent
792dd9787f
commit
ea3aedd76f
@ -108,6 +108,7 @@ public class ItemMeta implements Writeable {
|
||||
return Collections.unmodifiableSet(canPlaceOn);
|
||||
}
|
||||
|
||||
@Contract(pure = true)
|
||||
public <T> T getOrDefault(@NotNull ItemTag<T> tag, @Nullable T defaultValue) {
|
||||
var key = tag.getKey();
|
||||
if (nbt.containsKey(key)) {
|
||||
|
Loading…
Reference in New Issue
Block a user