Remove unused class

This commit is contained in:
themode 2021-04-02 23:34:40 +02:00
parent 56bba41f68
commit 255ccf8ad5
2 changed files with 0 additions and 78 deletions

View File

@ -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;
}
}

View File

@ -195,8 +195,6 @@ public class BlockPlacementListener {
if (refreshChunk) {
chunk.sendChunkSectionUpdate(ChunkUtils.getSectionAt(blockPosition.getY()), player);
}
player.getInventory().refreshSlot(player.getHeldSlot());
}
}