mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2024-11-25 12:05:56 +01:00
Fixes
This commit is contained in:
parent
504f45c03f
commit
0d970619a1
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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")!!) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user