1c7

ItemGUI

1c7
Apr 30th, 2020
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.55 KB | None | 0 0
  1. options:
  2. P: &c&lITEMGUI&7
  3.  
  4. command /edit:
  5. trigger:
  6. if player's held item is not air:
  7. set {inv::%player's uuid%} to chest inventory with 3 rows named "{@P}&3 Item Editor"
  8. set slot 4 of {inv::%player's uuid%} to emerald named "&c&lINFO" with lore "&7TYPE:&3 %tool%" and "&7NAME: &3%name of player's tool%" and "&7LORE: &3%lore of player's tool%"
  9. set slot 11 of {inv::%player's uuid%} to glowstone dust named "&c&lRENAME" with lore "&7&oSelect this to rename your item."
  10. set slot 15 of {inv::%player's uuid%} to name tag named "&c&lEDIT LORE" with lore "&7&oSelect this to edit the lore your item."
  11. open {inv::%player's uuid%} to player
  12. else:
  13. send "{@P} Hold something to edit it!"
  14.  
  15. on inventory click:
  16. if player's current inventory = {inv::%player's uuid%}:
  17. close player's inventory
  18. cancel event
  19. if clicked slot is 11:
  20. set {itemgui::rename-event::%player's uuid%} to true
  21. send ""
  22. send "{@P}"
  23. send "&7> Please type in chat the &3&nnew name&7 for your item."
  24. send ""
  25. if clicked slot is 15:
  26. set {itemgui::editlore-event::%player's uuid%} to true
  27. send ""
  28. send "{@P}"
  29. send "&7> Please type in chat the &3&nlore number&7 for your item [1, 2, 3, 4 or 5]."
  30. send ""
  31.  
  32. on inventory close:
  33. delete {inv::%player's uuid%}
  34.  
  35. on chat:
  36. if {itemgui::rename-event::%player's uuid%} is set:
  37. cancel event
  38. delete {itemgui::rename-event::%player's uuid%}
  39. set name of player's held item to "&f%coloured message%"
  40. send "{@P} Your item's name has been set to &3""%coloured message%""&7!"
  41. else if {itemgui::editlore-event::%player's uuid%} is true:
  42. set {_m} to message parsed as number
  43. if {_m} is 1 or 2 or 3 or 4 or 5:
  44. cancel event
  45. set {itemgui::editlore-lore::%player's uuid%} to message parsed as integer
  46. set {itemgui::editlore2-event::%player's uuid%} to true
  47. send ""
  48. send "{@P}"
  49. send "&7> Please type in chat the &3&nlore text&7 for your item."
  50. send ""
  51. delete {itemgui::editlore-event::%player's uuid%}
  52. else:
  53. send "{@P} Invalid number."
  54. delete {itemgui::editlore-event::%player's uuid%}
  55. else if {itemgui::editlore2-event::%player's uuid%} is set:
  56. cancel event
  57. set line {itemgui::editlore-lore::%player's uuid%} of player's held item's lore to "&f%coloured message%"
  58. send "{@P} Your item's lore has been set to &3""%coloured message%""&7!"
  59. delete {itemgui::editlore2-event::%player's uuid%}
  60. delete {itemgui::editlore-lore::%player's uuid%}
Advertisement
Add Comment
Please, Sign In to add comment