Revert "Converted all item on item plugins to listeners"

This reverts commit 4a0dfed1
This commit is contained in:
ceikry
2021-12-27 18:18:43 -06:00
parent b89ec2f2cd
commit 7b1faf317c
33 changed files with 2399 additions and 617 deletions
@@ -1,24 +0,0 @@
package api
import core.game.node.item.Item
fun IntRange.toIntArray(): IntArray {
if (last < first)
return IntArray(0)
val result = IntArray(last - first + 1)
var index = 0
for (element in this)
result[index++] = element
return result
}
fun Int.asItem() : Item {
return Item(this)
}
fun Collection<IntArray>.toIntArray() : IntArray {
val list = ArrayList<Int>()
this.forEach { arr -> arr.forEach { list.add(it) } }
return list.toIntArray()
}