Add default impl for hasTag

This commit is contained in:
TheMode 2021-06-16 16:51:44 +02:00
parent 2b5b11a483
commit 3e4a99a80c

View File

@ -24,7 +24,9 @@ public interface TagReadable {
* @param tag the tag to check
* @return true if the tag is present, false otherwise
*/
boolean hasTag(@NotNull Tag<?> tag);
default boolean hasTag(@NotNull Tag<?> tag) {
return getTag(tag) != null;
}
/**
* Converts an nbt compound to a tag reader.