mirror of
https://github.com/plexusorg/Module-HTTPD.git
synced 2026-06-04 00:56:54 +00:00
Organize a few things
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
package dev.plex.logging;
|
||||
|
||||
import dev.plex.HTTPDModule;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
|
||||
|
||||
public class Log
|
||||
{
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
if (HTTPDModule.moduleConfig.getBoolean("server.logging"))
|
||||
{
|
||||
Bukkit.getConsoleSender().sendMessage(String.format(ChatColor.DARK_AQUA + "[Plex HTTPD] " + ChatColor.GRAY + "%s", message));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user