Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import:
- org.bukkit.Bukkit
- on load:
- set {Essentials} to Bukkit.getPluginManager().getPlugin("Essentials")
- expression [essentials] worth of %item%:
- get:
- return {Essentials}.getWorth().getPrice({Essentials}, expression-1) ? 0
- on sign change:
- if line 1 of event-block is "SellChest":
- set {_item} to line 2 of event-block parsed as item
- if {_item} is a item:
- set {_num} to line 3 of event-block parsed as number
- if {_num} is a number:
- set line 1 of event-block to "&8[&4Sell&cChest&8]"
- else:
- send "&cLine &a3&e of your &6SellChest &eis not a number! Try again."
- break event-block
- else:
- send "&cLine &a2&e of your &6SellChest &eis not an item! Try again."
- break event-block
- on rightclick on sign:
- if line 1 of event-block is "&8[&4Sell&cChest&8]":
- set {_item} to line 2 of event-block parsed as item
- set {_amount} to line 3 of event-block parsed as number
- loop all blocks in radius 1 around event-block:
- if loop-value is chest or trapped chest:
- if loop-value contains {_amount} of {_item}:
- broadcast "&e There are &d%{_amount}% &epieces/blocks of &d%{_item}% &ein this &4Sell&cChest!"
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement