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

Method flags

command.go:219–231  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

217}
218
219func (node *commandNode) flags() uint8 {
220 flags := uint8(node.Type)
221 if node.Execute {
222 flags |= 0x04
223 }
224 if node.RedirectNode != -1 {
225 flags |= 0x08
226 }
227 if node.Parser != nil && node.Parser.GetSuggestion() != CommandSuggestionNone {
228 flags |= 0x10
229 }
230 return flags
231}
232
233func (node *commandNode) writeTo(player *Player) (err error) {
234 err = player.WriteUInt8(node.flags())

Callers 1

writeToMethod · 0.95

Calls 1

GetSuggestionMethod · 0.65

Tested by

no test coverage detected