From f01921cf2c260114b6de7a4746c1d33be02b1950 Mon Sep 17 00:00:00 2001 From: Alex 'mcmonkey' Goodwin Date: Sat, 30 Nov 2019 10:31:19 -0800 Subject: [PATCH] huge pile of meta fixes --- .../denizen/npc/traits/HealthTrait.java | 10 +++---- .../denizen/objects/EntityTag.java | 10 +++---- .../denizen/objects/InventoryTag.java | 8 +++--- .../denizen/objects/ItemTag.java | 28 +++++++++---------- .../denizen/objects/MaterialTag.java | 4 +-- .../denizenscript/denizen/objects/NPCTag.java | 10 +++---- .../denizen/objects/WorldTag.java | 6 ++-- .../objects/properties/entity/EntityAge.java | 4 +-- .../properties/entity/EntityAttributes.java | 10 +++---- .../properties/entity/EntityColor.java | 2 +- .../properties/entity/EntityFramed.java | 1 - .../properties/entity/EntityHealth.java | 14 +++++----- .../objects/properties/entity/EntityTame.java | 4 +-- .../objects/properties/item/ItemBook.java | 17 ++++------- .../objects/properties/item/ItemColor.java | 1 - .../objects/properties/item/ItemPotion.java | 2 +- .../objects/properties/trade/TradeInputs.java | 4 +-- .../commands/entity/RemoveCommand.java | 8 ++++-- .../scripts/commands/item/TakeCommand.java | 21 ++++++++++++-- .../containers/core/MapScriptContainer.java | 4 ++- .../denizen/tags/core/ServerTagBase.java | 4 +-- 21 files changed, 93 insertions(+), 79 deletions(-) diff --git a/plugin/src/main/java/com/denizenscript/denizen/npc/traits/HealthTrait.java b/plugin/src/main/java/com/denizenscript/denizen/npc/traits/HealthTrait.java index f5b3504ea1..07642abd97 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/npc/traits/HealthTrait.java +++ b/plugin/src/main/java/com/denizenscript/denizen/npc/traits/HealthTrait.java @@ -45,14 +45,14 @@ public class HealthTrait extends Trait implements Listener { // // Related Tags // <@link tag NPCTag.health> - // <@link tag NPCTag.health.formatted> - // <@link tag NPCTag.health.max> - // <@link tag NPCTag.health.percentage> + // <@link tag NPCTag.formatted_health> + // <@link tag NPCTag.health_max> + // <@link tag NPCTag.health_percentage> // <@link tag NPCTag.has_trait[health]> // // Related Mechanisms - // <@link mechanism health> - // <@link mechanism max_health> + // <@link mechanism NPCTag.health> + // <@link mechanism NPCTag.max_health> // // Related Commands // <@link command heal> diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java b/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java index 7c01dea1c5..0c5c39f470 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/EntityTag.java @@ -2149,7 +2149,7 @@ else if (mtr.angle == BlockFace.EAST) { // <--[tag] // @attribute // @returns ElementTag(Boolean) - // @mechanism collidable + // @mechanism EntityTag.collidable // @group attributes // @description // Returns whether the entity is collidable. @@ -2814,7 +2814,7 @@ public void adjust(Mechanism mechanism) { // Sets the entity holding this entity by leash. // The entity must be living. // @tags - // + // // // --> if (mechanism.matches("leash_holder") && mechanism.requireObject(EntityTag.class)) { @@ -2857,7 +2857,7 @@ public void adjust(Mechanism mechanism) { // Sets the passengers of this entity. // @tags // - // + // // --> if (mechanism.matches("passengers")) { entity.eject(); @@ -2882,7 +2882,7 @@ public void adjust(Mechanism mechanism) { // Sets the passenger of this entity. // @tags // - // + // // --> if (mechanism.matches("passenger") && mechanism.requireObject(EntityTag.class)) { EntityTag ent = mechanism.valueAsType(EntityTag.class); @@ -2917,7 +2917,7 @@ public void adjust(Mechanism mechanism) { // The entity must be living. // @tags // - // + // // --> if (mechanism.matches("remaining_air") && mechanism.requireInteger()) { getLivingEntity().setRemainingAir(mechanism.getValue().asInt()); diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java b/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java index f013bb2334..9c3cb0e8bc 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/InventoryTag.java @@ -2306,7 +2306,7 @@ else if ((object.inventory instanceof FurnaceInventory)) { // <--[tag] // @attribute // @returns ElementTag(Number) - // @mechanism anvil_repair_cost + // @mechanism InventoryTag.anvil_repair_cost // @description // Returns the current repair cost on an anvil. // --> @@ -2320,7 +2320,7 @@ else if ((object.inventory instanceof FurnaceInventory)) { // <--[tag] // @attribute // @returns ElementTag(Number) - // @mechanism anvil_max_repair_cost + // @mechanism InventoryTag.anvil_max_repair_cost // @description // Returns the maximum repair cost on an anvil. // --> @@ -2347,7 +2347,7 @@ else if ((object.inventory instanceof FurnaceInventory)) { // <--[tag] // @attribute // @returns ItemTag - // @mechanism fuel + // @mechanism InventoryTag.fuel // @description // Returns the item currently in the fuel section of a furnace or brewing stand inventory. // --> @@ -2362,7 +2362,7 @@ else if ((object.inventory instanceof FurnaceInventory)) { // <--[tag] // @attribute // @returns ItemTag - // @mechanism input + // @mechanism InventoryTag.input // @description // Returns the item currently in the smelting slot of a furnace inventory, or the ingredient slot of a brewing stand inventory. // --> diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java b/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java index 8033b93864..885b30d54d 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/ItemTag.java @@ -685,8 +685,8 @@ public static void registerTags() { // @description // Returns whether the item can be repaired. // If this returns true, it will enable access to: - // <@link mechanism ItemTag.durability>, <@link tag ItemTag.max_durability>, - // and <@link tag ItemTag.durability> + // <@link mechanism ItemTag.durability>, + // <@link tag ItemTag.max_durability>, and <@link tag ItemTag.durability>. // --> registerTag("repairable", (attribute, object) -> { return new ElementTag(ItemDurability.describes(object)); @@ -699,7 +699,7 @@ public static void registerTags() { // @description // Returns whether the item is a growable crop. // If this returns true, it will enable access to: - // <@link mechanism ItemTag.plant_growth> and <@link tag ItemTag.plant_growth> + // <@link mechanism ItemTag.plant_growth> and <@link tag ItemTag.plant_growth>. // --> registerTag("is_crop", (attribute, object) -> { return new ElementTag(ItemPlantgrowth.describes(object)); @@ -712,10 +712,8 @@ public static void registerTags() { // @description // Returns whether the item is considered an editable book. // If this returns true, it will enable access to: - // <@link mechanism ItemTag.book>, <@link tag ItemTag.book>, - // <@link tag ItemTag.book.author>, <@link tag ItemTag.book.title>, - // <@link tag ItemTag.book.page_count>, <@link tag ItemTag.book.page[<#>]>, - // and <@link tag ItemTag.book.pages> + // <@link mechanism ItemTag.book>, + // <@link tag ItemTag.book_author>, <@link tag ItemTag.book_title>, and <@link tag ItemTag.book_pages>. // --> registerTag("is_book", (attribute, object) -> { return new ElementTag(ItemBook.describes(object)); @@ -725,9 +723,10 @@ public static void registerTags() { // @attribute // @returns ElementTag(Boolean) // @group properties + // @description // Returns whether the item can have a custom color. // If this returns true, it will enable access to: - // <@link mechanism ItemTag.color>, and <@link tag ItemTag.color> + // <@link mechanism ItemTag.color>, and <@link tag ItemTag.color>. // --> registerTag("is_colorable", (attribute, object) -> { return new ElementTag(ItemColor.describes(object)); @@ -741,9 +740,10 @@ public static void registerTags() { // @attribute // @returns ElementTag(Boolean) // @group properties + // @description // Returns whether the item is a firework. // If this returns true, it will enable access to: - // <@link mechanism ItemTag.firework>, and <@link tag ItemTag.firework> + // <@link mechanism ItemTag.firework>, and <@link tag ItemTag.firework>. // --> registerTag("is_firework", (attribute, object) -> { return new ElementTag(ItemFirework.describes(object)); @@ -753,9 +753,10 @@ public static void registerTags() { // @attribute // @returns ElementTag(Boolean) // @group properties + // @description // Returns whether the item has an inventory. // If this returns true, it will enable access to: - // <@link mechanism ItemTag.inventory>, and <@link tag ItemTag.inventory> + // <@link mechanism ItemTag.inventory>, and <@link tag ItemTag.inventory>. // --> registerTag("has_inventory", (attribute, object) -> { return new ElementTag(ItemInventory.describes(object)); @@ -765,9 +766,10 @@ public static void registerTags() { // @attribute // @returns ElementTag(Boolean) // @group properties + // @description // Returns whether the item is lockable. // If this returns true, it will enable access to: - // <@link mechanism ItemTag.lock>, and <@link tag ItemTag.lock> + // <@link mechanism ItemTag.lock>, and <@link tag ItemTag.lock>. // --> registerTag("is_lockable", (attribute, object) -> { return new ElementTag(ItemLock.describes(object)); @@ -801,9 +803,7 @@ public static void registerTags() { // @description // Returns the item converted to a raw JSON object with one layer of escaping for network transmission. // EG, via /tellraw. - // EXAMPLE USAGE: execute as_server 'tellraw - // {"text":"","extra":[{"text":"This is the item in your hand ","color":"white"}, - // {"text":"Item","color":"white","hoverEvent":{"action":"show_item","value":"{}"}}]}' + // Generally, prefer tags like <@link tag ElementTag.on_hover.type> with type 'show_item'. // --> registerTag("json", (attribute, object) -> { return new ElementTag(NMSHandler.getItemHelper().getJsonString(object.item)); diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java b/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java index a9a014694b..7ecd210594 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/MaterialTag.java @@ -816,7 +816,7 @@ public static void registerTags() { // <--[tag] // @attribute // @returns ElementTag - // @mechanism piston_reaction + // @mechanism MaterialTag.piston_reaction // @description // Returns the material's piston reaction. (Only for block materials). // --> @@ -831,7 +831,7 @@ public static void registerTags() { // <--[tag] // @attribute // @returns ElementTag(Decimal) - // @mechanism block_strength + // @mechanism MaterialTag.block_strength // @description // Returns the material's strength level. (Only for block materials). // This is a representation of how much time mining is needed to break a block. diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java b/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java index 2fef5e1965..ab9cf8fe02 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/NPCTag.java @@ -977,7 +977,7 @@ else if (attribute.startsWith("list", 2)) { // <--[tag] // @attribute // @returns ElementTag(Decimal) - // @mechanism distance_margin + // @mechanism NPCTag.distance_margin // @description // Returns the NPC's current pathfinding distance margin. That is, how close it needs to get to its destination (in block-lengths). // --> @@ -988,7 +988,7 @@ else if (attribute.startsWith("list", 2)) { // <--[tag] // @attribute // @returns ElementTag(Decimal) - // @mechanism path_distance_margin + // @mechanism NPCTag.path_distance_margin // @description // Returns the NPC's current pathfinding distance margin. That is, how close it needs to get to individual points along its path. // --> @@ -1380,7 +1380,7 @@ public void adjust(Mechanism mechanism) { // @description // Sets the maximum movement distance of the NPC. // @tags - // + // // --> if (mechanism.matches("range") && mechanism.requireFloat()) { getCitizen().getNavigator().getDefaultParameters().range(mechanism.getValue().asFloat()); @@ -1393,7 +1393,7 @@ public void adjust(Mechanism mechanism) { // @description // Sets the maximum attack distance of the NPC. // @tags - // + // // --> if (mechanism.matches("attack_range") && mechanism.requireFloat()) { getCitizen().getNavigator().getDefaultParameters().attackRange(mechanism.getValue().asFloat()); @@ -1406,7 +1406,7 @@ public void adjust(Mechanism mechanism) { // @description // Sets the movement speed of the NPC. // @tags - // + // // --> if (mechanism.matches("speed") && mechanism.requireFloat()) { getCitizen().getNavigator().getDefaultParameters().speedModifier(mechanism.getValue().asFloat()); diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java b/plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java index fa9d1b263b..97f0e5811b 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/WorldTag.java @@ -537,6 +537,7 @@ public static void registerTags() { // <--[tag] // @attribute // @returns DurationTag + // @Mechanism WorldTag.ticks_per_animal_spawns // @description // Returns the world's ticks per animal spawn value. // --> @@ -547,6 +548,7 @@ public static void registerTags() { // <--[tag] // @attribute // @returns DurationTag + // @Mechanism WorldTag.ticks_per_monster_spawns // @description // Returns the world's ticks per monster spawn value. // --> @@ -1022,7 +1024,7 @@ public void adjust(Mechanism mechanism) { // @description // Sets the time between animal spawns. // @tags - // + // // --> if (mechanism.matches("ticks_per_animal_spawns") && mechanism.requireObject(DurationTag.class)) { getWorld().setTicksPerAnimalSpawns(mechanism.valueAsType(DurationTag.class).getTicksAsInt()); @@ -1035,7 +1037,7 @@ public void adjust(Mechanism mechanism) { // @description // Sets the time between monster spawns. // @tags - // + // // --> if (mechanism.matches("ticks_per_monster_spawns") && mechanism.requireObject(DurationTag.class)) { getWorld().setTicksPerMonsterSpawns(mechanism.valueAsType(DurationTag.class).getTicksAsInt()); diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAge.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAge.java index 84722f0957..d5648867e7 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAge.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAge.java @@ -202,7 +202,7 @@ public void adjust(Mechanism mechanism) { // // // - // + // // --> if (mechanism.matches("age_lock") @@ -224,7 +224,7 @@ public void adjust(Mechanism mechanism) { // // // - // + // // --> if (mechanism.matches("age")) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributes.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributes.java index ad0a0536bb..9899744c44 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributes.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityAttributes.java @@ -105,7 +105,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) { // <--[tag] // @attribute // @returns ListTag - // @mechanism attributes + // @mechanism EntityTag.attributes // @group properties // @description // Returns a list of all attributes on the entity, formatted in a way that can be sent back into the 'attributes' mechanism. @@ -117,7 +117,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) { // <--[tag] // @attribute ]> // @returns ElementTag(Boolean) - // @mechanism attributes + // @mechanism EntityTag.attributes // @group properties // @description // Returns whether the entity has the named attribute. @@ -132,7 +132,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) { // <--[tag] // @attribute ]> // @returns ElementTag(Decimal) - // @mechanism attributes + // @mechanism EntityTag.attributes // @group properties // @description // Returns the final calculated value of the named attribute for the entity. @@ -154,7 +154,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) { // <--[tag] // @attribute ]> // @returns ElementTag(Decimal) - // @mechanism attributes + // @mechanism EntityTag.attributes // @group properties // @description // Returns the base value of the named attribute for the entity. @@ -176,7 +176,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) { // <--[tag] // @attribute ]> // @returns ElementTag(Decimal) - // @mechanism attributes + // @mechanism EntityTag.attributes // @group properties // @description // Returns the default value of the named attribute for the entity. diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityColor.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityColor.java index f24f5c10eb..ed72a2367f 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityColor.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityColor.java @@ -202,7 +202,7 @@ public void adjust(Mechanism mechanism) { // For the available color options, refer to <@link language Entity Color Types>. // @tags // - // + // // --> if (mechanism.matches("color")) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java index 07bb708f55..f68eb6f2c7 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityFramed.java @@ -155,7 +155,6 @@ public void adjust(Mechanism mechanism) { // Valid rotations: <@link url https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Rotation.html> // For example: framed:diamond_sword|clockwise // @tags - // // // // diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityHealth.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityHealth.java index a0995866e6..46f8899b5b 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityHealth.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityHealth.java @@ -120,7 +120,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) { // --> if (attribute.startsWith("health_max")) { return new ElementTag(entity.getLivingEntity().getMaxHealth()) - .getObjectAttribute(attribute.fulfill(2)); + .getObjectAttribute(attribute.fulfill(1)); } if (attribute.startsWith("health.max")) { Deprecations.entityHealthTags.warn(attribute.context); @@ -137,11 +137,11 @@ public ObjectTag getObjectAttribute(Attribute attribute) { // --> if (attribute.startsWith("health_percentage")) { double maxHealth = entity.getLivingEntity().getMaxHealth(); - if (attribute.hasContext(2)) { - maxHealth = attribute.getIntContext(2); + if (attribute.hasContext(1)) { + maxHealth = attribute.getIntContext(1); } return new ElementTag((entity.getLivingEntity().getHealth() / maxHealth) * 100) - .getObjectAttribute(attribute.fulfill(2)); + .getObjectAttribute(attribute.fulfill(1)); } if (attribute.startsWith("health.percentage")) { Deprecations.entityHealthTags.warn(attribute.context); @@ -180,7 +180,7 @@ public void adjust(Mechanism mechanism) { // The entity must be living. // @tags // - // + // // --> if (mechanism.matches("max_health") && mechanism.requireDouble()) { if (entity.isCitizensNPC()) { @@ -209,7 +209,7 @@ else if (entity.isLivingEntity()) { // The entity must be living. // @tags // - // + // // --> if (mechanism.matches("health_data")) { if (entity.isLivingEntity()) { @@ -231,7 +231,7 @@ else if (entity.isLivingEntity()) { // The entity must be living. // @tags // - // + // // --> if (mechanism.matches("health") && mechanism.requireDouble()) { if (entity.isLivingEntity()) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityTame.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityTame.java index e6bacc7e17..f06bb6fdd8 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityTame.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/entity/EntityTame.java @@ -131,7 +131,7 @@ public void adjust(Mechanism mechanism) { // Also available: <@link mechanism EntityTag.owner> // @tags // - // + // // --> if (mechanism.matches("tame")) { @@ -160,7 +160,7 @@ public void adjust(Mechanism mechanism) { // Also available: <@link mechanism EntityTag.tame> // @tags // - // + // // // --> diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java index c40a77f564..fe176bd726 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemBook.java @@ -228,9 +228,7 @@ public void adjust(Mechanism mechanism) { // Changes the plain-text pages of a book item. // See <@link language Property Escaping> // @tags - // - // ]> - // + // // --> if (mechanism.matches("book_pages")) { @@ -251,7 +249,7 @@ public void adjust(Mechanism mechanism) { // @description // Changes the author of a book item. // @tags - // + // // --> if (mechanism.matches("book_author")) { @@ -272,7 +270,7 @@ public void adjust(Mechanism mechanism) { // @description // Changes the title of a book item. // @tags - // + // // --> if (mechanism.matches("book_title")) { @@ -295,12 +293,9 @@ public void adjust(Mechanism mechanism) { // See <@link language Property Escaping> // @tags // - // - // - // - // ]> - // - // + // + // + // // --> if (mechanism.matches("book")) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemColor.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemColor.java index a623abe685..5b78452161 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemColor.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemColor.java @@ -113,7 +113,6 @@ public void adjust(Mechanism mechanism) { // Sets the leather armor item's dye color or the potion item's color in the format RED,GREEN,BLUE. // @tags // - // // --> if ((mechanism.matches("dye") || mechanism.matches("dye_color") || mechanism.matches("color")) && (mechanism.requireObject(ColorTag.class))) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java index 96643340f6..b265d8476a 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/item/ItemPotion.java @@ -123,7 +123,7 @@ public ObjectTag getObjectAttribute(Attribute attribute) { // <--[tag] // @attribute // @returns ElementTag(Boolean) - // @mechanism ItemTag.potion + // @mechanism ItemTag.potion_effects // @description // Returns whether the potion has a potion effect. // --> diff --git a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeInputs.java b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeInputs.java index 87a41bcb00..26e44ccf62 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeInputs.java +++ b/plugin/src/main/java/com/denizenscript/denizen/objects/properties/trade/TradeInputs.java @@ -77,9 +77,9 @@ public void adjust(Mechanism mechanism) { // @input ListTag(ItemTag) // @description // Sets the items required to make a successful trade. Use an empty input to make the trade impossible. - // NOTE: If a more than two items are specified, then only the first two items will be used. + // NOTE: If more than two items are specified, then only the first two items will be used. // @tags - // + // // --> if (mechanism.matches("inputs")) { List ingredients = new ArrayList<>(); diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/RemoveCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/RemoveCommand.java index caebcb3817..369e88a764 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/RemoveCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/entity/RemoveCommand.java @@ -26,10 +26,12 @@ public class RemoveCommand extends AbstractCommand { // @Group entity // @Description // Removes the selected entity. May also take a list of entities to remove. + // // Any NPC removed this way is completely removed, as if by '/npc remove'. - // If a generic entity name is given (see: <@link language entities>) - // it will remove all entities of that type from the given world. - // Optionally, you may specifiy a world to target. + // For temporary NPC removal, see <@link command despawn>. + // + // If a generic entity name is given (like 'zombie'), this will remove all entities of that type from the given world. + // Optionally, you may specify a world to target. // (Defaults to the world of the player running the command) // // @Tags diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java index 59ed1efffc..4320488111 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/item/TakeCommand.java @@ -30,12 +30,27 @@ public class TakeCommand extends AbstractCommand { // // @Description // Takes items from a player or inventory. + // // If the player or inventory does not have the item being taken, nothing happens. - // Specifying a slot will take the items from that specific slot. - // Specifying 'nbt' with a key will take items with the specified NBT key, as see by <@link command nbt>. - // If an economy is registered, specifying money instead of a item will take money from the player's economy. + // + // Using 'slot:' will take the items from that specific slot. + // + // Using 'nbt:' with a key will take items with the specified NBT key, as set by <@link mechanism ItemTag.nbt>. + // + // Using 'iteminhand' will take from the player's held item slot. + // + // Using 'scriptname:' will take items with the specified item script name. + // + // Using 'bydisplay:' will take items with the specified display name. + // + // Using 'bycover:' will take a written book by the specified book title + author pair. + // + // If an economy is registered, using 'money' instead of an item will take money from the player's economy balance. + // // If no quantity is specified, exactly 1 item will be taken. // + // Optionally using 'from:' to specify a specific inventory to take from. If not specified, the linked player's inventory will be used. + // // @Tags // // diff --git a/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/MapScriptContainer.java b/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/MapScriptContainer.java index 4ee96e1cc3..2b14d5a123 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/MapScriptContainer.java +++ b/plugin/src/main/java/com/denizenscript/denizen/scripts/containers/core/MapScriptContainer.java @@ -62,7 +62,7 @@ public MapScriptContainer(YamlConfiguration configurationSection, String scriptC // // 3: // type: cursor - // # Specify a cursor - <@link tag server.list_map_cursor_types> + // # Specify a cursor type // cursor: red_marker // # Supported on all objects: x/y positions, and whether to use worldly or map coordinates. // x: 5 @@ -70,6 +70,8 @@ public MapScriptContainer(YamlConfiguration configurationSection, String scriptC // world_coordinates: false // // + // A list of cursor types is available through <@link tag server.list_map_cursor_types>. + // // --> public void applyTo(MapView mapView) { diff --git a/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java b/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java index d700f0589d..653910d64a 100644 --- a/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java +++ b/plugin/src/main/java/com/denizenscript/denizen/tags/core/ServerTagBase.java @@ -1030,7 +1030,7 @@ else if (recipe instanceof CookingRecipe) { // @returns ElementTag(Number) // @description // Returns whether a world event exists on the server. - // This tag will ignore ObjectTag identifiers (see <@link language dobject>). + // This tag will ignore ObjectTag identifiers (see <@link language objecttag>). // --> if (attribute.startsWith("has_event") && attribute.hasContext(1)) { @@ -1044,7 +1044,7 @@ else if (recipe instanceof CookingRecipe) { // @returns ListTag(ScriptTag) // @description // Returns a list of all world scripts that will handle a given event name. - // This tag will ignore ObjectTag identifiers (see <@link language dobject>). + // This tag will ignore ObjectTag identifiers (see <@link language objecttag>). // For use with <@link tag server.has_event[]> // --> if (attribute.startsWith("event_handlers")