mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2024-11-28 12:35:38 +01:00
Fix vMANY
This commit is contained in:
parent
bc2d03adf4
commit
6b312bb35f
@ -80,10 +80,21 @@ class MinionPlaceListener : Listener {
|
|||||||
var islandId = ""
|
var islandId = ""
|
||||||
if (islandLimit > 0 && AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration() != null) {
|
if (islandLimit > 0 && AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration() != null) {
|
||||||
islandId = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration()!!.getIslandAt(location)
|
islandId = AxMinionsAPI.INSTANCE.getIntegrations().getIslandIntegration()!!.getIslandAt(location)
|
||||||
|
if (Config.DEBUG()) {
|
||||||
|
event.player.sendMessage("Island ID: $islandId, limit: $islandLimit")
|
||||||
|
}
|
||||||
|
|
||||||
if (islandId.isNotBlank()) {
|
if (islandId.isNotBlank()) {
|
||||||
islandPlaced = AxMinionsAPI.INSTANCE.getDataHandler().getIsland(islandId)
|
islandPlaced = AxMinionsAPI.INSTANCE.getDataHandler().getIsland(islandId)
|
||||||
|
if (Config.DEBUG()) {
|
||||||
|
event.player.sendMessage("Placed: $islandPlaced")
|
||||||
|
}
|
||||||
|
|
||||||
if (islandPlaced >= islandLimit && !event.player.hasPermission("axminions.limit.*")) {
|
if (islandPlaced >= islandLimit && !event.player.hasPermission("axminions.limit.*")) {
|
||||||
|
if (Config.DEBUG()) {
|
||||||
|
event.player.sendMessage("Return")
|
||||||
|
}
|
||||||
|
|
||||||
event.player.sendMessage(
|
event.player.sendMessage(
|
||||||
StringUtils.formatToString(
|
StringUtils.formatToString(
|
||||||
Messages.PREFIX() + Messages.ISLAND_LIMIT_REACHED(),
|
Messages.PREFIX() + Messages.ISLAND_LIMIT_REACHED(),
|
||||||
@ -98,6 +109,10 @@ class MinionPlaceListener : Listener {
|
|||||||
item.itemMeta = meta
|
item.itemMeta = meta
|
||||||
}
|
}
|
||||||
return@submit
|
return@submit
|
||||||
|
} else {
|
||||||
|
if (Config.DEBUG()) {
|
||||||
|
event.player.sendMessage("Not return ${islandPlaced >= islandLimit} ${!event.player.hasPermission("axminions.limit.*")}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user