2015-10-19 17:43:46 +00:00
|
|
|
package me.totalfreedom.totalfreedommod.util;
|
2015-04-26 22:31:54 +00:00
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
|
2015-04-26 22:31:54 +00:00
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
|
|
import org.bukkit.entity.Player;
|
|
|
|
import org.bukkit.scheduler.BukkitRunnable;
|
|
|
|
|
2015-10-19 17:43:46 +00:00
|
|
|
public class FSync
|
2015-04-26 22:31:54 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
public static void playerMsg(final Player player, final String message)
|
|
|
|
{
|
|
|
|
new BukkitRunnable()
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run()
|
|
|
|
{
|
2015-10-19 17:43:46 +00:00
|
|
|
FUtil.playerMsg(player, message);
|
2015-04-26 22:31:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}.runTask(TotalFreedomMod.plugin);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void playerKick(final Player player, final String reason)
|
|
|
|
{
|
|
|
|
new BukkitRunnable()
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run()
|
|
|
|
{
|
|
|
|
player.kickPlayer(reason);
|
|
|
|
}
|
|
|
|
|
|
|
|
}.runTask(TotalFreedomMod.plugin);
|
|
|
|
}
|
|
|
|
|
2016-03-07 20:32:05 +00:00
|
|
|
public static void adminChatMessage(final CommandSender sender, final String message)
|
2015-04-26 22:31:54 +00:00
|
|
|
{
|
|
|
|
new BukkitRunnable()
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run()
|
|
|
|
{
|
2016-03-07 20:32:05 +00:00
|
|
|
FUtil.adminChatMessage(sender, message);
|
2015-04-26 22:31:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}.runTask(TotalFreedomMod.plugin);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void autoEject(final Player player, final String kickMessage)
|
|
|
|
{
|
|
|
|
new BukkitRunnable()
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run()
|
|
|
|
{
|
2015-10-19 17:43:46 +00:00
|
|
|
FUtil.autoEject(player, kickMessage);
|
2015-04-26 22:31:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}.runTask(TotalFreedomMod.plugin);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void bcastMsg(final String message, final ChatColor color)
|
|
|
|
{
|
|
|
|
new BukkitRunnable()
|
|
|
|
{
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run()
|
|
|
|
{
|
2015-10-19 17:43:46 +00:00
|
|
|
FUtil.bcastMsg(message, color);
|
2015-04-26 22:31:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}.runTask(TotalFreedomMod.plugin);
|
|
|
|
}
|
|
|
|
}
|