From 8e07b2aed63c0216eba09a5748168c8b0818a8cb Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Sat, 5 Mar 2022 14:16:33 -0800 Subject: [PATCH] attach sync_server for:nobody should work --- .../objects/properties/bukkit/BukkitElementProperties.java | 1 + .../denizen/scripts/commands/entity/AttachCommand.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementProperties.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementProperties.java index 80306a9ac7..ef70caacab 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementProperties.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/bukkit/BukkitElementProperties.java @@ -373,6 +373,7 @@ public static void registerTags() { // @description // Returns the element with all color codes parsed. // Optionally, specify a character to prefix the color ids. Defaults to '&' if not specified. + // This allows old-style colors like '&b', or Essentials-style hex codes like '&#ff00ff' // --> PropertyParser.registerStaticTag(ElementTag.class, "parse_color", (attribute, object) -> { char prefix = '&'; diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AttachCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AttachCommand.java index 65d74a2d36..31573c59a0 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AttachCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/AttachCommand.java @@ -184,7 +184,7 @@ public void execute(final ScriptEntry scriptEntry) { Debug.echoError("Cannot attach entity '" + entity + "': entity is not spawned."); continue; } - if (forPlayers == null) { + if (forPlayers == null || (forPlayers.isEmpty() && sync_server.asBoolean())) { procPlayer.accept(entity, null); } else {