From 07c64d7c6978e0d85a2777e2ff40e4bc6f699cb1 Mon Sep 17 00:00:00 2001 From: Snabeldier <79211348+Snabeldier@users.noreply.github.com> Date: Thu, 16 Jan 2025 03:30:41 +0100 Subject: [PATCH] remove some obsolete methods --- src/main/java/minevalley/core/api/Core.java | 14 -------------- src/main/java/minevalley/core/api/CoreServer.java | 4 ---- .../minevalley/core/api/utils/ItemBuilder.java | 11 ----------- 3 files changed, 29 deletions(-) diff --git a/src/main/java/minevalley/core/api/Core.java b/src/main/java/minevalley/core/api/Core.java index 2c83a9c0..6a92e07e 100644 --- a/src/main/java/minevalley/core/api/Core.java +++ b/src/main/java/minevalley/core/api/Core.java @@ -783,20 +783,6 @@ public static ItemBuilder createItem(@Nonnull Material material) throws IllegalA return server.createItem(material); } - /** - * Creates a new item-builder based on a specific material and data. - * - * @param material material of the item to create - * @param data specific data for the item as short - * @return new item-builder - * @throws IllegalArgumentException if the material is null or data is invalid - */ - @Nonnull - @Contract("_, _ -> new") - public static ItemBuilder createItem(@Nonnull Material material, int data) throws IllegalArgumentException { - return server.createItem(material, data); - } - /** * Creates a new item-builder from the players head. * diff --git a/src/main/java/minevalley/core/api/CoreServer.java b/src/main/java/minevalley/core/api/CoreServer.java index 2270f88e..1aefb982 100644 --- a/src/main/java/minevalley/core/api/CoreServer.java +++ b/src/main/java/minevalley/core/api/CoreServer.java @@ -198,10 +198,6 @@ public interface CoreServer { @Contract("_ -> new") ItemBuilder createItem(@Nonnull Material material) throws IllegalArgumentException; - @Nonnull - @Contract("_, _ -> new") - ItemBuilder createItem(@Nonnull Material material, int data) throws IllegalArgumentException; - @Nonnull @Contract("_ -> new") ItemBuilder createItem(@Nonnull Player player) throws IllegalArgumentException; diff --git a/src/main/java/minevalley/core/api/utils/ItemBuilder.java b/src/main/java/minevalley/core/api/utils/ItemBuilder.java index b9fbb3bb..7c25a325 100644 --- a/src/main/java/minevalley/core/api/utils/ItemBuilder.java +++ b/src/main/java/minevalley/core/api/utils/ItemBuilder.java @@ -46,17 +46,6 @@ public interface ItemBuilder { @Contract("_ -> this") ItemBuilder setDurability(@Nonnegative int durability) throws IllegalArgumentException, UnsupportedOperationException; - /** - * Sets the item's data. - * - * @param data data of the item as integer - * @return this item-builder - * @throws IllegalArgumentException if the data is negative - */ - @Nonnull - @Contract("_ -> this") - ItemBuilder setData(@Nonnegative int data) throws IllegalArgumentException; - /** * Sets the item's custom model data. * @param customModelData custom model data of the item as integer