mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-29 13:25:30 +00:00
WHY were these files left
This commit is contained in:
parent
8204224300
commit
c996033dce
File diff suppressed because it is too large
Load diff
|
@ -1,87 +0,0 @@
|
|||
package com.earth2me.essentials;
|
||||
|
||||
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
||||
import me.totalfreedom.totalfreedommod.admin.AdminList;
|
||||
import me.totalfreedom.totalfreedommod.util.FLog;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class TFMHandler
|
||||
{
|
||||
private Essentials plugin;
|
||||
private TotalFreedomMod tfmPlugin;
|
||||
|
||||
public TFMHandler()
|
||||
{
|
||||
this.plugin = Essentials.getPlugin(Essentials.class);
|
||||
this.tfmPlugin = null;
|
||||
}
|
||||
|
||||
public TotalFreedomMod getTFM()
|
||||
{
|
||||
if (tfmPlugin == null)
|
||||
{
|
||||
try
|
||||
{
|
||||
final Plugin tfm = plugin.getServer().getPluginManager().getPlugin("TotalFreedomMod");
|
||||
if (tfm != null && tfm instanceof TotalFreedomMod)
|
||||
{
|
||||
tfmPlugin = (TotalFreedomMod)tfm;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
return tfmPlugin;
|
||||
}
|
||||
|
||||
public boolean isAdmin(User user)
|
||||
{
|
||||
return getTFM().al.isAdmin(user.getBase());
|
||||
}
|
||||
|
||||
public boolean isAdmin(CommandSender sender)
|
||||
{
|
||||
return getTFM().al.isAdmin(sender);
|
||||
}
|
||||
|
||||
public boolean isAdmin(Player player)
|
||||
{
|
||||
return getTFM().al.isAdmin(player);
|
||||
}
|
||||
|
||||
public boolean isVanished(User user)
|
||||
{
|
||||
return isVanished(user.getBase());
|
||||
}
|
||||
|
||||
public boolean isVanished(Player player)
|
||||
{
|
||||
if (tfmPlugin != null)
|
||||
{
|
||||
getTFM();
|
||||
}
|
||||
return AdminList.vanished.contains(player.getName());
|
||||
}
|
||||
|
||||
public void warning(String warning)
|
||||
{
|
||||
if (tfmPlugin != null)
|
||||
{
|
||||
getTFM();
|
||||
}
|
||||
FLog.warning(warning);
|
||||
}
|
||||
|
||||
public void info(String info)
|
||||
{
|
||||
if (tfmPlugin != null)
|
||||
{
|
||||
getTFM();
|
||||
}
|
||||
FLog.info(info);
|
||||
}
|
||||
}
|
|
@ -31,4 +31,4 @@ public class Commandenderchest extends EssentialsCommand {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -201,4 +201,4 @@ public class Commandmail extends EssentialsCommand {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,4 +129,4 @@ public class Commandnick extends EssentialsLoopCommand {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -165,4 +165,4 @@ public class Commandtp extends EssentialsCommand {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,4 +67,4 @@ public class Commandtpahere extends EssentialsCommand {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,4 +98,4 @@ public abstract class EssentialsToggleCommand extends EssentialsCommand {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue