Fix renaming pet not opening proper window
This commit is contained in:
parent
53aa1b655b
commit
aedf04b3e3
@ -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<CosmeticManager, CosmeticShop>
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user