From 5afa624bbd5916f8b02818b40f6aa6d0bbf5df6b Mon Sep 17 00:00:00 2001 From: APickledWalrus Date: Mon, 13 Jan 2025 16:54:46 -0500 Subject: [PATCH] Fix example scripts --- src/main/resources/scripts/-examples/commands.sk | 2 +- src/main/resources/scripts/-examples/functions.sk | 10 +++++----- src/main/resources/scripts/-examples/loops.sk | 2 +- .../resources/scripts/-examples/options and meta.sk | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/resources/scripts/-examples/commands.sk b/src/main/resources/scripts/-examples/commands.sk index 303eb2ee70b..9142f38ce56 100644 --- a/src/main/resources/scripts/-examples/commands.sk +++ b/src/main/resources/scripts/-examples/commands.sk @@ -49,7 +49,7 @@ command /home []: aliases: # Creates an alias `blacklisted` for this list of items. - blacklisted = TNT, bedrock, obsidian, mob spawner, lava, lava bucket + blacklisted = TNT, bedrock, obsidian, spawner, lava, lava bucket command /item : description: Give yourself some items. diff --git a/src/main/resources/scripts/-examples/functions.sk b/src/main/resources/scripts/-examples/functions.sk index bb743a075dd..949acc534bc 100644 --- a/src/main/resources/scripts/-examples/functions.sk +++ b/src/main/resources/scripts/-examples/functions.sk @@ -34,22 +34,22 @@ command /appleexample: # Please note that self-calling functions can loop infinitely, so use with caution. # -function destroyOre(source: block) :: blocks: +function destroyGold(source: block) :: blocks: add {_source} to {_found::*} break {_source} naturally using an iron pickaxe loop blocks in radius 1 of {_source}: - loop-block is any ore + loop-block is tagged as minecraft block tag "gold_ores" break loop-block naturally using an iron pickaxe if {_found::*} does not contain loop-block: - add destroyOre(loop-block) to {_found::*} + add destroyGold(loop-block) to {_found::*} return {_found::*} command /oreexample: permission: skript.example.ore trigger: - if player's target block is any ore: + if the player's target block is tagged as minecraft block tag "gold_ores": send "Destroying all connected ore." - set {_found::*} to destroyOre(player's target block) + set {_found::*} to destroyGold(player's target block) send "Destroyed %size of {_found::*}% connected ores!" else: send "You must be looking at an ore block!" diff --git a/src/main/resources/scripts/-examples/loops.sk b/src/main/resources/scripts/-examples/loops.sk index 73765868c2c..fa2f8576673 100644 --- a/src/main/resources/scripts/-examples/loops.sk +++ b/src/main/resources/scripts/-examples/loops.sk @@ -68,7 +68,7 @@ command /anotherloopexample: loop blocks in radius 2 of player: loop-block is a chest - loop items of types ore and log: # Loop-block comes from the first loop, loop-item from the second. + loop the tag contents of minecraft item tag "logs": # Loop-block comes from the first loop, loop-item from the second. inventory of loop-block contains loop-item remove loop-item from the inventory of loop-block send "Destroyed a %loop-item%!" diff --git a/src/main/resources/scripts/-examples/options and meta.sk b/src/main/resources/scripts/-examples/options and meta.sk index 8d0e1c35955..a32cb7295a0 100644 --- a/src/main/resources/scripts/-examples/options and meta.sk +++ b/src/main/resources/scripts/-examples/options and meta.sk @@ -33,8 +33,8 @@ on join: # variables: - score::%player% = 100 - some variable = "Hello" + {score::%player%} = 100 + {some variable} = "Hello" command /variabletest: permission: skript.example.variables