mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-08 01:17:47 +01:00
Add default impl for hasTag
This commit is contained in:
parent
2b5b11a483
commit
3e4a99a80c
@ -24,7 +24,9 @@ public interface TagReadable {
|
|||||||
* @param tag the tag to check
|
* @param tag the tag to check
|
||||||
* @return true if the tag is present, false otherwise
|
* @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.
|
* Converts an nbt compound to a tag reader.
|
||||||
|
Loading…
Reference in New Issue
Block a user