MCPcopy Create free account
hub / github.com/TyphoonMC/TyphoonCore / Handle

Method Handle

packet_handle.go:292–303  ·  view source on GitHub ↗
(player *Player)

Source from the content-addressed store, hash-verified

290 return
291}
292func (packet *PacketPlayChat) Handle(player *Player) {
293 if len(packet.Message) > 0 {
294 if packet.Message[0] != '/' {
295 player.core.CallEvent(&PlayerChatEvent{
296 player,
297 packet.Message,
298 })
299 } else {
300 player.core.onCommand(player, packet.Message[1:len(packet.Message)])
301 }
302 }
303}
304func (packet *PacketPlayChat) Id() (int, Protocol) {
305 return 0x02, V1_10
306}

Callers

nothing calls this directly

Calls 2

CallEventMethod · 0.80
onCommandMethod · 0.80

Tested by

no test coverage detected