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

Method Set

server/container/container.go:48–56  ·  view source on GitHub ↗

Set adds the item to the container and replaces the existing one if found, and returns if the operation was successful

(item item.Item)

Source from the content-addressed store, hash-verified

46
47// Set adds the item to the container and replaces the existing one if found, and returns if the operation was successful
48func (c *Container) Set(item item.Item) {
49 for x, i := range *c {
50 if i.Slot == item.Slot {
51 (*c)[x] = item
52 return
53 }
54 }
55 *c = append(*c, item)
56}
57
58// Add adds the item to the container and replaces the existing one if found, and returns if the operation was successful
59func (c *Container) SetAt(item item.Item, slot item.DataSlot) {

Callers 3

SetAtMethod · 0.95
SetAbilitiesMethod · 0.45
SetDimensionNameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected