mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-12-27 01:34:13 +00:00
Make the plugin work again
This commit is contained in:
parent
492250caca
commit
a0eb111adc
2 changed files with 6 additions and 24 deletions
|
@ -71,9 +71,9 @@
|
|||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>me.totalfreedom</groupId>
|
||||
<artifactId>TotalFreedomMod</artifactId>
|
||||
<version>7.1.0</version>
|
||||
<groupId>me.telesphoreo</groupId>
|
||||
<artifactId>DummyTFM</artifactId>
|
||||
<version>1.1.a</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
|
|
@ -1,31 +1,13 @@
|
|||
package net.goldtreeservers.worldguardextraflags.wg;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import me.totalfreedom.totalfreedommod.admin.AdminList;
|
||||
|
||||
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 = (TotalFreedomMod)plugin;
|
||||
return totalFreedomMod;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
private static final AdminList al = new AdminList();
|
||||
|
||||
public static boolean isAdmin(String name)
|
||||
{
|
||||
return getTFM().adminList.getEntryByName(name) != null;
|
||||
return al.getEntryByName(name) != null;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue