mirror of
https://github.com/TotalFreedomMC/TF-WorldGuardExtraFlagsPlugin.git
synced 2024-12-27 17:44:47 +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>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>me.totalfreedom</groupId>
|
<groupId>me.telesphoreo</groupId>
|
||||||
<artifactId>TotalFreedomMod</artifactId>
|
<artifactId>DummyTFM</artifactId>
|
||||||
<version>7.1.0</version>
|
<version>1.1.a</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
|
@ -1,31 +1,13 @@
|
||||||
package net.goldtreeservers.worldguardextraflags.wg;
|
package net.goldtreeservers.worldguardextraflags.wg;
|
||||||
|
|
||||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
import me.totalfreedom.totalfreedommod.admin.AdminList;
|
||||||
import org.bukkit.Bukkit;
|
|
||||||
import org.bukkit.plugin.Plugin;
|
|
||||||
|
|
||||||
public class TFMHandler
|
public class TFMHandler
|
||||||
{
|
{
|
||||||
private static TotalFreedomMod totalFreedomMod = null;
|
private static final AdminList al = new AdminList();
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean isAdmin(String name)
|
public static boolean isAdmin(String name)
|
||||||
{
|
{
|
||||||
return getTFM().adminList.getEntryByName(name) != null;
|
return al.getEntryByName(name) != null;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue