diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributeModifiers.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributeModifiers.java index eab196f57e..3533c154ea 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributeModifiers.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributeModifiers.java @@ -231,6 +231,7 @@ public void adjust(Mechanism mechanism) { // Valid slots: HAND, OFF_HAND, FEET, LEGS, CHEST, HEAD, ANY // Valid attribute names are listed at <@link url https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html> // The default ID will be randomly generated, the default name will be the attribute name, the default slot is any. + // Example of valid input: [generic_max_health=]>] // @tags // // diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java index def4a384d5..2e90e29463 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemAttributeModifiers.java @@ -127,6 +127,7 @@ public void adjust(Mechanism mechanism) { // Valid slots: HAND, OFF_HAND, FEET, LEGS, CHEST, HEAD, ANY // Valid attribute names are listed at <@link url https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html> // The default ID will be randomly generated, the default name will be the attribute name, the default slot is any. + // Example of valid input: [generic_max_health=]>] // @tags // // --> diff --git a/plugin/src/main/java/com/denizenscript/denizen/utilities/debugging/Debug.java b/plugin/src/main/java/com/denizenscript/denizen/utilities/debugging/Debug.java index 70ccacaafe..125025e129 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/utilities/debugging/Debug.java +++ b/plugin/src/main/java/com/denizenscript/denizen/utilities/debugging/Debug.java @@ -164,16 +164,16 @@ public static void echoApproval(String message) { } public static void echoError(String message) { - echoError(null, message); + echoError(null, null, message, true); } public static void echoError(ScriptQueue sourceQueue, String message) { - echoError(sourceQueue, message, true); + echoError(sourceQueue, null, message, true); } public static boolean errorDuplicatePrevention = false; - public static void echoError(ScriptQueue sourceQueue, String message, boolean reformat) { + public static void echoError(ScriptQueue sourceQueue, String addedContext, String message, boolean reformat) { message = cleanTextForDebugOutput(message); if (errorDuplicatePrevention) { if (!com.denizenscript.denizencore.utilities.debugging.Debug.verbose) { @@ -225,12 +225,15 @@ else if (sourceQueue != null && sourceQueue.getEntries().size() > 0) { } BukkitScriptEntryData data = Utilities.getEntryData(sourceEntry); if (data.hasPlayer()) { - fullMessage.append(" with player '").append(ChatColor.AQUA).append(data.getPlayer().debuggable()).append(ChatColor.RED).append("'"); + fullMessage.append(" with player '").append(ChatColor.AQUA).append(data.getPlayer().getName()).append(ChatColor.RED).append("'"); } if (data.hasNPC()) { fullMessage.append(" with NPC '").append(ChatColor.AQUA).append(data.getNPC().debuggable()).append(ChatColor.RED).append("'"); } } + if (addedContext != null) { + fullMessage.append("\n ").append(addedContext); + } fullMessage.append("!\n").append(ChatColor.GRAY).append(" Error Message: ").append(ChatColor.WHITE).append(message); if (sourceScript != null && !sourceScript.getContainer().shouldDebug()) { fullMessage.append(ChatColor.GRAY).append(" ... ").append(ChatColor.RED).append("Enable debug on the script for more information."); @@ -284,7 +287,7 @@ public static void echoError(ScriptQueue source, Throwable ex) { } else { depthCorrectError++; - echoError(source, errorMessage, false); + echoError(source, null, errorMessage, false); depthCorrectError--; } throwErrorEvent = wasThrown; @@ -473,6 +476,7 @@ public static String cleanTextForDebugOutput(String message) { .replace("", ChatColor.GREEN.toString()) .replace("", ChatColor.AQUA.toString()) .replace("", ChatColor.DARK_RED.toString()) + .replace("", ChatColor.RED.toString()) .replace("", ChatColor.WHITE.toString()); } diff --git a/plugin/src/main/java/com/denizenscript/denizen/utilities/implementation/DenizenCoreImplementation.java b/plugin/src/main/java/com/denizenscript/denizen/utilities/implementation/DenizenCoreImplementation.java index 16389252ad..c97444bcf5 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/utilities/implementation/DenizenCoreImplementation.java +++ b/plugin/src/main/java/com/denizenscript/denizen/utilities/implementation/DenizenCoreImplementation.java @@ -76,13 +76,13 @@ public void debugException(Throwable ex) { } @Override - public void debugError(String error) { - Debug.echoError(error); + public void debugError(String addedContext, String error) { + Debug.echoError(null, addedContext, error, true); } @Override - public void debugError(ScriptQueue scriptQueue, String s) { - Debug.echoError(scriptQueue, s); + public void debugError(ScriptQueue scriptQueue, String addedContext, String s) { + Debug.echoError(scriptQueue, addedContext, s, true); } @Override