mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
Removes the WorldGuardBridge
It was unused after Paul rewrote the rainbow trail.
This commit is contained in:
parent
51c807d318
commit
cb818c0056
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user