Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on script load:
- load yaml "plugins/Systeme/Rezeptemessages.yml" as "Recipemessage"
- on script load:
- load yaml "plugins/Systeme/RezepteIDS.yml" as "RecipesIDS"
- set {_RecipeitemIDs::*} to yaml nodes with keys "Items.All." from "RecipesIDS"
- loop {_RecipeitemIDs::*}:
- set {_id} to loop-value
- load yaml "plugins/Systeme/Rezepte/%{_id}%.yml" as "%{_id}%"
- set {_shape} to yaml value "Items.All.%{_id}%.Shape" in "%{_id}%"
- set {_group} to yaml value "Items.All.%{_id}%.Group" in "%{_id}%"
- if {_shape} is "Ofen", "Smoker" or "Campfire":
- set {_resulte} to yaml value "Items.All.%{_id}%.Result" in "%{_id}%"
- set {_needed} to yaml value "Items.All.%{_id}%.Needed" in "%{_id}%"
- set {_exp} to yaml value "Items.All.%{_id}%.Exp" in "%{_id}%"
- set {_kochzeit} to yaml value "Items.All.%{_id}%.Kochzeit" in "%{_id}%"
- if {_shape} is "Ofen":
- register new furnace recipe for {_resulte} using {_needed} with id "%{_id}%" and with exp {_exp} and with cook time {_kochzeit}
- else if {_shape} is "Campfire":
- register new Campfire recipe for {_resulte} using {_needed} with id "%{_id}%" and with exp {_exp} and with cook time {_kochzeit}
- else if {_shape} is "Smoker":
- register new smoker recipe for {_resulte} using {_needed} with id "%{_id}%" and with exp {_exp} and with cook time {_kochzeit}
- if {_shape} is "Stonecutter":
- set {_result} to yaml value "Items.All.%{_id}%.Result" in "%{_id}%"
- set {_needed} to yaml value "Items.All.%{_id}%.Needed" in "%{_id}%"
- register stone cutter recipe for {_result} using {_needed} with id {_id} in group {_group}
- set {_result} to yaml value "Items.All.%{_id}%.Result" from "%{_id}%"
- set {_needed::*} to yaml nodes with keys "Items.All.%{_id}%.Slots." from "%{_id}%"
- set {_shape} to yaml value "Items.All.%{_id}%.Shape" in "%{_id}%"
- loop {_needed::*}:
- set {_slots::%loop-index-2 parsed as integer%} to yaml value "Items.All.%{_id}%.Slots.%loop-value-2%" from "%{_id}%"
- if {_shape} is "Shaped":
- register new shaped recipe for {_result} using {_slots::*} with id "%{_id}%" in group "%{_group}%"
- else if {_shape} is "Shapeless":
- register new shapeless recipe for {_result} using {_slots::*} with id "%{_id}%" in group "%{_group}%"
- wait a tick
- unload yaml "%{_id}%"
- import:
- org.bukkit.event.inventory.InventoryType
- org.bukkit.Bukkit
- function RecipeMenu(p: player):
- set metadata tag "RezepteMenĂź" of {_p} to chest inventory with 3 rows named "&cRezepte-MenĂź"
- open metadata tag "RezepteMenĂź" of {_p} to {_p}
- set slot (integers from 0 to 27) of {_p}'s current inventory to gray stained glass pane named " "
- set slot 10 of {_p}'s current inventory to crafting table named "&cShape/Shaped Erstellen"
- set slot 11 of {_p}'s current inventory to furnace named "&6Ofen Rezepte"
- set slot 12 of {_p}'s current inventory to smoker named "&bSmoker Rezepte"
- set slot 13 of {_p}'s current inventory to campfire named "&eCampfire Rezepte"
- set slot 14 of {_p}'s current inventory to stonecutter named "&3Stonecutter Rezepte"
- set slot 17 of {_p}'s current inventory to feather named "&cAuflisten"
- function CraftingRecipe(p: player):
- set slot (integers from 0 to 54) of {_p}'s current inventory to gray stained glass pane named " "
- set slot 10,11,12,19,20,21,28,29 and 30 of {_p}'s current inventory to air
- set slot 24 of {_p}'s current inventory to air
- set slot 42 of {_p}'s current inventory to lime dye named "&eBestätigen"
- set slot 49 of {_p}'s current inventory to name tag named "&cID: &6-" with lore "&7Mich anklicken, um eine ID zu erstellen!"
- set slot 50 of {_p}'s current inventory to chest named "&6Gruppe: &6-" with lore "&7Mich anklicken, um eine Gruppe auszuwählen!"
- set slot 36 of {_p}'s current inventory to bucket named "&eShaped"
- set slot 37 of {_p}'s current inventory to grass block named "&eShapeless"
- function FireCreationGui(p: player):
- set slot (integers from 0 to 54) of {_p}'s current inventory to gray stained glass pane named " "
- set slot 20 of {_p}'s current inventory to air
- set slot 24 of {_p}'s current inventory to air
- set slot 42 of {_p}'s current inventory to lime dye named "&eBestätigen"
- set slot 49 of {_p}'s current inventory to anvil named "&cID: &6-" with lore "&7Mich anklicken, um eine ID zu erstellen!"
- set slot 36 of {_p}'s current inventory to bottle o' enchanting named "&eErfahrung"
- set slot 37 of {_p}'s current inventory to furnace named "&eKochzeit &c(in Sekunden)"
- #------------------------------------------------
- expression id of recipe for %player%:
- return type: string
- get:
- set {_id::*} to split uncoloured name of slot 49 of expr-1's current inventory at " "
- return {_id::2}
- expression group of recipe for %player%:
- return type: string
- get:
- set {_id::*} to split uncoloured name of slot 50 of expr-1's current inventory at " "
- return {_id::2}
- expression current recipe page of %player%:
- return type: integer
- get:
- set {_page::*} to split uncoloured line 1 of lore of slot 49 of expr-1's current inventory at " "
- set {_page::*} to split {_page::2} at "/"
- return {_page::1} parsed as integer
- expression ingredient list for recipe %string% for %player%:
- return type: item
- get:
- if expr-1 is "Shape/Shaped":
- set {_list::*} to slot 10,11,12,19,20,21,28,29 and 30 of expr-2's current inventory
- return {_list::*}
- expression cooking time of recipe for %player%:
- return type: string
- get:
- set {_id::*} to split uncoloured name of slot 37 of expr-1's current inventory at " "
- return {_id::2}
- expression experience of recipe for %player%:
- return type: string
- get:
- set {_id::*} to split uncoloured name of slot 36 of expr-1's current inventory at " "
- return {_id::2}
- #------------------------------------------------
- effect save oldgui of %player%:
- trigger:
- set metadata tag "OldGUI" of expr-1 to expr-1's current inventory
- loop integers from 0 to 54:
- set {_d} to slot loop-number of expr-1's current inventory
- set slot loop-number of metadata tag "OldGUI" of expr-1 to {_d}
- effect open anvil ID inventory for %player%:
- trigger:
- set metadata tag "AnvilID" of expr-1 to true
- set {_inv} to Bukkit.createInventory(expr-1 and InventoryType.ANVIL)
- expr-1.openInventory({_inv})
- wait a tick
- set {_packet} to new play_server_set_slot packet
- set int field 0 of {_packet} to expr-1.getHandle().activeContainer.windowId
- set int field 1 of {_packet} to 0
- set itemstack field 0 of {_packet} to paper named " "
- send packet {_packet} to expr-1
- delete {packet::cInv.%expr-1%}
- effect save recipe with result %item% and ingredients %items% and shape %string% and id %string% [in group %-string%]:
- trigger:
- load yaml "plugins/Systeme/RezepteIDS.yml" as "RecipesIDS"
- load yaml "plugins/Systeme/Rezepte/%expr-4%.yml" as "%expr-4%"
- set yaml value "Items.All.%expr-4%" in "RecipesIDS" to expr-4
- set yaml value "Items.All.%expr-4%.Shape" in "%expr-4%" to expr-3
- set yaml value "Items.All.%expr-4%.Group" in "%expr-4%" to expr-5 if expr-5 is not "-"
- set {_ingredients::*} to exprs-2
- loop {_ingredients::*}:
- set yaml value "Items.All.%expr-4%.Slots.%loop-index parsed as integer%" in "%expr-4%" to loop-value
- set yaml value "Items.All.%expr-4%.Result" in "%expr-4%" to expr-1
- save yaml "%expr-4%"
- save yaml "RecipesIDS"
- effect open recipe gui with id %string% to %player% [edit mode %-boolean%]:
- trigger:
- set {_id} to expr-1
- set {_player} to expr-2
- set {_editmode} to expr-3 ? false
- load yaml "plugins/Systeme/Rezepte/%{_id}%.yml" as "%{_id}%"
- set {_result} to yaml value "Items.All.%{_id}%.Result" from "%{_id}%"
- set {_shape} to yaml value "Items.All.%{_id}%.Shape" from "%{_id}%"
- if {_shape} is "shaped" or "shapeless":
- loop 9 times:
- set {_Ingredients::%loop-number%} to yaml value "Items.All.%{_id}%.Slots.%loop-number%" from "%{_id}%"
- if {_editmode} is false:
- set metadata tag "ShowRecipe" of {_player} to chest inventory with 6 rows named "&cRezepte"
- set slot (integers from 0 to 54) of metadata tag "ShowRecipe" of {_player} to gray stained glass pane named " "
- set slot 24 of metadata tag "ShowRecipe" of {_player} to {_result}
- set {_slots::*} to 10,11,12,19,20,21,28,29 and 30
- loop {_slots::*}:
- set slot loop-value of metadata tag "ShowRecipe" of {_player} to {_Ingredients::%loop-index parsed as integer%}
- open metadata tag "ShowRecipe" of {_player} to {_player}
- else:
- set metadata tag "&cShape/Shaped Erstellen" of {_player} to chest inventory with 6 rows named "&cShape/Shaped Erstellen"
- open metadata tag "&cShape/Shaped Erstellen" of {_player} to {_player}
- CraftingRecipe({_player})
- set {_group} to yaml value "Items.All.%{_id}%.Group" from "%{_id}%"
- set slot 24 of {_player}'s current inventory to {_result}
- set slot 49 of {_player}'s current inventory to name tag named "&cID: &6%{_id}%"
- set slot 50 of {_player}'s current inventory to chest named "&6Gruppe: &6%{_group}%"
- set {_slots::*} to 10,11,12,19,20,21,28,29 and 30
- loop {_slots::*}:
- set slot loop-value of {_player}'s current inventory to {_Ingredients::%loop-index parsed as integer%}
- if {_shape} is "shaped":
- set {_slot} to 36
- else:
- set {_slot} to 37
- enchant slot {_slot} of {_player}'s current inventory with unbreaking 1
- else:
- set {_c} to "&6" if {_shape} is "Ofen"
- set {_c} to "&b" if {_shape} is "Smoker"
- set {_c} to "&e" if {_shape} is "Campfire"
- set {_c} to "&3" if {_shape} is "Stonecutter"
- open chest inventory with 6 rows named colored "%{_c}%%{_shape}% Rezepte" to {_player}
- if {_shape} is not "Stonecutter":
- FireCreationGui({_player})
- set {_ingredient} to yaml value "Items.All.%{_id}%.Needed" in "%{_id}%"
- set {_exp} to yaml value "Items.All.%{_id}%.Exp" in "%{_id}%"
- set {_koch} to yaml value "Items.All.%{_id}%.Kochzeit" in "%{_id}%"
- set slot 24 of {_player}'s current inventory to {_result}
- set slot 20 of {_player}'s current inventory to {_ingredient}
- set slot 49 of {_player}'s current inventory to name tag named "&cID: &6%{_id}%"
- set name of slot 37 of {_player}'s current inventory to "&6Kochzeit: %{_koch}%"
- set name of slot 36 of {_player}'s current inventory to "&aErfahrung: %{_exp}%"
- else:
- StoneCutterCreationGui({_player})
- set {_ingredient} to yaml value "Items.All.%{_id}%.Needed" in "%{_id}%"
- set {_exp} to yaml value "Items.All.%{_id}%.Exp" in "%{_id}%"
- set {_ingredient} to yaml value "Items.All.%{_id}%.Needed" in "%{_id}%"
- set {_result} to yaml value "Items.All.%{_id}%.Result" in "%{_id}%"
- set {_group} to yaml value "Items.All.%{_id}%.Group" in "%{_id}%"
- set slot 20 of {_player}'s current inventory to {_ingredient}
- set slot 24 of {_player}'s current inventory to {_result}
- set slot 49 of {_player}'s current inventory to name tag named "&cID: &6%{_id}%"
- set slot 50 of {_player}'s current inventory to chest named "&6Gruppe: &6%{_group}%"
- set slot 43 of {_player}'s current inventory to lava bucket
- unload yaml "%{_id}%"
- effect open recipes for %player% at page %string%:
- trigger:
- set {_expr2} to expr-2 parsed as integer
- set {_page} to 36*{_expr2}
- set {_from} to {_page}-36
- set {_NextPageItem} to yaml value "GUI.ItemNextPage" from "Recipemessage"
- set {_NextPreviousItem} to yaml value "GUI.ItemPreviousPage" from "Recipemessage"
- set {_NextMainItem} to yaml value "GUI.ItemMainPage" from "Recipemessage"
- load yaml "plugins/Systeme/RezepteIDS.yml" as "RecipesIDS"
- set {_RecipeitemIDs::*} to yaml nodes with keys "Items.All." from "RecipesIDS"
- set {_size} to size of {_RecipeitemIDs::*}
- set {_maxPage} to ceil({_size}/36)
- loop {_RecipeitemIDs::*}:
- set {_id} to uncoloured loop-value
- load yaml "plugins/Systeme/Rezepte/%{_id}%.yml" as "%{_id}%"
- set {_shape} to yaml value "Items.All.%{_id}%.Shape" in "%{_id}%"
- set {_group} to yaml value "Items.All.%{_id}%.Group" in "%{_id}%" ? """"
- set {_Itesms::%loop-index parsed as integer%} to yaml value "Items.All.%{_id}%.Result" from "%{_id}%"
- add "{ID:%{_id}%}" to nbt of {_Itesms::%loop-index parsed as integer%}
- add "{Group:%{_group}%}" to nbt of {_Itesms::%loop-index parsed as integer%}
- add "{Shape:%{_shape}%}" to nbt of {_Itesms::%loop-index parsed as integer%}
- unload yaml "%{_id}%"
- if metadata tag "Auflisten" of expr-1 is set:
- set {_x} to -1
- loop integers from 0 to 35:
- set slot loop-number of expr-1's current inventory to air
- loop integers between {_from} and {_page}:
- set slot {_x} of current inventory of expr-1 to {_Itesms::%loop-number%}
- add 1 to {_x}
- set line 1 of lore of slot 49 of expr-1's current inventory to "&6Seite: &c%{_expr2}%&7/&6%{_maxPage}%"
- else:
- set metadata tag "Auflisten" of expr-1 to chest inventory with 6 rows named "&cAuflisten"
- open metadata tag "Auflisten" of expr-1 to expr-1
- set slot 36,37,38,39,40,41,42,43, and 44 of expr-1's current inventory to red stained glass pane named " "
- set {_x} to -1
- loop integers between {_from} and {_page}:
- set slot {_x} of current inventory of expr-1 to {_Itesms::%loop-number%}
- add 1 to {_x}
- set line 1 of lore of slot 49 of expr-1's current inventory to "&6Seite: &c%{_expr2}%&7/&6%{_maxPage}%"
- set slot 49 of expr-1's current inventory to {_NextMainItem} with lore "&6Seite: &c%{_expr2}%&7/&6%{_maxPage}%"
- set slot 50 of expr-1's current inventory to {_NextPageItem} if {_maxPage} > {_expr2}
- set slot 48 of expr-1's current inventory to {_NextPreviousItem} if {_expr2} > 1
- on inventory click:
- metadata tag "Auflisten" of player is set
- slot 49 of event-inventory = a cake
- cancel event
- if index of event-slot = 50:
- set {_page} to (current recipe page of player)+1
- open recipes for player at page "%{_page}%"
- else if index of event-slot = 49:
- open recipes for player at page "1"
- else if index of event-slot = 48:
- {_page::1} != 1
- set {_page} to (current recipe page of player)-1
- open recipes for player at page "%{_page}%"
- else:
- if index of event-slot != 36,37,38,39,40,41,42,43 or 44:
- set {_id} to tag "ID" of nbt of event-slot
- open recipe gui with id {_id} to player edit mode true
- #------------------------------------------------
- on packet event play_client_item_name:
- metadata tag "AnvilID" of event-player is true
- set {ID::%player%} to string field 0 of event-packet
- on inventory click:
- type of event-inventory = anvil inventory
- index of event-slot = 2
- metadata tag "AnvilID" of player is true
- delete metadata tag "AnvilID" of player
- open metadata tag "OldGUI" of player to player
- set slot {slot} of player's current inventory to {slotitem} named "%{text}% %{ID::%player%}%"
- delete {slot} and {slotitem}, {text} and {ID::%player%}
- delete metadata tag "OldGUI" of player
- #-------------------------------------------------
- command rezepte [<text>]:
- permission: *
- trigger:
- RecipeMenu(player)
- function StoneCutterCreationGui(p: player):
- set slot (integers from 0 to 54) of {_p}'s current inventory to gray stained glass pane named " "
- set slot 20 of {_p}'s current inventory to air
- set slot 24 of {_p}'s current inventory to air
- set slot 42 of {_p}'s current inventory to lime dye named "&eBestätigen"
- set slot 49 of {_p}'s current inventory to name tag named "&cID: &6-" with lore "&7Mich anklicken, um eine ID zu erstellen!"
- set slot 50 of {_p}'s current inventory to chest named "&6Gruppe: &6-" with lore "&7Mich anklicken, um eine Gruppe auszuwählen"
- on inventory click:
- #RezepteMenĂźAuswahlWelchesRezept
- if event-inventory is metadata tag "RezepteMenĂź" of player:
- cancel event
- if index of event-slot is 10,11,12,13,14 or 17:
- set {_guiName} to name of event-slot
- set metadata tag "%{_guiName}%" of player to chest inventory with 6 rows named "%{_guiName}%"
- open metadata tag "%{_guiName}%" of player to player
- delete metadata tag "RezepteMenĂź" of player
- if {_guiName} is "&cShape/Shaped Erstellen":
- CraftingRecipe(player)
- else if {_guiName} is "&cAuflisten":
- open recipes for player at page "1"
- else if {_guiName} is "&6Ofen Rezepte", "&bSmoker Rezepte" or "&eCampfire Rezepte":
- FireCreationGui(player)
- else if {_guiName} is "&3Stonecutter Rezepte":
- StoneCutterCreationGui(player)
- #CraftingRecipe
- else if event-inventory is metadata tag "&cShape/Shaped Erstellen" of player:
- cancel event if index of event-slot is not 10,11,12,19,20,21,28,29,30 or 24
- #setshape/shapeless
- if index of event-slot is 36 or 37:
- disenchant slot 36 of event-inventory
- disenchant slot 37 of event-inventory
- enchant event-slot with unbreaking 1
- else if index of event-slot is 49:
- save oldgui of player
- set {text} to colored "&cID:"
- set {slot} to 49
- set {slotitem} to name tag
- open anvil ID inventory for player
- else if index of event-slot = 42:
- #get shape
- if slot 36 of event-inventory is enchanted with unbreaking 1:
- set {_shape} to "shaped"
- else:
- set {_shape} to "shapeless"
- #getingredients
- set {_ingredients::*} to ingredient list for recipe "Shape/Shaped" for player
- #getresult
- set {_result} to slot 24 of event-inventory
- #getid
- set {_id} to id of recipe for player
- #getgroup
- set {_group} to group of recipe for player
- save recipe with result {_result} and ingredients {_ingredients::*} and shape {_shape} and id {_id} in group {_group}
- close player's inventory
- else if index of event-slot = 50:
- save oldgui of player
- set {slot} to 50
- set {slotitem} to chest
- set {text} to colored "&6Gruppe:"
- open anvil ID inventory for player
- else if index of event-slot = 43:
- set {_id} to id of recipe for player
- load yaml "plugins/Systeme/RezepteIDS.yml" as "RecipesIDS"
- delete yaml value "Items.All.%{_id}%" from "RecipesIDS"
- load yaml "plugins/Systeme/Rezepte/%{_id}%.yml" as "%{_id}%"
- delete yaml "%{_id}%"
- save yaml "plugins/Systeme/Rezepte/"
- save yaml "RecipesIDS"
- unload yaml "%{_id}%"
- unload yaml "RecipesIDS"
- open recipes for player at page "1"
- else if event.getView().getTitle() is "&6Ofen Rezepte", "&bSmoker Rezepte" or "&eCampfire Rezepte":
- event-inventory != player's inventory
- event-slot != air
- index of event-slot != 20 or 24
- cancel event
- if index of event-slot is 49:
- save oldgui of player
- set {text} to colored "&cID:"
- set {slot} to 49
- set {slotitem} to name tag
- open anvil ID inventory for player
- else if index of event-slot is 36:
- save oldgui of player
- set {text} to colored "&aErfahrung:"
- set {slot} to 36
- set {slotitem} to bottle o' enchanting
- open anvil ID inventory for player
- else if index of event-slot is 37:
- save oldgui of player
- set {text} to colored "&6Kochzeit:"
- set {slot} to 37
- set {slotitem} to furnace
- open anvil ID inventory for player
- else if index of event-slot is 42:
- set {_ingredient} to slot 20 of event-inventory
- set {_result} to slot 24 of event-inventory
- set {_id} to id of recipe for player
- set {_kochzeit} to cooking time of recipe for player
- set {_erfahrung} to experience of recipe for player
- set {_shape::*} to uncoloured event.getView().getTitle() split at " "
- set {_shape} to {_shape::1}
- load yaml "plugins/Systeme/RezepteIDS.yml" as "RecipesIDS"
- set yaml value "Items.All.%{_id}%" in "RecipesIDS" to {_id}
- load yaml "plugins/Systeme/Rezepte/%{_id}%.yml" as "%{_id}%"
- set yaml value "Items.All.%{_id}%.Result" in "%{_id}%" to {_result}
- set yaml value "Items.All.%{_id}%.Shape" in "%{_id}%" to {_shape}
- set yaml value "Items.All.%{_id}%.Needed" in "%{_id}%" to {_ingredient}
- set yaml value "Items.All.%{_id}%.Exp" in "%{_id}%" to {_erfahrung}
- set yaml value "Items.All.%{_id}%.Kochzeit" in "%{_id}%" to "%{_kochzeit}% seconds" parsed as timespan
- save yaml "%{_id}%"
- save yaml "RecipesIDS"
- unload yaml "%{_id}%"
- close player's inventory
- else if index of event-slot = 43:
- set {_id} to id of recipe for player
- load yaml "plugins/Systeme/RezepteIDS.yml" as "RecipesIDS"
- delete yaml value "Items.All.%{_id}%" from "RecipesIDS"
- load yaml "plugins/Systeme/Rezepte/%{_id}%.yml" as "%{_id}%"
- delete yaml "%{_id}%"
- save yaml "plugins/Systeme/Rezepte/"
- save yaml "RecipesIDS"
- unload yaml "%{_id}%"
- unload yaml "RecipesIDS"
- open recipes for player at page "1"
- else if event.getView().getTitle() is "&3Stonecutter Rezepte":
- event-inventory != player's inventory
- event-slot != air
- index of event-slot != 20 or 24
- cancel event
- if index of event-slot is 49:
- save oldgui of player
- set {text} to colored "&cID:"
- set {slot} to 49
- set {slotitem} to name tag
- open anvil ID inventory for player
- else if index of event-slot = 50:
- save oldgui of player
- set {slot} to 50
- set {slotitem} to chest
- set {text} to colored "&6Gruppe:"
- open anvil ID inventory for player
- else if index of event-slot is 42:
- set {_ingredient} to slot 20 of event-inventory
- set {_result} to slot 24 of event-inventory
- set {_id} to id of recipe for player
- set {_group} to group of recipe for player
- set {_shape::*} to uncoloured event.getView().getTitle() split at " "
- set {_shape} to {_shape::1}
- load yaml "plugins/Systeme/RezepteIDS.yml" as "RecipesIDS"
- set yaml value "Items.All.%{_id}%" in "RecipesIDS" to {_id}
- load yaml "plugins/Systeme/Rezepte/%{_id}%.yml" as "%{_id}%"
- set yaml value "Items.All.%{_id}%.Result" in "%{_id}%" to {_result}
- set yaml value "Items.All.%{_id}%.Shape" in "%{_id}%" to {_shape}
- set yaml value "Items.All.%{_id}%.Needed" in "%{_id}%" to {_ingredient}
- set yaml value "Items.All.%{_id}%.Group" in "%{_id}%" to {_group}
- save yaml "%{_id}%"
- save yaml "RecipesIDS"
- unload yaml "%{_id}%"
- close player's inventory
- else if index of event-slot = 43:
- set {_id} to id of recipe for player
- load yaml "plugins/Systeme/RezepteIDS.yml" as "RecipesIDS"
- delete yaml value "Items.All.%{_id}%" from "RecipesIDS"
- load yaml "plugins/Systeme/Rezepte/%{_id}%.yml" as "%{_id}%"
- delete yaml "%{_id}%"
- save yaml "plugins/Systeme/Rezepte/"
- save yaml "RecipesIDS"
- unload yaml "%{_id}%"
- unload yaml "RecipesIDS"
- close player's inventory
- open recipes for player at page "1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement