2020-07-13 00:40:11 +00:00
|
|
|
package me.totalfreedom.tfguilds;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
2020-08-07 19:35:26 +00:00
|
|
|
import me.totalfreedom.tfguilds.config.ConfigEntry;
|
|
|
|
import me.totalfreedom.tfguilds.guild.Guild;
|
2020-08-13 20:55:00 +00:00
|
|
|
import org.bukkit.Bukkit;
|
2020-08-07 19:35:26 +00:00
|
|
|
import org.bukkit.ChatColor;
|
|
|
|
import org.bukkit.entity.Player;
|
2020-07-13 00:40:11 +00:00
|
|
|
|
|
|
|
public class Common
|
|
|
|
{
|
|
|
|
protected static TFGuilds plugin = TFGuilds.getPlugin();
|
|
|
|
|
|
|
|
public static final ChatColor PRIMARY = ConfigEntry.SCHEME_PRIMARY.getChatColor();
|
|
|
|
public static final ChatColor SECONDARY = ConfigEntry.SCHEME_SECONDARY.getChatColor();
|
|
|
|
public static final String NO_PERMS = ChatColor.RED + "No permission.";
|
|
|
|
public static final String PREFIX = "%s%[%p%TFGuilds%s%] %p%";
|
|
|
|
public static final String PNF = ChatColor.RED + "Player not found.";
|
2020-12-20 00:41:20 +00:00
|
|
|
public static final String NG = ChatColor.RED + "You aren't in a guild!";
|
2020-07-13 00:40:11 +00:00
|
|
|
|
|
|
|
public static Map<Player, Guild> INVITES = new HashMap<>();
|
|
|
|
public static List<Player> IN_GUILD_CHAT = new ArrayList<>();
|
2020-07-29 21:03:05 +00:00
|
|
|
public static List<Player> CHAT_SPY = new ArrayList<>();
|
2020-07-13 00:40:11 +00:00
|
|
|
|
|
|
|
public static String tl(String in)
|
|
|
|
{
|
|
|
|
return in.replaceAll("%p%", PRIMARY + "").replaceAll("%s%", SECONDARY + "");
|
|
|
|
}
|
2020-08-13 20:55:00 +00:00
|
|
|
|
|
|
|
public static void broadcast(String msg)
|
|
|
|
{
|
|
|
|
Bukkit.broadcastMessage(msg);
|
|
|
|
}
|
2020-07-13 00:40:11 +00:00
|
|
|
}
|