Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import:
- org.bukkit.event.inventory.InventoryClickEvent
- org.bukkit.event.player.PlayerLoginEvent
- org.bukkit.event.block.BlockBreakEvent
- options:
- Slot_0_Head: "{SkullOwner:{Id:""ee81faf1-e1f2-49f6-a034-6148217ba388"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvM2YyZDM4ZWZhZTFlMGE1ODFmMjU4YWEwOWNhNjEwNzQ5ZDNlZmRkZjU4NjUzMDRmMmZhMThiN2ExYTBjM2JjZCJ9fX0=""}]}}}"
- Slot_1_Head: "{SkullOwner:{Id:""ee81faf1-e1f2-49f6-a034-6148217ba388"",Properties:{textures:[{Value:""eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMzVmMzcxYWNhYTQ5YWI5YmMxZmQ3ZmU5ZTVjOGIxYTM1MTUxYTZiN2ZhZTc5OGM3YTg0MTE3OWVlODU3YmRjZCJ9fX0=""}]}}}"
- function Achievements(p: player):
- open chest inventory with 6 rows named "&6Achievements" to {_p}
- set {_UUID} to {_p}'s uuid
- set slot 0 of {_p}'s current inventory to player head with nbt compound from {@Slot_0_Head} named "&6Mining/Building"
- if {Achievements::1::%{_UUID}%::Tier} = 1:
- set slot 1 of {_p}'s current inventory to player head with nbt compound from {@Slot_1_Head} named "&6Profi Miner 1" with lore "&fAufgabe: Farme 20 Stein", "", "&fFortschritt: %{Achievements::1::%{_UUID}%::Tier::Progress}%/20"
- else if {Achievements::1::%{_UUID}%::Tier} = 2:
- set slot 1 of {_p}'s current inventory to player head with nbt compound from {@Slot_1_Head} named "&6Profi Miner 2" with lore "&fAufgabe: Farme 500 Stein", "", "&fFortschritt: %{Achievements::1::%{_UUID}%::Tier::Progress}%/500"
- command a:
- trigger:
- Achievements(player)
- on InventoryClickEvent:
- set {_p} to event.getWhoClicked()
- set {_slot} to event.getSlot()
- set {_UUID} to {_p}.getUniqueId()
- {_slot} != -999
- set {_invname} to event.getView().getTitle()
- #event.getClickedInventory() != {_p}.getInventory()
- {_invname} = "&6Achievements"
- event.setCancelled(true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement