mirror of
https://github.com/Artillex-Studios/AxMinions.git
synced 2024-11-25 12:05:56 +01:00
Fixes to linking
This commit is contained in:
parent
0cc025b0be
commit
4662561ab9
@ -15,6 +15,7 @@ import org.bukkit.entity.Player
|
||||
import org.bukkit.event.EventHandler
|
||||
import org.bukkit.event.Listener
|
||||
import org.bukkit.event.player.PlayerInteractEvent
|
||||
import kotlin.math.min
|
||||
|
||||
class LinkingListener : Listener {
|
||||
companion object {
|
||||
@ -50,6 +51,11 @@ class LinkingListener : Listener {
|
||||
return
|
||||
}
|
||||
|
||||
val min = minion as com.artillexstudios.axminions.minions.Minion
|
||||
if (min.broken.get()) {
|
||||
return
|
||||
}
|
||||
|
||||
event.player.sendMessage(StringUtils.formatToString(Messages.PREFIX() + Messages.LINK_SUCCESS()))
|
||||
minion.setLinkedChest(event.clickedBlock!!.location)
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ class Minion(
|
||||
@Volatile
|
||||
private var ticking = false
|
||||
private var debugHologram: Hologram? = null
|
||||
private val broken = AtomicBoolean(false)
|
||||
val broken = AtomicBoolean(false)
|
||||
private var ownerOnline = false
|
||||
|
||||
init {
|
||||
|
Loading…
Reference in New Issue
Block a user