From 1053646a450b8017f8be9a046d516cba26e99131 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 12 Feb 2016 23:34:12 +0100 Subject: [PATCH] Stack Trace Debug Method --- .../massivecraft/massivecore/util/MUtil.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/com/massivecraft/massivecore/util/MUtil.java b/src/com/massivecraft/massivecore/util/MUtil.java index 18b225c8..10f417af 100644 --- a/src/com/massivecraft/massivecore/util/MUtil.java +++ b/src/com/massivecraft/massivecore/util/MUtil.java @@ -65,6 +65,7 @@ import com.massivecraft.massivecore.comparator.ComparatorCaseInsensitive; import com.massivecraft.massivecore.engine.EngineMassiveCoreDatabase; import com.massivecraft.massivecore.engine.EngineMassiveCoreMain; import com.massivecraft.massivecore.engine.EngineMassiveCoreWorldNameSet; +import com.massivecraft.massivecore.mixin.Mixin; import com.massivecraft.massivecore.nms.NmsEntity; import com.massivecraft.massivecore.predicate.Predicate; import com.massivecraft.massivecore.util.extractor.Extractor; @@ -523,6 +524,23 @@ public class MUtil return ret.toString(); } + // -------------------------------------------- // + // STACK TRACE: DEBUG + // -------------------------------------------- // + + public static void stackTraceDebug(String title) + { + // Create + List messages = new MassiveList<>(); + + // Fill + messages.add(Txt.titleize(title)); + messages.addAll(MUtil.getStackTraceStrings(1, true)); + + // Message + Mixin.messageOne(IdUtil.CONSOLE_ID, messages); + } + // -------------------------------------------- // // LIST OPERATIONS // -------------------------------------------- //