forked from GeyserMC/Geyser
formatting code
This commit is contained in:
parent
0152107a06
commit
0a9470acb8
1 changed files with 3 additions and 3 deletions
|
@ -120,14 +120,14 @@ public class AnvilInventoryTranslator extends BlockInventoryTranslator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateSlot(GeyserSession session, Inventory inventory, int slot) {
|
public void updateSlot(GeyserSession session, Inventory inventory, int slot) {
|
||||||
if(slot >= 0 && slot <= 2){
|
if (slot >= 0 && slot <= 2) {
|
||||||
ItemStack item = inventory.getItem(slot);
|
ItemStack item = inventory.getItem(slot);
|
||||||
if(item != null){
|
if (item != null) {
|
||||||
String rename;
|
String rename;
|
||||||
CompoundTag tag = item.getNbt();
|
CompoundTag tag = item.getNbt();
|
||||||
if (tag != null) {
|
if (tag != null) {
|
||||||
CompoundTag displayTag = tag.get("display");
|
CompoundTag displayTag = tag.get("display");
|
||||||
if(displayTag != null){
|
if (displayTag != null) {
|
||||||
String itemName = displayTag.get("Name").getValue().toString();
|
String itemName = displayTag.get("Name").getValue().toString();
|
||||||
Message message = Message.fromString(itemName);
|
Message message = Message.fromString(itemName);
|
||||||
rename = message.getText();
|
rename = message.getText();
|
||||||
|
|
Loading…
Reference in a new issue