diff --git a/build.gradle.kts b/build.gradle.kts index 6f14dc7..dc22384 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -35,7 +35,6 @@ dependencies { exclude("com.mojang:brigadier") } compileOnly("com.github.angeschossen:LandsAPI:7.0.2") - compileOnly("com.github.WhipDevelopment:CrashClaim:75abe3b665") implementation(platform("com.intellectualsites.bom:bom-1.18.x:1.20")) compileOnly("com.plotsquared:PlotSquared-Core") compileOnly("com.plotsquared:PlotSquared-Bukkit") diff --git a/src/main/java/io/th0rgal/protectionlib/ProtectionLib.java b/src/main/java/io/th0rgal/protectionlib/ProtectionLib.java index b7541d3..2c7f8f2 100644 --- a/src/main/java/io/th0rgal/protectionlib/ProtectionLib.java +++ b/src/main/java/io/th0rgal/protectionlib/ProtectionLib.java @@ -42,11 +42,6 @@ public static void init(JavaPlugin plugin) { } catch (Exception | NoClassDefFoundError e) { if (debug) e.printStackTrace(); } - try { - handleCompatibility("CrashClaim", plugin, (m, p) -> new CrashClaimCompat(m, p)); - } catch (Exception | NoClassDefFoundError e) { - if (debug) e.printStackTrace(); - } try { handleCompatibility("GriefPrevention", plugin, (m, p) -> new GriefPreventionCompat(m, p)); } catch (Exception | NoClassDefFoundError e) { diff --git a/src/main/java/io/th0rgal/protectionlib/compatibilities/CrashClaimCompat.java b/src/main/java/io/th0rgal/protectionlib/compatibilities/CrashClaimCompat.java deleted file mode 100644 index fd59045..0000000 --- a/src/main/java/io/th0rgal/protectionlib/compatibilities/CrashClaimCompat.java +++ /dev/null @@ -1,66 +0,0 @@ -package io.th0rgal.protectionlib.compatibilities; - -import io.th0rgal.protectionlib.ProtectionCompatibility; -import net.crashcraft.crashclaim.CrashClaim; -import net.crashcraft.crashclaim.api.CrashClaimAPI; -import net.crashcraft.crashclaim.permissions.PermissionRoute; -import org.bukkit.Location; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; -import org.bukkit.plugin.java.JavaPlugin; - -public class CrashClaimCompat extends ProtectionCompatibility { - private static CrashClaimAPI crashClaim; - - public CrashClaimCompat(JavaPlugin mainPlugin, Plugin plugin) { - super(mainPlugin, plugin); - crashClaim = new CrashClaimAPI((CrashClaim) plugin); - } - - /** - * @param player Player looking to place a block - * @param target Place where the player seeks to place a block - * @return true if he can put the block - */ - @Override - public boolean canBuild(Player player, Location target) { - return crashClaim.getClaim(target) == null || - crashClaim.getPermissionHelper().getBypassManager().isBypass(player.getUniqueId()) || - crashClaim.getClaim(target).hasPermission(player.getUniqueId(), target, PermissionRoute.BUILD); - } - - /** - * @param player Player looking to break a block - * @param target Place where the player seeks to break a block - * @return true if he can break the block - */ - @Override - public boolean canBreak(Player player, Location target) { - return crashClaim.getClaim(target) == null || - crashClaim.getPermissionHelper().getBypassManager().isBypass(player.getUniqueId()) || - crashClaim.getClaim(target).hasPermission(player.getUniqueId(), target, PermissionRoute.BUILD); - } - - /** - * @param player Player looking to interact with a block - * @param target Place where the player seeks to interact with a block - * @return true if he can interact with the block - */ - @Override - public boolean canInteract(Player player, Location target) { - return crashClaim.getClaim(target) == null || - crashClaim.getPermissionHelper().getBypassManager().isBypass(player.getUniqueId()) || - crashClaim.getClaim(target).hasPermission(player.getUniqueId(), target, PermissionRoute.INTERACTIONS); - } - - /** - * @param player Player looking to use an item - * @param target Place where the player seeks to use an item at a location - * @return true if he can use the item at the location - */ - public boolean canUse(Player player, Location target) { - return crashClaim.getClaim(target) == null || - crashClaim.getPermissionHelper().getBypassManager().isBypass(player.getUniqueId()) || - crashClaim.getClaim(target).hasPermission(player.getUniqueId(), target, PermissionRoute.INTERACTIONS); - } -}