mirror of
https://github.com/plexusorg/Plex.git
synced 2025-06-29 14:56:43 +00:00
- Start the indefinite ban system, currently working with manually adding to the configuration.
- /plex reload reloads the indefinite bans - Fixed bug where AdminChat showed up with symbols still and not colorized in adminchat
This commit is contained in:
@ -8,18 +8,39 @@ public class PlexLog extends PlexBase
|
||||
{
|
||||
private static final boolean debugEnabled = plugin.config.getBoolean("debug");
|
||||
|
||||
public static void log(String message)
|
||||
public static void log(String message, Object... strings)
|
||||
{
|
||||
for (int i = 0; i < strings.length; i++)
|
||||
{
|
||||
if (message.contains("{" + i + "}"))
|
||||
{
|
||||
message = message.replace("{" + i + "}", strings[i].toString());
|
||||
}
|
||||
}
|
||||
Bukkit.getConsoleSender().sendMessage(String.format(ChatColor.YELLOW + "[Plex] " + ChatColor.GRAY + "%s", message));
|
||||
}
|
||||
|
||||
public static void error(String message)
|
||||
public static void error(String message, Object... strings)
|
||||
{
|
||||
for (int i = 0; i < strings.length; i++)
|
||||
{
|
||||
if (message.contains("{" + i + "}"))
|
||||
{
|
||||
message = message.replace("{" + i + "}", strings[i].toString());
|
||||
}
|
||||
}
|
||||
Bukkit.getConsoleSender().sendMessage(String.format(ChatColor.RED + "[Plex Error] " + ChatColor.GOLD + "%s", message));
|
||||
}
|
||||
|
||||
public static void debug(String message)
|
||||
public static void debug(String message, Object... strings)
|
||||
{
|
||||
for (int i = 0; i < strings.length; i++)
|
||||
{
|
||||
if (message.contains("{" + i + "}"))
|
||||
{
|
||||
message = message.replace("{" + i + "}", strings[i].toString());
|
||||
}
|
||||
}
|
||||
if (debugEnabled)
|
||||
{
|
||||
Bukkit.getConsoleSender().sendMessage(String.format(ChatColor.DARK_PURPLE + "[Plex Debug] " + ChatColor.GOLD + "%s", message));
|
||||
|
@ -158,7 +158,7 @@ public class PlexUtils extends PlexBase
|
||||
|
||||
public static Component messageComponent(String entry, Object... objects)
|
||||
{
|
||||
return MiniMessage.miniMessage().parse(messageString(entry, objects));
|
||||
return MiniMessage.miniMessage().parse(LegacyComponentSerializer.legacySection().serialize(LegacyComponentSerializer.legacyAmpersand().deserialize(messageString(entry, objects))));
|
||||
}
|
||||
|
||||
public static String messageString(String entry, Object... objects)
|
||||
|
Reference in New Issue
Block a user