TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/bridge/TFGuildsBridge.java

53 lines
1.2 KiB
Java
Raw Normal View History

2020-07-21 19:21:51 +00:00
package me.totalfreedom.totalfreedommod.bridge;
import me.totalfreedom.tfguilds.Common;
import me.totalfreedom.tfguilds.TFGuilds;
import me.totalfreedom.totalfreedommod.FreedomService;
import me.totalfreedom.totalfreedommod.util.FLog;
import org.bukkit.entity.Player;
import org.bukkit.plugin.Plugin;
public class TFGuildsBridge extends FreedomService
{
private TFGuilds tfGuildsPlugin = null;
@Override
public void onStart()
{
}
@Override
public void onStop()
{
}
public TFGuilds getTfGuildsPlugin()
{
if (tfGuildsPlugin == null)
{
try
{
final Plugin tfGuilds = server.getPluginManager().getPlugin("TFGuilds");
if (tfGuilds != null)
{
if (tfGuilds instanceof TFGuilds)
{
tfGuildsPlugin = (TFGuilds)tfGuilds;
}
}
}
catch (Exception ex)
{
FLog.severe(ex);
}
}
return tfGuildsPlugin;
}
public boolean inGuildChat(Player player)
{
return Common.IN_GUILD_CHAT.contains(player);
}
}