Removes the WorldGuardBridge

It was unused after Paul rewrote the rainbow trail.
This commit is contained in:
Video 2023-04-05 13:59:01 -06:00
parent 51c807d318
commit cb818c0056
2 changed files with 0 additions and 50 deletions

View File

@ -105,7 +105,6 @@ public class TotalFreedomMod extends JavaPlugin
public LibsDisguisesBridge ldb; public LibsDisguisesBridge ldb;
public CoreProtectBridge cpb; public CoreProtectBridge cpb;
public WorldEditBridge web; public WorldEditBridge web;
public WorldGuardBridge wgb;
public LuckPermsBridge lpb; public LuckPermsBridge lpb;
public static TotalFreedomMod getPlugin() public static TotalFreedomMod getPlugin()
@ -327,7 +326,6 @@ public class TotalFreedomMod extends JavaPlugin
esb = new EssentialsBridge(); esb = new EssentialsBridge();
ldb = new LibsDisguisesBridge(); ldb = new LibsDisguisesBridge();
web = new WorldEditBridge(); web = new WorldEditBridge();
wgb = new WorldGuardBridge();
lpb = new LuckPermsBridge(); lpb = new LuckPermsBridge();
} }

View File

@ -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();
}
}