Skip to content

Commit b3d463a

Browse files
authored
Update Examples to Reflect Alias Changes (#7828)
1 parent b51a18e commit b3d463a

19 files changed

+26
-30
lines changed

src/main/java/ch/njol/skript/classes/data/SkriptClasses.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -161,16 +161,14 @@ public String toVariableNameString(final WeatherType o) {
161161
Classes.registerClass(new ClassInfo<>(ItemType.class, "itemtype")
162162
.user("item ?types?", "materials?")
163163
.name("Item Type")
164-
.description("An item type is an alias, e.g. 'a pickaxe', 'all plants', etc., and can result in different items when added to an inventory, " +
164+
.description("An item type is an alias that can result in different items when added to an inventory, " +
165165
"and unlike <a href='#itemstack'>items</a> they are well suited for checking whether an inventory contains a certain item or whether a certain item is of a certain type.",
166166
"An item type can also have one or more <a href='#enchantmenttype'>enchantments</a> with or without a specific level defined, " +
167167
"and can optionally start with 'all' or 'every' to make this item type represent <i>all</i> types that the alias represents, including data ranges.")
168168
.usage("[&lt;number&gt; [of]] [all/every] &lt;alias&gt; [of &lt;enchantment&gt; [&lt;level&gt;] [,/and &lt;more enchantments...&gt;]]")
169169
.examples("give 4 torches to the player",
170-
"add all slabs to the inventory of the block",
170+
"add oak slab to the inventory of the block",
171171
"player's tool is a diamond sword of sharpness",
172-
"remove a pickaxes of fortune 4 from {stored items::*}",
173-
"set {_item} to 10 of every upside-down stair",
174172
"block is dirt or farmland")
175173
.since("1.0")
176174
.before("itemstack", "entitydata", "entitytype")

src/main/java/ch/njol/skript/conditions/CondIsEdible.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@Name("Is Edible")
1111
@Description("Checks whether an item is edible.")
1212
@Examples({
13-
"steak is edible",
13+
"cooked beef is edible",
1414
"player's tool is edible"
1515
})
1616
@Since("2.2-dev36")

src/main/java/ch/njol/skript/conditions/CondIsEnchanted.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
@Name("Is Enchanted")
2323
@Description("Checks whether an item is enchanted.")
2424
@Examples({"tool of the player is enchanted with efficiency 2",
25-
"helm, chestplate, leggings or boots are enchanted"})
25+
"helm, chestplate, leggings or boots are enchanted"})
2626
@Since("1.4.6")
2727
public class CondIsEnchanted extends Condition {
2828

src/main/java/ch/njol/skript/conditions/CondIsFlammable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
@Name("Is Flammable")
1111
@Description("Checks whether an item is flammable.")
1212
@Examples({
13-
"wood is flammable",
13+
"send whether the tag contents of minecraft tag \"planks\" are flammable",
1414
"player's tool is flammable"
1515
})
1616
@Since("2.2-dev36")

src/main/java/ch/njol/skript/conditions/CondIsWearing.java

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
@Description("Checks whether an entity is wearing some items (usually armor).")
2727
@Examples({
2828
"player is wearing an iron chestplate and iron leggings",
29-
"player is wearing all diamond armour",
3029
"target is wearing wolf armor"
3130
})
3231
@Since("1.0")

src/main/java/ch/njol/skript/conditions/CondItemInHand.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
@Description("Checks whether a player is holding a specific item. Cannot be used with endermen, use 'entity is [not] an enderman holding &lt;item type&gt;' instead.")
2222
@Examples({
2323
"player is holding a stick",
24-
"victim isn't holding a sword of sharpness"
24+
"victim isn't holding a diamond sword of sharpness"
2525
})
2626
@Since("1.0")
2727
public class CondItemInHand extends Condition {

src/main/java/ch/njol/skript/effects/EffEquip.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@
3939
})
4040
@Examples({
4141
"equip player with diamond helmet",
42-
"equip player with all diamond armor",
42+
"equip player with diamond leggings, diamond chestplate, and diamond boots",
4343
"unequip diamond chestplate from player",
44-
"unequip all armor from player",
4544
"unequip player's armor"
4645
})
4746
@Since("1.0, 2.7 (multiple entities, unequip), 2.10 (wolves)")

src/main/java/ch/njol/skript/events/EvtBlock.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,23 @@ public class EvtBlock extends SkriptEvent {
3434
// REMIND attacking an item frame first removes its item; include this in on block damage?
3535
Skript.registerEvent("Break / Mine", EvtBlock.class, new Class[]{BlockBreakEvent.class, PlayerBucketFillEvent.class, HangingBreakEvent.class}, "[block] (break[ing]|1¦min(e|ing)) [[of] %-itemtypes/blockdatas%]")
3636
.description("Called when a block is broken by a player. If you use 'on mine', only events where the broken block dropped something will call the trigger.")
37-
.examples("on mine:", "on break of stone:", "on mine of any ore:", "on break of chest[facing=north]:", "on break of potatoes[age=7]:")
37+
.examples("on mine:", "on break of stone:", "on break of chest[facing=north]:", "on break of potatoes[age=7]:")
3838
.since("1.0 (break), <i>unknown</i> (mine), 2.6 (BlockData support)");
3939
Skript.registerEvent("Burn", EvtBlock.class, BlockBurnEvent.class, "[block] burn[ing] [[of] %-itemtypes/blockdatas%]")
4040
.description("Called when a block is destroyed by fire.")
41-
.examples("on burn:", "on burn of wood, fences, or chests:", "on burn of oak_log[axis=y]:")
41+
.examples("on burn:", "on burn of oak wood, oak fences, or chests:", "on burn of oak_log[axis=y]:")
4242
.since("1.0, 2.6 (BlockData support)");
4343
Skript.registerEvent("Place", EvtBlock.class, new Class[]{BlockPlaceEvent.class, PlayerBucketEmptyEvent.class, HangingPlaceEvent.class}, "[block] (plac(e|ing)|build[ing]) [[of] %-itemtypes/blockdatas%]")
4444
.description("Called when a player places a block.")
45-
.examples("on place:", "on place of a furnace, workbench or chest:", "on break of chest[type=right] or chest[type=left]")
45+
.examples("on place:", "on place of a furnace, crafting table or chest:", "on break of chest[type=right] or chest[type=left]")
4646
.since("1.0, 2.6 (BlockData support)");
4747
Skript.registerEvent("Fade", EvtBlock.class, BlockFadeEvent.class, "[block] fad(e|ing) [[of] %-itemtypes/blockdatas%]")
4848
.description("Called when a block 'fades away', e.g. ice or snow melts.")
49-
.examples("on fade of snow or ice:", "on fade of snow[layers=2]")
49+
.examples("on fade of snow or blue ice:", "on fade of snow[layers=2]")
5050
.since("1.0, 2.6 (BlockData support)");
5151
Skript.registerEvent("Form", EvtBlock.class, BlockFormEvent.class, "[block] form[ing] [[of] %-itemtypes/blockdatas%]")
5252
.description("Called when a block is created, but not by a player, e.g. snow forms due to snowfall, water freezes in cold biomes. This isn't called when block spreads (mushroom growth, water physics etc.), as it has its own event (see <a href='#spread'>spread event</a>).")
53-
.examples("on form of snow:", "on form of a mushroom:")
53+
.examples("on form of snow:")
5454
.since("1.0, 2.6 (BlockData support)");
5555
Skript.registerEvent("Block Drop", EvtBlock.class, BlockDropItemEvent.class, "block drop[ping] [[of] %-itemtypes/blockdatas%]")
5656
.description(

src/main/java/ch/njol/skript/events/SimpleEvents.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class SimpleEvents {
4141
Skript.registerEvent("Block Damage", SimpleEvent.class, BlockDamageEvent.class, "block damag(ing|e)")
4242
.description("Called when a player starts to break a block. You can usually just use the leftclick event for this.")
4343
.examples("on block damaging:",
44-
"\tif block is log:",
44+
"\tif block is tagged with minecraft tag \"logs\":",
4545
"\t\tsend \"You can't break the holy log!\"")
4646
.since("1.0");
4747
Skript.registerEvent("Flow", SimpleEvent.class, BlockFromToEvent.class, "[block] flow[ing]", "block mov(e|ing)")

src/main/java/ch/njol/skript/expressions/ExprAmountOfItems.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
@Name("Amount of Items")
2020
@Description("Counts how many of a particular <a href='./classes.html#itemtype'>item type</a> are in a given inventory.")
21-
@Examples("message \"You have %number of ores in the player's inventory% ores in your inventory.\"")
21+
@Examples("message \"You have %number of tag values of minecraft tag \"diamond_ores\" in the player's inventory% diamond ores in your inventory.\"")
2222
@Since("2.0")
2323
public class ExprAmountOfItems extends SimpleExpression<Long> {
2424

src/main/java/ch/njol/skript/expressions/ExprArmorSlot.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
})
3333
@Examples({
3434
"set chestplate of the player to a diamond chestplate",
35-
"helmet of player is neither a helmet nor air # player is wearing a block, e.g. from another plugin"
35+
"helmet of player is neither tag values of tag \"paper:helmets\" nor air # player is wearing a block, e.g. from another plugin"
3636
})
3737
@Keywords("armor")
3838
@Since("1.0, 2.8.0 (armor), 2.10 (body armor)")

src/main/java/ch/njol/skript/expressions/ExprBarterDrops.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
@Description("The items dropped by the piglin in a piglin bartering event.")
2525
@Examples({
2626
"on piglin barter:",
27-
"\tif the bartering drops contain a jack-o-lantern:",
28-
"\t\tremove jack-o-lantern from bartering output",
27+
"\tif the bartering drops contain a jack o lantern:",
28+
"\t\tremove jack o lantern from bartering output",
2929
"\t\tbroadcast \"it's not halloween yet!\""
3030
})
3131
@Since("2.10")

src/main/java/ch/njol/skript/expressions/ExprBlock.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Name("Block")
2828
@Description({"The block involved in the event, e.g. the clicked block or the placed block.",
2929
"Can optionally include a direction as well, e.g. 'block above' or 'block in front of the player'."})
30-
@Examples({"block is ore",
30+
@Examples({"block is iron ore",
3131
"set block below to air",
3232
"spawn a creeper above the block",
3333
"loop blocks in radius 4:",

src/main/java/ch/njol/skript/expressions/ExprColorOf.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@
4444
})
4545
@Examples({
4646
"on click on wool:",
47-
"\tmessage \"This wool block is <%color of block%>%color of block%<reset>!\"",
48-
"\tset the color of the block to black"
47+
"if event-block is tagged with minecraft tag \"wool\":",
48+
"\tmessage \"This wool block is <%color of block%>%color of block%<reset>!\"",
49+
"\tset the color of the block to black"
4950
})
5051
@Since("1.2, 2.10 (displays)")
5152
public class ExprColorOf extends PropertyExpression<Object, Color> {

src/main/java/ch/njol/skript/expressions/ExprDamagedItem.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
@Description("Directly damages an item. In MC versions 1.12.2 and lower, this can be used to apply data values to items/blocks")
2020
@Examples({"give player diamond sword with damage value 100", "set player's tool to diamond hoe damaged by 250",
2121
"give player diamond sword with damage 700 named \"BROKEN SWORD\"",
22-
"set {_item} to diamond hoe with damage value 50 named \"SAD HOE\"",
23-
"set target block of player to wool with data value 1", "set target block of player to potato plant with data value 7"})
22+
"set {_item} to diamond hoe with damage value 50 named \"SAD HOE\""})
2423
@Since("2.4")
2524
public class ExprDamagedItem extends PropertyExpression<ItemType, ItemType> {
2625

src/main/java/ch/njol/skript/expressions/ExprItems.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
@Name("Items")
2828
@Description("Items or blocks of a specific type, useful for looping.")
2929
@Examples({
30-
"loop items of type ore and log:",
30+
"loop tag values of tag \"diamond_ores\" and tag values of tag \"oak_logs\":",
3131
"\tblock contains loop-item",
3232
"\tmessage \"Theres at least one %loop-item% in this block\"",
3333
"drop all blocks at the player # drops one of every block at the player"

src/main/java/ch/njol/skript/expressions/ExprTool.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
@Name("Tool")
3333
@Description("The item an entity is holding in their main or off hand.")
34-
@Examples({"player's tool is a pickaxe",
34+
@Examples({"player's tool is tagged with minecraft tag \"pickaxes\"",
3535
"player's off hand tool is a shield",
3636
"set tool of all players to a diamond sword",
3737
"set offhand tool of target entity to a bow"})

src/main/java/ch/njol/skript/expressions/ExprXOf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
@Name("X of Item")
2424
@Description("An expression to be able to use a certain amount of items where the amount can be any expression. Please note that this expression is not stable and might be replaced in the future.")
25-
@Examples("give level of player of pickaxes to the player")
25+
@Examples("give level of player of iron pickaxes to the player")
2626
@Since("1.2")
2727
public class ExprXOf extends PropertyExpression<Object, Object> {
2828

src/main/java/org/skriptlang/skript/bukkit/loottables/elements/conditions/CondIsLootable.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"\tset loot table of block at event-location to \"minecraft:chests/simple_dungeon\"",
2525
"\t# the chest will now generate the loot of a simple dungeon when opened, because it is indeed a lootable block.",
2626

27-
"set block at event-location to wool block",
27+
"set block at event-location to white wool",
2828
"if block at event-location is lootable:",
2929
"\t# uh oh, nothing will happen because a wool is not a lootable block."
3030
})

0 commit comments

Comments
 (0)