Make ItemMetaView.Builder extends ItemMeta.Builder

Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
TheMode 2022-04-15 02:31:58 +02:00
parent 0c6da422c7
commit 5839ec71cc
2 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,8 @@ public sealed interface ItemMeta extends TagReadable, Writeable
return Set.copyOf(getTag(ItemTags.CAN_PLACE_ON));
}
sealed interface Builder extends Taggable permits ItemMetaImpl.Builder {
sealed interface Builder extends Taggable
permits ItemMetaImpl.Builder, ItemMetaView.Builder {
@NotNull ItemMeta build();
default <T> @NotNull Builder set(@NotNull Tag<T> tag, @Nullable T value) {

View File

@ -1,7 +1,6 @@
package net.minestom.server.item;
import net.minestom.server.tag.TagReadable;
import net.minestom.server.tag.Taggable;
import org.jetbrains.annotations.ApiStatus;
import org.jetbrains.annotations.NotNull;
@ -9,7 +8,7 @@ import org.jetbrains.annotations.NotNull;
@ApiStatus.Experimental
public interface ItemMetaView<T extends ItemMetaView.Builder> extends TagReadable {
@ApiStatus.Experimental
interface Builder extends Taggable {
non-sealed interface Builder extends ItemMeta.Builder {
default @NotNull ItemMeta build() {
return new ItemMetaImpl(tagHandler().copy());
}