public void HandleSetExperience(MinecraftClient client, IPacket packet) { var myPacket = (CBSetExperience)packet; if (client.ThisPlayer == null) client.ThisPlayer = new Player(); client.ThisPlayer.ExpBar = myPacket.Experiencebar; client.ThisPlayer.level = myPacket.Level; client.ThisPlayer.totalExp = myPacket.TotalExperience; client.RaiseExperienceUpdate(myPacket.Experiencebar, myPacket.Level, myPacket.TotalExperience); }