- Сообщения
- 85
- Решения
- 1
Проблема в том, что есть и 2-оя рука у игрока, а как получить и выкинуть предметы из этой руки, я не знаю.
Вот мой код:
Вот мой код:
Код:
for (item in player.inventory.contents) {
if (item != null && item.type != null && item.type != Material.AIR) {
player.inventory.remove(item)
loc.world.dropItemNaturally(loc, item)
}
}
for (item in player.inventory.armorContents) {
if (item != null && item.type != null && item.type!! != Material.AIR) {
loc.world.dropItemNaturally(loc, item)
}
player.inventory.armorContents =
arrayOf(ItemStack(Material.AIR), ItemStack(Material.AIR), ItemStack(Material.AIR), ItemStack(Material.AIR))
}