From 3e4a99a80c9edcf046c7d3a3b66cacfeb9a747cc Mon Sep 17 00:00:00 2001 From: TheMode Date: Wed, 16 Jun 2021 16:51:44 +0200 Subject: [PATCH] Add default impl for hasTag --- src/main/java/net/minestom/server/tag/TagReadable.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/minestom/server/tag/TagReadable.java b/src/main/java/net/minestom/server/tag/TagReadable.java index 18deb2f02..b75d582ea 100644 --- a/src/main/java/net/minestom/server/tag/TagReadable.java +++ b/src/main/java/net/minestom/server/tag/TagReadable.java @@ -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.