diff --git a/commons/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java b/commons/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java index f9071f98..136c6c46 100644 --- a/commons/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java +++ b/commons/src/main/java/me/totalfreedom/totalfreedommod/TotalFreedomMod.java @@ -105,7 +105,6 @@ public class TotalFreedomMod extends JavaPlugin public LibsDisguisesBridge ldb; public CoreProtectBridge cpb; public WorldEditBridge web; - public WorldGuardBridge wgb; public LuckPermsBridge lpb; public static TotalFreedomMod getPlugin() @@ -327,7 +326,6 @@ public class TotalFreedomMod extends JavaPlugin esb = new EssentialsBridge(); ldb = new LibsDisguisesBridge(); web = new WorldEditBridge(); - wgb = new WorldGuardBridge(); lpb = new LuckPermsBridge(); } diff --git a/commons/src/main/java/me/totalfreedom/totalfreedommod/bridge/WorldGuardBridge.java b/commons/src/main/java/me/totalfreedom/totalfreedommod/bridge/WorldGuardBridge.java deleted file mode 100644 index e7632719..00000000 --- a/commons/src/main/java/me/totalfreedom/totalfreedommod/bridge/WorldGuardBridge.java +++ /dev/null @@ -1,48 +0,0 @@ -package me.totalfreedom.totalfreedommod.bridge; - -import com.sk89q.worldguard.LocalPlayer; -import com.sk89q.worldguard.WorldGuard; -import com.sk89q.worldguard.bukkit.WorldGuardPlugin; -import com.sk89q.worldguard.protection.regions.RegionContainer; - -import com.sk89q.worldguard.protection.regions.RegionQuery; -import me.totalfreedom.totalfreedommod.FreedomService; -import org.bukkit.entity.Player; -import org.bukkit.plugin.Plugin; - -public class WorldGuardBridge extends FreedomService -{ - @Override - public void onStart() - { - } - - @Override - public void onStop() - { - } - - public boolean canEditCurrentWorld(Player player) - { - // If WorldGuard integration is enabled, do a check with it. - if (isEnabled()) - { - LocalPlayer localPlayer = WorldGuardPlugin.inst().wrapPlayer(player); - - RegionContainer container = WorldGuard.getInstance().getPlatform().getRegionContainer(); - RegionQuery query = container.createQuery(); - - return query.testBuild(localPlayer.getLocation(), localPlayer); - } - - // If the plugin isn't present, return true. - return true; - } - - public boolean isEnabled() - { - Plugin plugin = server.getPluginManager().getPlugin("WorldGuard"); - - return plugin != null && plugin.isEnabled(); - } -} \ No newline at end of file