(player *Player)
| 576 | return |
| 577 | } |
| 578 | func (packet *PacketPlayPluginMessage) Handle(player *Player) { |
| 579 | if packet.Channel == "MC|Brand" || packet.Channel == "minecraft:brand" { |
| 580 | log.Printf("%s is using %s client", player.name, string(packet.Data)) |
| 581 | buff := make([]byte, len(player.core.brand)+1) |
| 582 | length := binary.PutUvarint(buff, uint64(len(player.core.brand))) |
| 583 | copy(buff[length:], []byte(player.core.brand)) |
| 584 | player.WritePacket(&PacketPlayPluginMessage{ |
| 585 | packet.Channel, |
| 586 | buff, |
| 587 | }) |
| 588 | } |
| 589 | player.core.CallEvent(&PluginMessageEvent{ |
| 590 | packet.Channel, |
| 591 | packet.Data, |
| 592 | }) |
| 593 | } |
| 594 | func (packet *PacketPlayPluginMessage) Id() (int, Protocol) { |
| 595 | return 0x18, V1_10 |
| 596 | } |
nothing calls this directly
no test coverage detected