Cleaned up and updated forge version.

This commit is contained in:
Alexander committed 2015-09-05 22:01:35 -04:00
1 parent 6a363b3981
commit 812ef0bf2d
107 files changed
+15 -31

No files matched your search

@@ -0,0 +1,54 @@
package mantle.debug;
import static mantle.lib.CoreConfig.debug_enableChat;
import static mantle.lib.CoreConfig.debug_enableConsole;
import static mantle.lib.CoreRepo.logger;
import mantle.player.PlayerUtils;
import net.minecraft.entity.player.EntityPlayer;
/**
* IDebuggable helper
*
* @author Sunstrike <[email protected]>
*/
public class DebugHelper
{
private DebugHelper()
{
// No instantiation
}
public static void handleDebugData(DebugData data)
{
if (debug_enableChat)
{
handleChatDebug(data);
}
if (debug_enableConsole)
{
handleConsoleDebug(data);
}
}
private static void handleChatDebug(DebugData data)
{
EntityPlayer player = data.player;
String prefix = "[" + data.cl.getSimpleName() + "] ";
for (String str : data.strings)
{
PlayerUtils.sendChatMessage(player, prefix + str);
}
}
private static void handleConsoleDebug(DebugData data)
{
String player = data.player.getGameProfile().getName();
String prefix = "[" + player + ":" + data.cl.getSimpleName() + "] ";
for (String str : data.strings)
{
logger.info(prefix + str);
}
}
}