mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-04 07:28:19 +01:00
Make ItemMetaView.Builder extends ItemMeta.Builder
Signed-off-by: TheMode <themode@outlook.fr>
This commit is contained in:
parent
0c6da422c7
commit
5839ec71cc
@ -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) {
|
||||
|
@ -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());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user