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