Skip to content

Commit 8394764

Browse files
committed
chore(docs): improve examples
1 parent 12d7144 commit 8394764

11 files changed

Lines changed: 13 additions & 19 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@Name("Cancel Command Cooldown")
1919
@Description({"Only usable in commands. Makes it so the current command usage isn't counted towards the cooldown."})
2020
@Example("""
21-
command /nick <text>:
21+
command /nick <text>:
2222
executable by: players
2323
cooldown: 10 seconds
2424
trigger:

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,29 @@
3535
"Some expressions can only be set and/or deleted, while others can also have things added to or removed from them."
3636
})
3737
@Example("""
38-
# Set
39-
Set the player's display name to "&lt;red&gt;%name of player%"
38+
set the player's display name to "<red>%name of player%"
4039
set the block above the victim to lava
4140
""")
4241
@Example("""
43-
# Add
4442
add 2 to the player's health # preferably use '<a href='#EffHealth'>heal</a>' for this
4543
add argument to {blacklist::*}
4644
give a diamond pickaxe of efficiency 5 to the player
4745
increase the data value of the clicked block by 1
4846
""")
4947
@Example("""
50-
# Remove
5148
remove 2 pickaxes from the victim
5249
subtract 2.5 from {points::%uuid of player%}
5350
""")
5451
@Example("""
55-
# Remove All
5652
remove every iron tool from the player
5753
remove all minecarts from {entitylist::*}
5854
""")
5955
@Example("""
60-
# Delete
6156
delete the block below the player
6257
clear drops
6358
delete {variable}
6459
""")
6560
@Example("""
66-
# Reset
6761
reset walk speed of player
6862
reset chunk at the targeted block
6963
""")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
@Name("Fall Distance")
1616
@Description({"The distance an entity has fallen for."})
17+
@Example("set all entities' fall distance to 10")
1718
@Example("""
18-
set all entities' fall distance to 10
1919
on damage:
2020
send "%victim's fall distance%" to victim
2121
""")

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
@Example("""
8383
on join:
8484
player has permission "name.red"
85-
set the player's display name to "&lt;red&gt;[admin] &lt;gold&gt;%name of player%"
86-
set the player's tab list name to "&lt;green&gt;%player's name%"
85+
set the player's display name to "<red>[admin] <gold>%name of player%"
86+
set the player's tab list name to "<green>%player's name%"
8787
""")
8888
@Example("set the name of the player's tool to \"Legendary Sword of Awesomeness\"")
8989
@Since({

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
set {var} to line 1 parsed as integer
2424
if {var} is not set:
2525
parse error is set:
26-
message "&lt;red&gt;Line 1 is invalid: %last parse error%"
26+
message "<red>Line 1 is invalid: %last parse error%"
2727
else:
28-
message "&lt;red&gt;Please put an integer on line 1!"
28+
message "<red>Please put an integer on line 1!"
2929
""")
3030
@Since("2.0")
3131
public class ExprParseError extends SimpleExpression<String> {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
@Name("Player Protocol Version")
1010
@Description("Player's protocol version. For more information and list of protocol versions <a href='https://wiki.vg/Protocol_version_numbers'>visit wiki.vg</a>.")
1111
@Example("""
12-
command /protocolversion &ltplayer&gt:
12+
command /protocolversion <player>:
1313
trigger:
1414
send "Protocol version of %arg-1%: %protocol version of arg-1%"
1515
""")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"(increase and decrease effects cannot be used because that wouldn't make sense).",})
2929
@Example("""
3030
on server list ping:
31-
set the version string to "&lt;light green&gt;Version: &lt;orange&gt;%minecraft version%"
31+
set the version string to "<light green>Version: <orange>%minecraft version%"
3232
set the protocol version to 0 # 13w41a (1.7) - so the player will see the custom version string almost always
3333
""")
3434
@Since("2.3")

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
@Example("""
2323
loop 360 times:
2424
set {_v} to cylindrical vector radius 1, yaw loop-value, height 2
25-
set {_v} to cylindrical vector radius 1, yaw 90, height 2
2625
""")
26+
@Example("set {_v} to cylindrical vector radius 1, yaw 90, height 2")
2727
@Since("2.2-dev28")
2828
public class ExprVectorCylindrical extends SimpleExpression<Vector> {
2929

src/main/java/ch/njol/skript/hooks/chat/expressions/ExprPrefixSuffix.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
cancel event
2626
broadcast "%player's prefix%%player's display name%%player's suffix%: %message%" to the player's world
2727
""")
28-
@Example("set the player's prefix to \"[&lt;red&gt;Admin<reset>] \"")
28+
@Example("set the player's prefix to \"[<red>Admin<reset>] \"")
2929
@Example("clear player's prefix")
3030
@Since("2.0, 2.10 (delete)")
3131
@RequiredPlugins({"Vault", "a chat plugin that supports Vault"})

src/main/java/ch/njol/skript/hooks/regions/conditions/CondCanBuild.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"This condition requires a supported <a href='#region'>regions</a> plugin to be installed."
2222
})
2323
@Example("""
24-
command /setblock &lt;material&gt;:
24+
command /setblock <material>:
2525
description: set the block at your crosshair to a different type
2626
trigger:
2727
player cannot build at the targeted block:

0 commit comments

Comments
 (0)