mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-18 13:26:12 +00:00
53 lines
1.2 KiB
Java
53 lines
1.2 KiB
Java
|
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);
|
||
|
}
|
||
|
}
|