MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / NewIntegerArgument

Function NewIntegerArgument

server/command/builder.go:101–124  ·  view source on GitHub ↗
(name string, min, max *int32, nodes ...Node)

Source from the content-addressed store, hash-verified

99}
100
101func NewIntegerArgument(name string, min, max *int32, nodes ...Node) Node {
102 flags := int8(0)
103 var props = make([]any, 1, 3)
104
105 if min != nil {
106 flags &= 0x01
107 props = append(props, *min)
108 }
109 if max != nil {
110 flags &= 0x02
111 props = append(props, *max)
112 }
113 props[0] = flags
114
115 return Node{
116 Node: play.Node{
117 Flags: play.NodeArgument,
118 Name: name,
119 ParserId: Integer,
120 Properties: props,
121 },
122 children: nodes,
123 }
124}
125
126func NewStringArgument(name string, typ int, nodes ...Node) Node {
127 return Node{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected