This commit is contained in:
TomTom 2024-06-13 17:50:45 +02:00
parent 10d4309b5e
commit 912bea3f69
2 changed files with 21 additions and 12 deletions

View File

@ -12,12 +12,16 @@ class SuperiorSkyBlock2Integration : IslandIntegration {
override fun getIslandPlaced(player: Player): Int { override fun getIslandPlaced(player: Player): Int {
var placed = 0 var placed = 0
SuperiorSkyblockAPI.getPlayer(player.uniqueId).island?.getIslandMembers(true)?.forEach { SuperiorSkyblockAPI.getPlayer(player.uniqueId).island?.getIslandMembers(true)?.forEach {
val a = AxMinionsAPI.INSTANCE.getDataHandler().getMinionAmount(it.uniqueId)
placed += a
if (Config.DEBUG()) { if (Config.DEBUG()) {
println("Member: ${it.name}") println("Member: ${it.name} - $a")
} }
placed += AxMinionsAPI.INSTANCE.getDataHandler().getMinionAmount(it.uniqueId)
} }
if (Config.DEBUG()) {
println("Placed total: $placed")
}
return placed return placed
} }

View File

@ -121,10 +121,11 @@ class MinerMinionType : MinionType("miner", AxMinionsPlugin.INSTANCE.getResource
drops.forEach { drops.forEach {
amount += it.amount amount += it.amount
} }
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration() val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration()
integration?.handleBlockBreak(block) integration?.handleBlockBreak(block)
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
} }
} }
} }
@ -167,10 +168,11 @@ class MinerMinionType : MinionType("miner", AxMinionsPlugin.INSTANCE.getResource
drops.forEach { drops.forEach {
amount += it.amount amount += it.amount
} }
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration() val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration()
integration?.handleBlockBreak(block) integration?.handleBlockBreak(block)
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
} }
} }
} }
@ -206,10 +208,11 @@ class MinerMinionType : MinionType("miner", AxMinionsPlugin.INSTANCE.getResource
drops.forEach { drops.forEach {
amount += it.amount amount += it.amount
} }
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration() val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration()
integration?.handleBlockBreak(block) integration?.handleBlockBreak(block)
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
} }
} }
} }
@ -246,10 +249,11 @@ class MinerMinionType : MinionType("miner", AxMinionsPlugin.INSTANCE.getResource
drops.forEach { item -> drops.forEach { item ->
amount += item.amount amount += item.amount
} }
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration() val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration()
integration?.handleBlockBreak(block) integration?.handleBlockBreak(block)
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
} }
} }
} }
@ -299,10 +303,11 @@ class MinerMinionType : MinionType("miner", AxMinionsPlugin.INSTANCE.getResource
amount += it.amount amount += it.amount
} }
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration() val integration = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration()
integration?.handleBlockBreak(block) integration?.handleBlockBreak(block)
minion.addToContainerOrDrop(drops)
block.type = Material.AIR
} }
} }
} }