Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. import:
  2. org.bukkit.Bukkit
  3.  
  4. on load:
  5. set {Essentials} to Bukkit.getPluginManager().getPlugin("Essentials")
  6.  
  7. expression [essentials] worth of %item%:
  8. get:
  9. return {Essentials}.getWorth().getPrice({Essentials}, expression-1) ? 0
  10.  
  11. on sign change:
  12. if line 1 of event-block is "SellChest":
  13. set {_item} to line 2 of event-block parsed as item
  14. if {_item} is a item:
  15. set {_num} to line 3 of event-block parsed as number
  16. if {_num} is a number:
  17. set line 1 of event-block to "&8[&4Sell&cChest&8]"
  18. else:
  19. send "&cLine &a3&e of your &6SellChest &eis not a number! Try again."
  20. break event-block
  21. else:
  22. send "&cLine &a2&e of your &6SellChest &eis not an item! Try again."
  23. break event-block
  24. on rightclick on sign:
  25. if line 1 of event-block is "&8[&4Sell&cChest&8]":
  26. set {_item} to line 2 of event-block parsed as item
  27. set {_amount} to line 3 of event-block parsed as number
  28. loop all blocks in radius 1 around event-block:
  29. if loop-value is chest or trapped chest:
  30. if loop-value contains {_amount} of {_item}:
  31. broadcast "&e There are &d%{_amount}% &epieces/blocks of &d%{_item}% &ein this &4Sell&cChest!"
  32. stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement