mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-01 13:01:32 +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);
|
return Collections.unmodifiableSet(canPlaceOn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Contract(pure = true)
|
||||||
public <T> T getOrDefault(@NotNull ItemTag<T> tag, @Nullable T defaultValue) {
|
public <T> T getOrDefault(@NotNull ItemTag<T> tag, @Nullable T defaultValue) {
|
||||||
var key = tag.getKey();
|
var key = tag.getKey();
|
||||||
if (nbt.containsKey(key)) {
|
if (nbt.containsKey(key)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user