mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-09 01:47:54 +01:00
Remove unused class
This commit is contained in:
parent
56bba41f68
commit
255ccf8ad5
@ -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;
|
||||
}
|
||||
}
|
@ -195,8 +195,6 @@ public class BlockPlacementListener {
|
||||
if (refreshChunk) {
|
||||
chunk.sendChunkSectionUpdate(ChunkUtils.getSectionAt(blockPosition.getY()), player);
|
||||
}
|
||||
|
||||
player.getInventory().refreshSlot(player.getHeldSlot());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user