diff --git a/src/main/java/net/minestom/server/item/ItemDisplay.java b/src/main/java/net/minestom/server/item/ItemDisplay.java deleted file mode 100644 index b88013b33..000000000 --- a/src/main/java/net/minestom/server/item/ItemDisplay.java +++ /dev/null @@ -1,76 +0,0 @@ -package net.minestom.server.item; - -import com.google.gson.JsonNull; -import com.google.gson.stream.JsonReader; -import net.kyori.adventure.text.Component; -import net.minestom.server.chat.JsonMessage; - -import java.util.stream.Stream; - -public class ItemDisplay { - - private Component displayName; - private Component[] lore; - - /** - * @deprecated Use {@link #ItemDisplay(Component, Component[])} - */ - @Deprecated - public ItemDisplay(JsonMessage displayName, JsonMessage[] lore) { - this.displayName = displayName.asComponent(); - this.lore = new Component[lore.length]; - - for (int i = 0; i < lore.length; i++) { - this.lore[i] = lore[i].asComponent(); - } - } - - public ItemDisplay(Component displayName, Component[] lore) { - this.displayName = displayName; - this.lore = lore; - } - - /** - * Gets the item display name. - * - * @return the item display name - * @deprecated Use {@link #getDisplayName()} - */ - @Deprecated - public JsonMessage getDisplayNameJson() { - return JsonMessage.fromComponent(displayName); - } - - /** - * Gets the item lore. - * - * @return the item lore - * @deprecated Use {@link #getLore()} - */ - @Deprecated - public JsonMessage[] getLoreJson() { - JsonMessage[] loreOld = new JsonMessage[lore.length]; - for (int i = 0; i < lore.length; i++) { - loreOld[i] = JsonMessage.fromComponent(lore[i]); - } - return loreOld; - } - - /** - * Gets the item display name. - * - * @return the item display name - */ - public Component getDisplayName() { - return displayName; - } - - /** - * Gets the item lore. - * - * @return the item lore - */ - public Component[] getLore() { - return lore; - } -} diff --git a/src/main/java/net/minestom/server/listener/BlockPlacementListener.java b/src/main/java/net/minestom/server/listener/BlockPlacementListener.java index 1a7a6bb13..f6eb3bfc3 100644 --- a/src/main/java/net/minestom/server/listener/BlockPlacementListener.java +++ b/src/main/java/net/minestom/server/listener/BlockPlacementListener.java @@ -195,8 +195,6 @@ public class BlockPlacementListener { if (refreshChunk) { chunk.sendChunkSectionUpdate(ChunkUtils.getSectionAt(blockPosition.getY()), player); } - - player.getInventory().refreshSlot(player.getHeldSlot()); } }