Merge pull request #2 from MiguVT/master

EconomyShopGUI dependency update + Blocked block placing on minion position
This commit is contained in:
TomTom 2024-02-28 15:52:29 +01:00 committed by GitHub
commit e9c95b21ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -112,8 +112,7 @@ allprojects {
compileOnly 'com.h2database:h2:2.2.220'
compileOnly 'com.bgsoftware:WildStackerAPI:2023.2'
compileOnly 'net.essentialsx:EssentialsX:2.19.0'
compileOnly 'com.github.Gypopo:EconomyShopGUI-API:1.6.0'
compileOnly 'com.github.Gypopo:EconomyShopGUI-API:1.6.0'
compileOnly 'com.github.Gypopo:EconomyShopGUI-API:1.7.0'
compileOnly 'com.github.brcdev-minecraft:shopgui-api:3.0.0'
compileOnly 'com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT'
compileOnly 'com.bgsoftware:SuperiorSkyblockAPI:2023.2'

View File

@ -19,6 +19,7 @@ import org.bukkit.event.block.Action
import org.bukkit.event.player.PlayerInteractEvent
import org.bukkit.inventory.ItemStack
import org.bukkit.persistence.PersistentDataType
import org.bukkit.event.block.BlockPlaceEvent
class MinionPlaceListener : Listener {
@ -125,4 +126,11 @@ class MinionPlaceListener : Listener {
)
}
}
@EventHandler
fun onBlockPlace(event: BlockPlaceEvent) {
val blockLocation = event.block.location
if (AxMinionsPlugin.dataHandler.isMinion(blockLocation)) {
event.isCancelled = true
}
}
}