From af640881b05bc08cbd077bcb93fac9d292c7b958 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Fri, 29 Mar 2024 16:49:57 +0000 Subject: [PATCH] Fixed IridiumSkyblock --- .../integrations/antigrief/AntigriefIridiumSkyblock.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/antigrief/AntigriefIridiumSkyblock.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/antigrief/AntigriefIridiumSkyblock.kt index 1634ead4d..69b8954e1 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/antigrief/AntigriefIridiumSkyblock.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/eco/internal/spigot/integrations/antigrief/AntigriefIridiumSkyblock.kt @@ -13,7 +13,7 @@ class AntigriefIridiumSkyblock : AntigriefIntegration { player: Player, block: Block ): Boolean { - val api = IridiumSkyblockAPI.getInstance() + val api = IridiumSkyblockAPI.getInstance() ?: return false return api.getIslandPermission(api.getIslandViaLocation(block.location).orElse(null) ?: return true, api.getUser(player), PermissionType.BLOCK_BREAK) } @@ -22,7 +22,7 @@ class AntigriefIridiumSkyblock : AntigriefIntegration { player: Player, location: Location ): Boolean { - val api = IridiumSkyblockAPI.getInstance() + val api = IridiumSkyblockAPI.getInstance() ?: return false return api.getIslandPermission(api.getIslandViaLocation(location).orElse(null) ?: return true, api.getUser(player), PermissionType.BLOCK_BREAK) } @@ -31,7 +31,7 @@ class AntigriefIridiumSkyblock : AntigriefIntegration { player: Player, block: Block ): Boolean { - val api = IridiumSkyblockAPI.getInstance() + val api = IridiumSkyblockAPI.getInstance() ?: return false return api.getIslandPermission(api.getIslandViaLocation(block.location).orElse(null) ?: return true, api.getUser(player), PermissionType.BLOCK_PLACE) } @@ -40,7 +40,7 @@ class AntigriefIridiumSkyblock : AntigriefIntegration { player: Player, victim: LivingEntity ): Boolean { - val api = IridiumSkyblockAPI.getInstance() + val api = IridiumSkyblockAPI.getInstance() ?: return false return when (victim) { is Player -> api.getIslandViaLocation(victim.location).orElse(null) != null