Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip stacked mobs from nametag check #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,29 +1,21 @@
package com.artillexstudios.axminions.commands

import com.artillexstudios.axapi.scheduler.Scheduler
import com.artillexstudios.axapi.utils.ItemBuilder
import com.artillexstudios.axapi.utils.StringUtils
import com.artillexstudios.axminions.AxMinionsPlugin
import com.artillexstudios.axminions.api.AxMinionsAPI
import com.artillexstudios.axminions.api.config.Config
import com.artillexstudios.axminions.api.config.Messages
import com.artillexstudios.axminions.api.data.DataHandler
import com.artillexstudios.axminions.api.minions.miniontype.MinionType
import com.artillexstudios.axminions.api.minions.miniontype.MinionTypes
import com.artillexstudios.axminions.api.utils.fastFor
import com.artillexstudios.axminions.converter.LitMinionsConverter
import com.artillexstudios.axminions.integrations.island.SuperiorSkyBlock2Integration
import com.artillexstudios.axminions.minions.Minions
import com.bgsoftware.superiorskyblock.api.SuperiorSkyblockAPI
import net.kyori.adventure.text.minimessage.tag.resolver.Placeholder
import org.bukkit.Chunk
import org.bukkit.OfflinePlayer
import org.bukkit.World.Environment
import org.bukkit.command.CommandSender
import org.bukkit.entity.Player
import revxrsal.commands.annotation.*
import revxrsal.commands.bukkit.annotation.CommandPermission
import java.util.concurrent.CompletableFuture

@Command("axminions", "minion", "minions")
class AxMinionsCommand {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ class Integrations : Integrations {

if (Bukkit.getPluginManager().getPlugin("BentoBox") != null) {
register(BentoBoxIntegration())
register(com.artillexstudios.axminions.integrations.island.BentoBoxIntegration())
Bukkit.getConsoleSender()
.sendMessage(StringUtils.formatToString("<#33FF33>[AxMinions] Hooked into BentoBox!"))
}
Expand Down Expand Up @@ -188,12 +189,6 @@ class Integrations : Integrations {
.sendMessage(StringUtils.formatToString("<#33FF33>[AxMinions] Hooked into ItemsAdder!"))
}

if (Bukkit.getPluginManager().getPlugin("ItemsAdder") != null) {
itemsAdderIntegration = true
Bukkit.getConsoleSender()
.sendMessage(StringUtils.formatToString("<#33FF33>[AxMinions] Hooked into ItemsAdder!"))
}

if (Bukkit.getPluginManager().getPlugin("Towny") != null) {
register(TownyIntegration())
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package com.artillexstudios.axminions.integrations.island

import com.artillexstudios.axminions.api.integrations.types.IslandIntegration
import org.bukkit.Location
import org.bukkit.block.Block
import world.bentobox.bentobox.BentoBox

class BentoBoxIntegration : IslandIntegration {

override fun getIslandAt(location: Location): String {
val island = BentoBox.getInstance().islandsManager.islandCache.getIslandAt(location)

if (island !== null) {
return island.uniqueId
}

return ""
}

override fun getExtra(location: Location): Int {
return 0
}


override fun handleBlockBreak(block: Block) {

}

override fun register() {

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class SlayerMinionType : MinionType("slayer", AxMinionsPlugin.INSTANCE.getResour
return@fastFor
}

if (!getConfig().getBoolean("damage-renamed") && it.customName != null) {
if (!getConfig().getBoolean("damage-renamed") && it.customName != null && AxMinionsPlugin.integrations.getStackerIntegration().getStackSize(it) <= 1) {
return@fastFor
}

Expand Down