MCPcopy Create free account
hub / github.com/PrismarineJS/node-minecraft-protocol / visit

Function visit

src/client/chat.js:309–317  ·  view source on GitHub ↗
(node, depth = 0)

Source from the content-addressed store, hash-verified

307 const node = nodes[commandNode]
308 const commandName = node.extraNodeData.name
309 function visit (node, depth = 0) {
310 const name = node.extraNodeData.name
311 if (node.extraNodeData.parser === 'minecraft:message') {
312 sliceIndexForMessage[commandName] = [name, depth]
313 }
314 for (const child of node.children) {
315 visit(nodes[child], depth + 1)
316 }
317 }
318 visit(node, 0)
319 }
320 })

Callers 1

chat.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected