diff --git a/build.gradle b/build.gradle index 77dbf15..6a25466 100644 --- a/build.gradle +++ b/build.gradle @@ -120,9 +120,6 @@ allprojects { relocate("com.artillexstudios.axapi", "com.artillexstudios.axminions.libs.axapi") relocate("org.h2", "com.artillexstudios.axminions.libs.h2") relocate("org.jetbrains.kotlin", "com.artillexstudios.axminions.libs.kotlin") - relocate("net.kyori", "com.artillexstudios.axminions.libs.kyori") - relocate("revxrsal.commands", "com.artillexstudios.axminions.libs.lamp") - relocate("org.apache.commons.math3", "com.artillexstudios.axminions.libs.math") } } diff --git a/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionInventoryListener.kt b/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionInventoryListener.kt index 2e77f53..9ce4590 100644 --- a/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionInventoryListener.kt +++ b/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionInventoryListener.kt @@ -169,7 +169,7 @@ class MinionInventoryListener : Listener { } @EventHandler - fun onInventoryClosEvent(event: InventoryCloseEvent) { + fun onInventoryCloseEvent(event: InventoryCloseEvent) { val holder = event.inventory.holder as? Minion ?: return holder.removeOpenInventory(event.inventory) diff --git a/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionPlaceListener.kt b/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionPlaceListener.kt index 75c2c42..c1c8730 100644 --- a/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionPlaceListener.kt +++ b/common/src/main/kotlin/com/artillexstudios/axminions/listeners/MinionPlaceListener.kt @@ -28,6 +28,7 @@ class MinionPlaceListener : Listener { if (event.item == null) return if (!event.item!!.hasItemMeta()) return + if (!AxMinionsPlugin.integrations.getProtectionIntegration().canBuildAt(event.player, event.clickedBlock!!.location)) return val type = event.item!!.itemMeta!!.persistentDataContainer.get(Keys.MINION_TYPE, PersistentDataType.STRING) ?: return val minionType = MinionTypes.valueOf(type) ?: return event.isCancelled = true diff --git a/common/src/main/kotlin/com/artillexstudios/axminions/minions/miniontype/SlayerMinionType.kt b/common/src/main/kotlin/com/artillexstudios/axminions/minions/miniontype/SlayerMinionType.kt index 3db725e..b4b2a1b 100644 --- a/common/src/main/kotlin/com/artillexstudios/axminions/minions/miniontype/SlayerMinionType.kt +++ b/common/src/main/kotlin/com/artillexstudios/axminions/minions/miniontype/SlayerMinionType.kt @@ -7,12 +7,17 @@ import com.artillexstudios.axminions.api.utils.fastFor import com.artillexstudios.axminions.api.warnings.Warnings import com.artillexstudios.axminions.minions.MinionTicker import com.artillexstudios.axminions.nms.NMSHandler +import java.util.UUID import kotlin.math.roundToInt +import org.bukkit.Bukkit import org.bukkit.Material +import org.bukkit.block.Skull import org.bukkit.enchantments.Enchantment import org.bukkit.entity.LivingEntity import org.bukkit.entity.Player import org.bukkit.entity.Tameable +import org.bukkit.profile.PlayerProfile +import org.bukkit.profile.PlayerTextures class SlayerMinionType : MinionType("slayer", AxMinionsPlugin.INSTANCE.getResource("minions/slayer.yml")!!) {