diff --git a/src/main/resources/scripts/-examples/chest menus.sk b/src/main/resources/scripts/-examples/chest menus.sk new file mode 100644 index 00000000000..42de70edfe3 --- /dev/null +++ b/src/main/resources/scripts/-examples/chest menus.sk @@ -0,0 +1,62 @@ + +# +# An example of opening a chest inventory with an item. +# Players will be able to take the item out. +# + +command /simplechest: + permission: skript.example.chest + trigger: + set {_chest} to a new chest inventory named "Simple Chest" + set slot 0 of {_chest} to apple # Slots are numbered 0, 1, 2... + open {_chest} to player + +# +# An example of listening for click events in a chest inventory. +# This can be used to create fancy button-style interfaces for users. +# + +command /chestmenu: + permission: skript.example.menu + trigger: + set {_menu} to a new chest inventory with 1 row named "Simple Menu" + set slot 4 of {_menu} to stone named "Button" # Slots are numbered 0, 1, 2... + open {_menu} to player + +on inventory click: # Listen for players clicking in an inventory. + name of event-inventory is "Simple Menu" # Make sure it's our menu. + cancel event + if index of event-slot is 4: # The button slot. + send "You clicked the button." + else: + send "You didn't click the button." + +# +# An example of making and filling a fancy inventory with a function. +# This demonstrates another way you can use chest inventories, and a safe way of listening to specific ones. +# + +aliases: + menu items = TNT, lava bucket, string, coal, oak planks + +function makeMenu(name: text, rows: number) :: inventory: + set {_gui} to a new chest inventory with {_rows} rows with name {_name} + loop {_rows} * 9 times: # Fill the inventory with random items. + set slot loop-number - 1 of {_gui} to random item out of menu items + return {_gui} + +command /fancymenu: + permission: skript.example.menu + trigger: + set {_menu} to makeMenu("hello", 4) + add {_menu} to {my inventories::*} # Prepare to listen to this inventory. + open {_menu} to player + +on inventory click: # Listen for players clicking in any inventory. + if {my inventories::*} contains event-inventory: # Make sure it's our menu. + cancel event + send "You clicked slot %index of event-slot%!" + +on inventory close: # No longer need to listen to this inventory. + {my inventories::*} contains event-inventory + remove event-inventory from {my inventories::*} diff --git a/src/main/resources/scripts/-examples/commands.sk b/src/main/resources/scripts/-examples/commands.sk new file mode 100644 index 00000000000..303eb2ee70b --- /dev/null +++ b/src/main/resources/scripts/-examples/commands.sk @@ -0,0 +1,71 @@ + +# +# A very simple `broadcast` command for broadcasting the text argument. +# This is accessible only to users with the `skript.example.broadcast` permission. +# + +command /broadcast : + permission: skript.example.broadcast + description: Broadcasts a message to everybody. + trigger: + broadcast arg-text + +# +# A simple /home command that allows players to set, remove and travel to homes. +# This command is executable only by players, and has a `correct usage` message. +# The first argument is required, whereas the second is optional. +# + +command /home []: + description: Set, delete or travel to your home. + usage: /home set/remove , /home + permission: skript.example.home + executable by: players + trigger: + if arg-1 is "set": + if arg-2 is set: + set {homes::%uuid of player%::%arg-2%} to player's location + send "Set your home %arg-2% to %location of player%" to player + else: + send "You must specify a name for this home." to player + else if arg-1 is "remove": + if arg-2 is set: + delete {homes::%uuid of player%::%arg-2%} + send "Deleted your home %arg-2%" to player + else: + send "You must specify the name of this home." to player + else if arg-2 is set: + send "Correct usage: /home set/remove " to player + else if {homes::%uuid of player%::%arg-1%} is set: + teleport player to {homes::%uuid of player%::%arg-1%} + else: + send "You have no home named %arg-1%." to player + +# +# An /item command that accepts Skript item aliases. +# E.g. `/item birch plank, 5 red wool and 17 iron ore` +# This command has aliases - alternative versions of the command that can be used. +# + +aliases: + # Creates an alias `blacklisted` for this list of items. + blacklisted = TNT, bedrock, obsidian, mob spawner, lava, lava bucket + +command /item : + description: Give yourself some items. + usage: /item + aliases: /i + executable by: players + permission: skript.example.item + cooldown: 30 seconds + cooldown message: You need to wait %remaining time% to use this command again. + cooldown bypass: skript.example.cooldown + trigger: + if player has permission "skript.example.item.all": + give argument to player + else: + loop argument: + if loop-item is not blacklisted: + give loop-item to player + else: + send "%loop-item% is blacklisted and cannot be spawned." to player diff --git a/src/main/resources/scripts/-examples/events.sk b/src/main/resources/scripts/-examples/events.sk new file mode 100644 index 00000000000..45fbfb2a7d5 --- /dev/null +++ b/src/main/resources/scripts/-examples/events.sk @@ -0,0 +1,44 @@ + +# +# This example listens for players joining and leaving. +# Alters the default message when they do. +# + +on join: + set the join message to "Oh look, %player% joined! :)" + +on quit: + set the quit message to "Oh no, %player% left! :(" + +# +# This example cancels damage for players if they have a specific permission. +# If they don't, tell them how much damage they took. +# + +on damage: + victim is a player + if the victim has permission "skript.example.damage": + cancel the event # Stops the default behaviour - the victim taking damage. + else: + send "Ouch! You took %damage% damage." to the victim + add damage to {damage::%uuid of victim%::taken} + if the attacker is a player: + add damage to {damage::%uuid of attacker%::dealt} + +# +# This example allows players to wear specified blocks as hats. +# Listens for the clicking in the head slot and, if the player has permission, puts the item on their head. +# + +aliases: # An alias for our allowed hat items. + custom helmets = iron block, gold block, diamond block + +on inventory click: + event-slot is the helmet slot of player # Check that player clicked their head slot. + inventory action is place all or nothing + player has permission "skript.example.helmet" + cursor slot of player is custom helmets # Check if the item is in our custom alias. + cancel the event + set {_old helmet} to the helmet of player + set the helmet of player to the cursor slot of player + set the cursor slot of player to {_old helmet} diff --git a/src/main/resources/scripts/-examples/functions.sk b/src/main/resources/scripts/-examples/functions.sk new file mode 100644 index 00000000000..bb743a075dd --- /dev/null +++ b/src/main/resources/scripts/-examples/functions.sk @@ -0,0 +1,55 @@ + +# +# A simple broadcasting function example. +# This demonstrates how to declare and run a simple function. +# + +function sayMessage(message: text): + broadcast {_message} # our message argument is available in `{_message}`. + +on first join: + wait 1 second + sayMessage("Welcome, %player%!") # Runs the `sayMessage` function. + +# +# An example of a function with multiple parameters and a return type. +# This demonstrates how to return a value and use it. +# + +function giveApple(name: text, amount: number) :: item: + set {_item} to an apple + set the name of {_item} to {_name} + set the item amount of {_item} to {_amount} + return {_item} # Gives this value to the code that called the function. + +command /appleexample: + permission: skript.example.apple + trigger: + send "Giving you an apple!" + set {_item} to giveApple("Banana", 4) + give player {_item} + +# +# An example of a recursive (self-calling) function that is used to repeat a complex task. +# Please note that self-calling functions can loop infinitely, so use with caution. +# + +function destroyOre(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 + break loop-block naturally using an iron pickaxe + if {_found::*} does not contain loop-block: + add destroyOre(loop-block) to {_found::*} + return {_found::*} + +command /oreexample: + permission: skript.example.ore + trigger: + if player's target block is any ore: + send "Destroying all connected ore." + set {_found::*} to destroyOre(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 new file mode 100644 index 00000000000..73765868c2c --- /dev/null +++ b/src/main/resources/scripts/-examples/loops.sk @@ -0,0 +1,75 @@ + +# +# Examples for two basic loops: one will run a set number of times, the other will run for all elements in a list. +# Multi-value expressions like `all players` can also be looped. +# + +command /loopexample: + permission: skript.example.loop + trigger: + set {_number} to 5 + loop {_number} times: # Runs `{_number}` times. + send "The number is %loop-number%." + + set {_list::*} to "apple", "banana" and "orange" + loop {_list::*}: # Runs for each value in the list. + send "The word is: %loop-value%" + +# +# Examples for while-loops, which run as long as the condition is true. +# A while-loop can run indefinitely and freeze the server, so make sure to add a delay or an exit condition. +# + +command /whileexample: + permission: skript.example.while + trigger: + set {_number} to 5 + while {_number} is greater than 0: + send "The number is %{_number}%" + remove a random number between 0 and 2 from {_number} + send "Finished counting down." + + while true is true: # this will run forever + add "banana" to {_list::*} + if size of {_list::*} is 10: + exit loop + send "The list has %size of {_list::*}% bananas." + +command /dowhileexample: + permission: skript.example.dowhile + trigger: + set {_number} to a random integer between 0 and 6 # The player will get 1 to 3 apples. + do while {_number} is greater than 3: # This will always run at least once, even if `{_number} is less than or equal to 3`. + give the player an apple + remove 1 from {_number} + send "Finished giving out apples!" + + do while true is false: # This will run once - the condition is checked AFTER the code is executed. + send "I will run only once!" + +# +# Examples for looping collections of specific types, such as players, blocks and items. +# This shows how loops can be used to simplify more complex actions. +# + +command /anotherloopexample: + permission: skript.example.loop + trigger: + send "Listing all players:" + loop all players: # Remember - player is the command sender, loop-player is the loop value. + send " - %loop-player%" + if loop-player has permission "skript.example.apple": + give loop-player an apple named "Potato" + + set {_items::*} to stone, oak planks and an apple + loop {_items::*}: + send "%loop-index%. %loop-value%" + give loop-value to player + + 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. + inventory of loop-block contains loop-item + remove loop-item from the inventory of loop-block + send "Destroyed a %loop-item%!" + exit loop # Exits the item loop. diff --git a/src/main/resources/scripts/-examples/options and meta.sk b/src/main/resources/scripts/-examples/options and meta.sk new file mode 100644 index 00000000000..8d0e1c35955 --- /dev/null +++ b/src/main/resources/scripts/-examples/options and meta.sk @@ -0,0 +1,44 @@ + +# +# A simple example of using an option to make a common value accessible through the file. +# + +options: + my server name: Server Name + condition: player is alive + nice message: "You're alive!" + +on join: + send "Welcome to {@my server name}" + # Options don't need `%...%` since they are raw inputs. + if {@condition}: # The raw `player is alive` is copied here during parsing. + send {@nice message} + +# +# An example of custom aliases for groups of items. +# This can be used as a shorthand in code. +# + +aliases: + pretty items = iron ingot, gold ingot, diamond + +on join: + player has permission "skript.example.aliases" + give player random item out of pretty items # A random item from our alias. + +# +# An example showing how default variables can be used. +# These are seen the first time they are loaded, but not overwritten if you change the file copy. +# They act like default variable values. +# + +variables: + score::%player% = 100 + some variable = "Hello" + +command /variabletest: + permission: skript.example.variables + trigger: + add 1 to {score::%player%} + send "Your score is now %{score::%player%}%." + send {some variable} diff --git a/src/main/resources/scripts/-examples/text formatting.sk b/src/main/resources/scripts/-examples/text formatting.sk new file mode 100644 index 00000000000..8a5a1ab277a --- /dev/null +++ b/src/main/resources/scripts/-examples/text formatting.sk @@ -0,0 +1,38 @@ +# +# This example is for colours and formatting in Skript. +# Skript allows the old-style Minecraft codes using `&`, like &0 for black and &l for bold. +# You can also use <> for colours and formats, like `` for red and `` for bold +# +# In Minecraft 1.16, support was added for 6-digit hexadecimal colors to specify custom colors other than the 16 default color codes. +# The tag for these colors looks like this: <##hex code> e.g. `<##123456>` +# + +command /color: + permission: skript.example.color + trigger: + send "&6This message is golden." + send "This message is light red and bold." + send "<##FF0000>This message is red." + +# +# Other formatting options are also available. +# You can create clickable text, which opens a website or execute a command, or even show a tool tip when hovering over the text. +# + +command /forum: + permission: skript.example.link + trigger: + send "To visit the website, [click here]" + +command /copy : + permission: skript.example.copy + trigger: + # Insertion: when the player shift clicks on the message, it will add the text to their text box. + # To use variables and other expressions with these tags, you have to send the text as `formatted`. + send formatted "%arg-1%" + +command /suggest: + permission: skript.example.suggest + trigger: + send "Click here to run the command /say hi" + send "Click here to suggest the command /say hi" diff --git a/src/main/resources/scripts/-examples/timings.sk b/src/main/resources/scripts/-examples/timings.sk new file mode 100644 index 00000000000..18073095e5e --- /dev/null +++ b/src/main/resources/scripts/-examples/timings.sk @@ -0,0 +1,36 @@ +# +# This example schedules a repeating action to be run at a time in the *minecraft* world. +# Every minecraft day at 6 PM, the time is reset to 7 AM, making it always day. +# + +at 18:00: + set the time to 7:00 + +# +# This example schedules a repeating action. Each time the delay elapses, the trigger will be run. +# The delay is in real-world time. +# + +every 5 minutes: + broadcast "Did you know that five minutes have passed?" + loop all players: + if loop-player has permission "skript.example.apple": + give loop-player an apple + +# +# This example shows how the `wait` effect can be used to delay code being run. +# + +command /waitexample: + permission: skript.example.wait + trigger: + send "Waiting for two seconds..." + wait 2 seconds + send "Finished waiting!" + + send "Counting to five." + set {_count} to 0 + while {_count} is less than 5: + wait 3 ticks # Minecraft game ticks: 20 ticks = 1 second. + add 0.5 to {_count} + send "Finished counting!" diff --git a/src/main/resources/scripts/-examples/variables.sk b/src/main/resources/scripts/-examples/variables.sk new file mode 100644 index 00000000000..a39061e1230 --- /dev/null +++ b/src/main/resources/scripts/-examples/variables.sk @@ -0,0 +1,53 @@ + +# +# This example stores a time-stamp in the global `{timer}` variable. +# This variable is accessible everywhere, and will be saved when the server stops. +# +# The `{_difference}` variable is local and is different for each use of the command. +# + +command /timer: + permission: skript.example.timer + trigger: + if {timer} is set: + send "This command was last run %time since {timer}% ago." + else: + send "This command has never been run." + set {timer} to now + +# +# This example stores two items in a global list variable `{items::%uuid of player%::*}`. +# These items can then be recalled with the example `/outfit` command, which then clears the list. +# + +on join: + set {items::%uuid of player%::helmet} to player's helmet + set {items::%uuid of player%::boots} to player's boots + send "Stored your helmet and boots." + +command /outfit: + executable by: players + permission: skript.example.outfit + trigger: + give player {items::%uuid of player%::*} # gives the contents of the list + clear {items::%uuid of player%::*} # clears this list + send "Gave you the helmet and boots you joined with." + +# +# An example of adding, looping and removing the contents of a list variable. +# This list variable is local, and so will not be kept between uses of the command. +# + +command /shoppinglist: + permission: skript.example.list + trigger: + add "bacon" to {_shopping list::*} + add "eggs" to {_shopping list::*} + add "oats" and "sugar" to {_shopping list::*} + send "You have %size of {_shopping list::*}% things in your shopping list:" + loop {_shopping list::*}: + send "%loop-index%. %loop-value%" + send "You bought some %{_shopping list::1}%!" + remove "bacon" from {_shopping list::*} + send "Removing bacon from your list." + send "You now have %size of {_shopping list::*}% things in your shopping list." diff --git a/src/main/resources/scripts/command with cooldown.sk b/src/main/resources/scripts/command with cooldown.sk deleted file mode 100644 index bdd38c7e255..00000000000 --- a/src/main/resources/scripts/command with cooldown.sk +++ /dev/null @@ -1,23 +0,0 @@ -#This command has a cooldown of 1 minute, -#meaning a player can only use it each minute. -#If a player tries to use it more than once in a minute, -#the cooldown message is shown - -command /cake: - description: Give the command sender some cake! - cooldown: 1 minute - cooldown message: You need to wait &l%remaining time% &rto use this command again! - cooldown bypass: cake.nocooldown - - #See https://skriptlang.github.io/Skript/expressions.html#ExprCmdCooldownInfo for more info - #on the expressions you can use in a cooldown message. - - trigger: - if the player's inventory doesn't have space for cake: - send "&cYou don't have space for cake in your inventory! :(" - cancel command cooldown - #This is used so the player doesn't have to wait 1 minute before - #using the command again if they didn't have space for cake. - else: - give cake to the player - send "Here you go!" diff --git a/src/main/resources/scripts/custom helmet.sk b/src/main/resources/scripts/custom helmet.sk deleted file mode 100644 index c65488e4914..00000000000 --- a/src/main/resources/scripts/custom helmet.sk +++ /dev/null @@ -1,22 +0,0 @@ -# -# Allows specified items to be used as helmets for survival players (Minecraft 1.9 recommended). -# - -aliases: - custom helmets = iron block, gold block, diamond block # Change this to anything you'd like - -on inventory click: - inventory action is place all or nothing - cursor slot of player is custom helmets # Check if item is allowed as helmet - event-slot is helmet slot of event-player # Check that player clicked the helmet - cancel the event - set {_old helmet} to helmet of player # Store old helmet - set helmet of player to cursor slot of player # Set new helmet to item in player's cursor - set cursor slot of player to {_old helmet} # Set player's cursor to old helmet, possibly air - -on right click: - tool of player is custom helmets - helmet of player is air - cancel the event - set helmet of player to tool of player - set tool of player to air diff --git a/src/main/resources/scripts/disable weather.sk b/src/main/resources/scripts/disable weather.sk deleted file mode 100644 index ad841ef859e..00000000000 --- a/src/main/resources/scripts/disable weather.sk +++ /dev/null @@ -1,6 +0,0 @@ -# -# Disables rain & thunder in all worlds -# - -on weather change to rain or thunder: - cancel event diff --git a/src/main/resources/scripts/eternal day.sk b/src/main/resources/scripts/eternal day.sk deleted file mode 100644 index a71d3b4eb9c..00000000000 --- a/src/main/resources/scripts/eternal day.sk +++ /dev/null @@ -1,6 +0,0 @@ -# -# Makes eternal day in all worlds by setting each world's time to morning in the evening. -# - -at 18:00: - set time to 7:00 diff --git a/src/main/resources/scripts/furnace automatisation.sk b/src/main/resources/scripts/furnace automatisation.sk deleted file mode 100644 index 9643da934a0..00000000000 --- a/src/main/resources/scripts/furnace automatisation.sk +++ /dev/null @@ -1,38 +0,0 @@ -# -# This script automates furnaces. -# They store smelted items and restock/refuel automatically from surrounding chests -# But only as long as they have fuel and something to smelt, and there's storage space for the smelted items, -# I.e. if a furnace stops burning it won't resume automatically, but has to be lit manually again. -# - -options: - # radius: in which radius chest should be searched. - # Putting a small radius is recommended as it increases performance and prevents furnaces from taking items out of chests behind walls or otherwise hidden chests. - # Some recommended values: - # 1: only chests direcly next to the furnace are affected - # 1.5: chests diaginally adjacent (i.e. which touch the furnace with one edge) are affected as well - # 1.75: all surrounding chests in a 3x3x3 cube are affected - radius: 1 - -aliases: - fuel = coal, coal ore, coal block, any wooden tool - -on smelt: - loop blocks in radius {@radius}: - loop-block is chest - if ore slot of block is empty: - loop items of types ore and log: - inventory of loop-block contains loop-item - remove loop-item from inventory of loop-block - set ore of event-block to loop-item - exit loop - if fuel slot of block is empty: - loop items in inventory of loop-block: - loop-item is fuel - remove 1 of loop-item from inventory of loop-block - set fuel of event-block to 1 of loop-item - exit loop - if result slot of block is not empty: - loop-block can hold result of event-block - add result of event-block to loop-block - clear result of event-block \ No newline at end of file diff --git a/src/main/resources/scripts/homes.sk b/src/main/resources/scripts/homes.sk deleted file mode 100644 index cd1bc99a796..00000000000 --- a/src/main/resources/scripts/homes.sk +++ /dev/null @@ -1,30 +0,0 @@ -# -# A simple home script which allows players with the permission 'skript.home' to -# define a home location with /sethome, delete a home with /delhome and teleport to that location whenever they want to with /home. -# - -command /sethome : - description: Sets your home - permission: skript.home - executable by: players - trigger: - set {homes::%uuid of player%::%arg-1%} to location of player - message "Set your home %arg-1% to %location of player%" - -command /delhome : - description: Deletes your home - permission: skript.home - executable by: players - trigger: - clear {homes::%uuid of player%::%arg-1%} - message "Deleted your home %arg-1%" - -command /home : - description: Teleports yourself to your home - permission: skript.home - executable by: players - trigger: - if {homes::%uuid of player%::%arg-1%} is not set: - message "You have not set your home %arg-1% yet!" - else: - teleport player to {homes::%uuid of player%::%arg-1%} \ No newline at end of file diff --git a/src/main/resources/scripts/item command.sk b/src/main/resources/scripts/item command.sk deleted file mode 100644 index 94ecb74e6de..00000000000 --- a/src/main/resources/scripts/item command.sk +++ /dev/null @@ -1,64 +0,0 @@ -# -# Two /item commands that accept aliases as arguments and are thus extremely versatile. -# E.g. you can use the command like "/item birch plank, 5 red wool and 17 iron ore" and you will receive all 3. -# If you add translated aliases to your aliases.sk your players will be able to use those aliases as well. -# -# Please note that an argument accepts enchantments as well, and only the second example command -# in this script restricts spawing of enchanted items. -# - -aliases: - # Items that the user cannot give himself - blacklisted = TNT, bedrock, obsidian, mob spawner, lava, lava bucket - -# This version of the command requires that the player has the permission skript.give, -# and blacklisted items are only allowed if the player has the permission skript.give.bypassblacklist -command /item : - description: Give yourself some items - usage: /item - aliases: i - executable by: players - permission: skript.give - trigger: - if player has permission "skript.give.bypassblacklist": - give arguments to player - else: - loop arguments: - if loop-item is not blacklisted: - give loop-item to player - else: - message "%loop-item% is blacklisted and thus cannot be spawned" - -# This version of the command checks whether the player has permission to spawn the desired item. -# A player needs the "skript.give." permission to spawn an item of the desired type -# and the permission "skript.give.enchanted" to spawn enchanted items. -command /item2 : - description: Give yourself some items - usage: /item2 - aliases: i2 - executable by: players - permission: skript.give - trigger: - loop arguments: - if loop-item is enchanted: - if player does not have the permission "skript.give.enchanted": - message "You don't have permission to spawn enchanted items!" - stop - if player has permission "skript.give.%type of loop-item%": - give loop-item to player - else: - message "You don't have permission to spawn %loop-item%! (skript.give.%type of loop-item%)" - - -command /give to : - description: Give someone else some items - usage: /give to - permission: skript.give - trigger: - send "Giving %argument 1% to %argument 2%" to player - loop argument 1: - if player has permission "skript.give.%type of loop-item%": - give loop-item to argument 2 - send "You recieved %loop-item% from %player%" to argument 2 - else: - message "You don't have permission to give away free %loop-item%! (skript.give.%type of loop-item%)" diff --git a/src/main/resources/scripts/kill counter.sk b/src/main/resources/scripts/kill counter.sk deleted file mode 100644 index 20edb85de9e..00000000000 --- a/src/main/resources/scripts/kill counter.sk +++ /dev/null @@ -1,22 +0,0 @@ -# -# Counts kills per life, in total, and the highest kill streak. -# - -# Defaults are useful here, as a player's kills would be '' if he hasn't killed anything yet, -# but with defaults defined those will be used in that case. - -on death: - attacker is a player - add 1 to {kill counter::%uuid of attacker%::kills_total} - add 1 to {kill counter::%uuid of attacker%::kills_session} - if {kill counter::%uuid of attacker%::kills_session} > {kill counter::%uuid of attacker%::kills_session_max}: - set {kill counter::%uuid of attacker%::kills_session_max} to {kill counter::%uuid of attacker%::kills_session} - -on death of player: - set {kill counter::%uuid of player%::kills_session} to 0 - -command /kills: - executable by: players - trigger: - message "You have killed %{kill counter::%uuid of player%::kills_session}% mobs and players in this life out of %{kill counter::%uuid of player%::kills_total}% kills in total." - message "Your maximum kill streak is %{kill counter::%uuid of player%::kills_session_max}% kills in one life." diff --git a/src/main/resources/scripts/nerf endermen.sk b/src/main/resources/scripts/nerf endermen.sk deleted file mode 100644 index 1c35f4b31b6..00000000000 --- a/src/main/resources/scripts/nerf endermen.sk +++ /dev/null @@ -1,11 +0,0 @@ -# -# this simple file prevents endermen from modifying the landscape. -# You could also only restrict what they can/cannot take/place by adding a condition. -# - -on enderman pickup: - cancel event - -on enderman place: - cancel event - kill the enderman # kills endermen which were still carrying something when this trigger file was activated \ No newline at end of file diff --git a/src/main/resources/scripts/realistic drops.sk b/src/main/resources/scripts/realistic drops.sk deleted file mode 100644 index 88ba7ba2332..00000000000 --- a/src/main/resources/scripts/realistic drops.sk +++ /dev/null @@ -1,14 +0,0 @@ -# -# These triggers fix some drops. -# - -on break of glass: - drop glass - -on break of glass pane: - drop glass pane - -on break of bookshelf: - cancel event - set block to air - drop bookshelf diff --git a/src/main/resources/scripts/simple god mode.sk b/src/main/resources/scripts/simple god mode.sk deleted file mode 100644 index 48b23fab63b..00000000000 --- a/src/main/resources/scripts/simple god mode.sk +++ /dev/null @@ -1,8 +0,0 @@ -# -# Makes a player invulnerable if he has the permission 'skript.god' -# - -on damage: - victim is a player - victim has permission "skript.god" - cancel event diff --git a/src/main/resources/scripts/simple join and leave message.sk b/src/main/resources/scripts/simple join and leave message.sk deleted file mode 100644 index 7bd3a7f1d58..00000000000 --- a/src/main/resources/scripts/simple join and leave message.sk +++ /dev/null @@ -1,27 +0,0 @@ -# -# A join and leave message. -# - -command /set message : - permission: skript.set.join_message - description: Sets message when player joins - trigger: - if argument-1 is "join" or "leave": - set {custom messages::%argument-1%} to argument-2 - message "Set the %argument-1% message to '%argument-2%'" - else: - message "Only 'join' and 'leave' messages are available here." - -command /show message: - description: Displays the message of the day - trigger: - if {custom messages::%argument%} is set: - message {custom messages::%argument%} - else: - message "Only 'join' and 'leave' messages are available here." - -on join: - set join message to {custom messages::join} - -on quit: - set leave message to {custom messages::leave} \ No newline at end of file diff --git a/src/main/resources/scripts/simple motd.sk b/src/main/resources/scripts/simple motd.sk deleted file mode 100644 index 5f45b185f19..00000000000 --- a/src/main/resources/scripts/simple motd.sk +++ /dev/null @@ -1,23 +0,0 @@ -# -# A simple message of the day script. -# The MOTD can be set with the /setmotd command, -# and it will be sent to each player when they log in -# and when they use the /motd command. -# - -command /setmotd : - permission: skript.setmotd - description: Sets the message of the day - trigger: - message "Set the MOTD to '%argument%'" - set {motd} to argument - -command /showmotd: - description: Displays the message of the day - trigger: - message {motd} - -on join: - # uncomment the following line to make the MOTD appear after other messages - # wait a tick - message {motd} \ No newline at end of file diff --git a/src/main/resources/scripts/teleport with compass.sk b/src/main/resources/scripts/teleport with compass.sk deleted file mode 100644 index 0f23a8a12ff..00000000000 --- a/src/main/resources/scripts/teleport with compass.sk +++ /dev/null @@ -1,9 +0,0 @@ -# -# Allows players with the 'skript.teleport' permission to be able to teleport -# with a compass like in WorldEdit. -# - -on rightclick with compass: - loop blocks above targeted block: - teleport player to loop-block - stop trigger diff --git a/src/main/resources/scripts/vanilla gui.sk b/src/main/resources/scripts/vanilla gui.sk deleted file mode 100644 index 3868a32f8f1..00000000000 --- a/src/main/resources/scripts/vanilla gui.sk +++ /dev/null @@ -1,16 +0,0 @@ -# -# A vanilla example of a gui creation using Skript only -# Requires Skript 2.3+ -# - -command /gui: - trigger: - set {_gui} to a new chest inventory with 6 row with name "Gui Test" - set slot 0 of {_gui} to stone - open {_gui} to player - -on inventory click: - if name of event-inventory is "Gui Test": - if index of event-slot = 0: - cancel event - send "You clicked on the slot 0 !" \ No newline at end of file