fix guildchat being sent to discord

This commit is contained in:
speedxx
2020-07-21 15:21:51 -04:00
parent 8c93da758a
commit 2bf78bcccf
5 changed files with 66 additions and 6 deletions

View File

@ -0,0 +1,52 @@
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);
}
}