Files
uzimaxhard_enchant_gui.sk
Code
1 77
uzimaxhard_enchant_gui.sk
options:
prefix: &6[UzimaXHard]&r
gui-title: &8Enchantowanie przedmiotu
command /enchantgui:
permission: uzimaxhard.enchantgui
permission message: {@prefix} &cNie masz uprawnień do tej komendy.
trigger:
if player's tool is air:
send "{@prefix} &cTrzymaj przedmiot w ręce, aby otworzyć GUI." to player
stop
set {ugui.item::%uuid of player%} to player's tool
set {ugui.slot::%uuid of player%} to player's held item slot
set {_gui} to chest inventory with 3 rows named "{@gui-title}"
set slot 10 of {_gui} to enchanted book named "&cOstrość I"
set slot 11 of {_gui} to enchanted book named "&7Pogromca nieumarłych I"
set slot 12 of {_gui} to enchanted book named "&7Zmora stawonogów I"
set slot 13 of {_gui} to enchanted book named "&7Odrzut I"
set slot 14 of {_gui} to enchanted book named "&6Zaklęty ogień I"
set slot 15 of {_gui} to enchanted book named "&eGrabież I"
set slot 16 of {_gui} to enchanted book named "&fNiezniszczalność I"
set slot 19 of {_gui} to enchanted book named "&bOchrona I"
set slot 20 of {_gui} to enchanted book named "&cOchrona przed ogniem I"
set slot 21 of {_gui} to enchanted book named "&6Ochrona przed wybuchem I"
set slot 22 of {_gui} to enchanted book named "&3Ochrona przed pociskami I"
set slot 23 of {_gui} to enchanted book named "&bAksamitny dotyk I"
set slot 24 of {_gui} to enchanted book named "&aWydajność I"
set slot 25 of {_gui} to enchanted book named "&eSzczęście I"
set slot 26 of {_gui} to enchanted book named "&fJedwabny dotyk I"
open {_gui} to player
on inventory click:
if name of player's current inventory is "{@gui-title}":
cancel event
if clicked inventory is player's inventory:
stop
if {ugui.item::%uuid of player%} is not set:
stop
if clicked slot is 10:
enchant {ugui.item::%uuid of player%} with sharpness 1
else if clicked slot is 11:
enchant {ugui.item::%uuid of player%} with smite 1
else if clicked slot is 12:
enchant {ugui.item::%uuid of player%} with bane of arthropods 1
else if clicked slot is 13:
enchant {ugui.item::%uuid of player%} with knockback 1
else if clicked slot is 14:
enchant {ugui.item::%uuid of player%} with fire aspect 1
else if clicked slot is 15:
enchant {ugui.item::%uuid of player%} with looting 1
else if clicked slot is 16:
enchant {ugui.item::%uuid of player%} with unbreaking 1
else if clicked slot is 19:
enchant {ugui.item::%uuid of player%} with protection 1
else if clicked slot is 20:
enchant {ugui.item::%uuid of player%} with fire protection 1
else if clicked slot is 21:
enchant {ugui.item::%uuid of player%} with blast protection 1
else if clicked slot is 22:
enchant {ugui.item::%uuid of player%} with projectile protection 1
else if clicked slot is 23:
enchant {ugui.item::%uuid of player%} with feather falling 1
else if clicked slot is 24:
enchant {ugui.item::%uuid of player%} with efficiency 1
else if clicked slot is 25:
enchant {ugui.item::%uuid of player%} with fortune 1
else if clicked slot is 26:
enchant {ugui.item::%uuid of player%} with silk touch 1
else:
stop
set slot {ugui.slot::%uuid of player%} of player's inventory to {ugui.item::%uuid of player%}
send "{@prefix} &aDodano enchantment poziomu I do przedmiotu." to player
on inventory close:
if name of event-inventory is "{@gui-title}":
delete {ugui.item::%uuid of player%}
delete {ugui.slot::%uuid of player%}