@Override protected void actionPerformed(GuiButton button) { if (classMenu) FlansMod.getPacketHandler() .sendToServer(new PacketTeamSelect(classChoices[button.id].shortName, true)); else FlansMod.getPacketHandler() .sendToServer( new PacketTeamSelect( teamChoices[button.id] == null ? "null" : teamChoices[button.id].shortName, false)); Minecraft.getMinecraft().displayGuiScreen(null); }
@Override protected void keyTyped(char c, int i) { if (i == 1 || i == mc.gameSettings.keyBindInventory.getKeyCode()) { mc.thePlayer.closeScreen(); if (classMenu) { if (classChoices != null && classChoices.length > 0) FlansMod.getPacketHandler() .sendToServer(new PacketTeamSelect(classChoices[0].shortName, true)); } else FlansMod.getPacketHandler() .sendToServer(new PacketTeamSelect(Team.spectators.shortName, false)); } }
@Override public void handleServerSide(EntityPlayerMP playerEntity) { FlansMod.log("Received MG mount packet on server. Skipping."); }