From ba4a1a993ca63d79af9ad868c8f93886d79c846b Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Tue, 25 Jan 2022 02:13:28 -0800 Subject: [PATCH] Clickable cancel also meta improvements --- .../properties/entity/EntityInWaterTime.java | 4 +- .../scripts/commands/entity/ShootCommand.java | 6 +- .../commands/player/ClickableCommand.java | 75 +++++++++++-------- 3 files changed, 50 insertions(+), 35 deletions(-) diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityInWaterTime.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityInWaterTime.java index 3bf9a28699..0e1c8d4ae7 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityInWaterTime.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityInWaterTime.java @@ -54,7 +54,7 @@ public static void registerTags() { // @description // If the entity is a zombie mob, returns the duration of time the zombie has been in water for. // If this value exceeds 600 ticks, the zombie will begin converted to a Drowned mob. - // See also <@link tag EntityTag.drowned_conversion_duration> + // See also <@link tag EntityTag.conversion_duration> // --> PropertyParser.registerTag(DurationTag.class, "in_water_duration", (attribute, object) -> { return new DurationTag((long) NMSHandler.getEntityHelper().getInWaterTime((Zombie) object.entity.getBukkitEntity())); @@ -71,7 +71,7 @@ public void adjust(Mechanism mechanism) { // @description // If the entity is a zombie mob, sets the duration of time the zombie has been in water for. // If this value exceeds 600 ticks, the zombie will begin converted to a Drowned mob. - // See also <@link mechanism EntityTag.drowned_conversion_duration> + // See also <@link mechanism EntityTag.conversion_duration> // @tags // // --> diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/ShootCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/ShootCommand.java index b335dd81a7..794a46b1ab 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/ShootCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/ShootCommand.java @@ -79,6 +79,8 @@ public ShootCommand() { // Normally, a list of entities will spawn mounted on top of each other. To have them instead fire separately and spread out, // specify the "spread" argument with a decimal number indicating how wide to spread the entities. // + // Optionally, add "no_rotate" to prevent the shoot command from rotating launched entities. + // // Use the "script:" argument to run a task script when the projectiles land. // When that script runs, the following definitions will be available: // <[shot_entities]> for all shot entities (as in, the projectiles), @@ -86,10 +88,10 @@ public ShootCommand() { // <[location]> for the last known location of the last shot entity, and // <[hit_entities]> for a list of any entities that were hit by fired projectiles. // - // Optionally, add "no_rotate" to prevent the shoot command from rotating launched entities. - // // The shoot command is ~waitable. Refer to <@link language ~waitable>. // + // Note that for ~waiting or the "script" arg, tracking is only accurate for projectile entities (such as arrows). This will be inaccurately estimated for other entity types. + // // @Tags // returns the single entity that was shot (as in, the projectile) (if you only shot one). // returns a ListTag of entities that were shot (as in, the projectiles). diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ClickableCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ClickableCommand.java index c2600a5cc4..350c85880a 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ClickableCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/ClickableCommand.java @@ -6,6 +6,7 @@ import com.denizenscript.denizen.utilities.debugging.Debug; import com.denizenscript.denizen.utilities.implementation.BukkitScriptEntryData; import com.denizenscript.denizencore.exceptions.InvalidArgumentsException; +import com.denizenscript.denizencore.exceptions.InvalidArgumentsRuntimeException; import com.denizenscript.denizencore.objects.Argument; import com.denizenscript.denizencore.objects.ObjectTag; import com.denizenscript.denizencore.objects.core.*; @@ -25,15 +26,16 @@ public class ClickableCommand extends AbstractCommand { public ClickableCommand() { setName("clickable"); - setSyntax("clickable [