ItemMeta#getOrDefault annotation

This commit is contained in:
TheMode 2021-04-11 17:05:32 +02:00
parent 792dd9787f
commit ea3aedd76f

View File

@ -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)) {