This commit is contained in:
TomTom 2024-05-26 11:46:55 +02:00
parent 4a742d1ca1
commit 29c7996d92
3 changed files with 7 additions and 3 deletions

View File

@ -224,6 +224,10 @@ class MinionInventoryListener : Listener {
}
}
if (Config.CHARGE_PRICE() <= 0) {
return
}
if (!itemCharge) {
AxMinionsPlugin.integrations.getEconomyIntegration()?.let {
minion.getOwner()?.let { player ->

View File

@ -38,8 +38,8 @@ class MinerMinionType : MinionType("miner", AxMinionsPlugin.INSTANCE.getResource
}
}
}
var generatorMode = false
val whitelist = arrayListOf<Material>()
private var generatorMode = false
private val whitelist = arrayListOf<Material>()
override fun shouldRun(minion: Minion): Boolean {
return MinionTicker.getTick() % minion.getNextAction() == 0L

View File

@ -34,6 +34,6 @@ class NMSHandler : NMSHandler {
override fun getExp(block: Block, itemStack: ItemStack): Int {
val craftBlock = block as CraftBlock
return craftBlock.nms.block.getExpDrop((block.state as CraftBlockState).handle, craftBlock.handle.minecraftWorld, CraftLocation.toBlockPosition(block.location), CraftItemStack.unwrap(itemStack), true)
return craftBlock.nms.block.getExpDrop((block.state as CraftBlockState).handle, craftBlock.handle.minecraftWorld, CraftLocation.toBlockPosition(block.location), CraftItemStack.asNMSCopy(itemStack), true)
}
}