From aedf04b3e315897046a2122b5b188d82b046e916 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Fri, 23 Oct 2015 09:26:21 +1300 Subject: [PATCH] Fix renaming pet not opening proper window --- .../src/mineplex/core/cosmetic/ui/page/PetPage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java index 1aed5a237..37882635f 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/cosmetic/ui/page/PetPage.java @@ -4,6 +4,8 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import net.minecraft.server.v1_8_R3.Blocks; +import net.minecraft.server.v1_8_R3.ChatMessage; import net.minecraft.server.v1_8_R3.EntityPlayer; import net.minecraft.server.v1_8_R3.IChatBaseComponent; import net.minecraft.server.v1_8_R3.Items; @@ -167,7 +169,7 @@ public class PetPage extends ShopPageBase PetTagPage petTagPage = new PetTagPage(getPlugin(), getShop(), getClientManager(), getDonationManager(), "Repairing", getPlayer(), pet, petPurchase); EntityPlayer entityPlayer = ((CraftPlayer) getPlayer()).getHandle(); int containerCounter = entityPlayer.nextContainerCounter(); - entityPlayer.playerConnection.sendPacket(new PacketPlayOutOpenWindow(containerCounter, "minecraft:anvil", IChatBaseComponent.ChatSerializer.a("Repairing"), 8)); + entityPlayer.playerConnection.sendPacket(new PacketPlayOutOpenWindow(containerCounter, "minecraft:anvil", new ChatMessage(Blocks.ANVIL.a() + ".name", new Object[0]))); entityPlayer.activeContainer = new AnvilContainer(entityPlayer.inventory, petTagPage.getInventory()); entityPlayer.activeContainer.windowId = containerCounter; entityPlayer.activeContainer.addSlotListener(entityPlayer);