mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-12-27 01:34:13 +00:00
i give up
This commit is contained in:
parent
e525aa4d0a
commit
4a0523a329
2 changed files with 34 additions and 1 deletions
|
@ -0,0 +1,33 @@
|
|||
package net.goldtreeservers.worldguardextraflags.wg;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class TFMHandler
|
||||
{
|
||||
private static TotalFreedomMod totalFreedomMod = null;
|
||||
|
||||
public static TotalFreedomMod getTFM()
|
||||
{
|
||||
if (totalFreedomMod != null)
|
||||
{
|
||||
return totalFreedomMod;
|
||||
}
|
||||
Plugin plugin = Bukkit.getPluginManager().getPlugin("TotalFreedomMod");
|
||||
if (plugin != null && plugin.isEnabled())
|
||||
{
|
||||
TotalFreedomMod tfm = (TotalFreedomMod)plugin;
|
||||
totalFreedomMod = tfm;
|
||||
return totalFreedomMod;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean isStaff(CommandSender sender)
|
||||
{
|
||||
return getTFM().sl.isStaff(sender);
|
||||
}
|
||||
}
|
|
@ -45,7 +45,7 @@ public class WorldGuardUtils
|
|||
}
|
||||
|
||||
// Fuck your shitty permission system - packs
|
||||
return TotalFreedomMod.plugin().sl.isStaff(player);
|
||||
return TFMHandler.isStaff(player);
|
||||
}
|
||||
|
||||
public static State queryState(Player player, World world, Set<ProtectedRegion> regions, StateFlag flag)
|
||||
|
|
Loading…
Reference in a new issue