Files
TotalFreedomMod/src/main/java/me/totalfreedom/totalfreedommod/util/FSync.java
Video 2698cbf46d Too much shit to list in the commit name
- Removes ancient unused code
- General code cleanup in some places
- Rewrites a few components to use Adventure (testing needed)
- Rewrites a few commands to use more modern Java features like Streams
- Fixes oversight where vanishing still worked by names and not UUIDs
- Removes unused Pterodactyl integration
- Removes AutoEject's IP range banning functionality
- Does some minor cleanup to HTTPD's list & players modules
- Fixes ages-old bug in the AntiSpam that caused it to falsely mute players
2022-11-17 01:34:45 -07:00

86 lines
2.0 KiB
Java

package me.totalfreedom.totalfreedommod.util;
import me.totalfreedom.totalfreedommod.TotalFreedomMod;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable;
public class FSync
{
public static void playerMsg(final Player player, final String message)
{
final TotalFreedomMod plugin = TotalFreedomMod.getPlugin();
new BukkitRunnable()
{
@Override
public void run()
{
FUtil.playerMsg(player, message);
}
}.runTask(plugin);
}
public static void playerMsg(final CommandSender sender, final String message)
{
final TotalFreedomMod plugin = TotalFreedomMod.getPlugin();
new BukkitRunnable()
{
@Override
public void run()
{
sender.sendMessage(message);
}
}.runTask(plugin);
}
public static void playerKick(final Player player, final String reason)
{
final TotalFreedomMod plugin = TotalFreedomMod.getPlugin();
new BukkitRunnable()
{
@Override
public void run()
{
player.kickPlayer(reason);
}
}.runTask(plugin);
}
public static void adminChatMessage(final CommandSender sender, final String message)
{
final TotalFreedomMod plugin = TotalFreedomMod.getPlugin();
new BukkitRunnable()
{
@Override
public void run()
{
plugin.cm.adminChat(sender, message);
}
}.runTask(plugin);
}
public static void bcastMsg(final String message, final ChatColor color)
{
final TotalFreedomMod plugin = TotalFreedomMod.getPlugin();
new BukkitRunnable()
{
@Override
public void run()
{
FUtil.bcastMsg(message, color);
}
}.runTask(plugin);
}
}