mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2025-01-22 21:11:24 +01:00
Fixes
This commit is contained in:
parent
ee7726100c
commit
869efed819
@ -35,7 +35,14 @@ class MinionPlaceListener : Listener {
|
||||
|
||||
val item = event.item ?: return
|
||||
var meta = item.itemMeta ?: return
|
||||
if (!AxMinionsPlugin.integrations.getProtectionIntegration().canBuildAt(event.player, event.clickedBlock!!.location)) return
|
||||
if (!AxMinionsPlugin.integrations.getProtectionIntegration().canBuildAt(event.player, event.clickedBlock!!.location)) {
|
||||
if (Config.DEBUG()) {
|
||||
event.player.sendMessage(
|
||||
"Could not place due to protection hook!"
|
||||
)
|
||||
}
|
||||
return
|
||||
}
|
||||
val level = meta.persistentDataContainer.get(Keys.LEVEL, PersistentDataType.INTEGER) ?: 0
|
||||
val stats = meta.persistentDataContainer.get(Keys.STATISTICS, PersistentDataType.LONG) ?: 0
|
||||
if (Config.PLACE_PERMISSION() && !event.player.hasPermission("axminions.place.${minionType.getName()}")) {
|
||||
|
@ -605,6 +605,7 @@ class Minion(
|
||||
linkedInventory?.remove(it)
|
||||
return
|
||||
}
|
||||
setTool(ItemStack(Material.AIR))
|
||||
} else {
|
||||
setTool(ItemStack(Material.AIR))
|
||||
}
|
||||
@ -653,6 +654,7 @@ class Minion(
|
||||
linkedInventory?.remove(it)
|
||||
return canUseTool()
|
||||
}
|
||||
setTool(ItemStack(Material.AIR))
|
||||
} else {
|
||||
setTool(ItemStack(Material.AIR))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user