i give up

This commit is contained in:
Telesphoreo 2020-08-18 01:20:40 -05:00
parent e525aa4d0a
commit 4a0523a329
2 changed files with 34 additions and 1 deletions

View file

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

View file

@ -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)