Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /protectedores [<text>] [<text>]:
- permission: skript.op
- usage: /protectedores <enable/disable> <cutclean? true/false>
- trigger:
- if arg-1 is "on" or "enable" or "start":
- if {ProtectedOres} is true:
- message "&aProtectedOres is already enabled."
- else:
- set {ProtectedOres} to true
- broadcast "&aProtectedOres enabled."
- if arg-1 is "off" or "disable" or "stop":
- if {ProtectedOres} is false:
- message "&cProtectedOres is already disabled."
- else:
- set {ProtectedOres} to false
- broadcast "&cProtectedOres disabled."
- if arg-2 is "true" or "on":
- set {cutclean} to true
- if arg-2 is "false" or "off":
- set {cutclean} to false
- if arg-2 is not set:
- set {cutclean} to false
- command /myores [<player>]:
- trigger:
- if {ProtectedOres} is true:
- if player-argument is set:
- player is an op
- player-argument is online
- open player-argument's ender chest to the player
- if player-argument is not set:
- open the player's ender chest to the player
- else:
- message "&cProtectedOres is disabled." to the player
- command /poclear [<player>]:
- permission: skript.op
- trigger:
- if {ProtectedOres} is true:
- if player-argument is set:
- clear player-argument's ender chest
- message "&b%player-argument%'s ProtectedOres emptied."
- else:
- loop all players:
- clear loop-player's ender chest
- broadcast "&bAll ProtectedOres emptied."
- else:
- message "&cProtectedOres is disabled." to the player
- on death:
- if {ProtectedOres} is true:
- set {_ender} to the victim's ender chest
- set {_deathloc} to the block below the player
- set the block at {_deathloc} to a chest
- set the inventory of the block at {_deathloc} to {_ender}
- set {_signloc} to the location 1 meter south of {_deathloc}
- set the block at {_signloc} to a wall sign
- set line 1 of the block at {_signloc} to "================="
- set line 2 of the block at {_signloc} to "%victim%'s"
- set line 3 of the block at {_signloc} to "ProtectedOres"
- set line 4 of the block at {_signloc} to "================="
- clear victim's ender chest
- message "&bYour ProtectedOres has been emptied." to the victim
- on mine of diamond ore:
- if {ProtectedOres} is true:
- add 1 diamond to player's enderchest
- on mine of gold ore:
- if {ProtectedOres} is true:
- if {cutclean} is true:
- add 1 gold ingot to player's enderchest
- else:
- add 1 gold ore to player's enderchest
- on mine of iron ore:
- if {ProtectedOres} is true:
- if {cutclean} is true:
- add 1 iron ingot to player's enderchest
- else:
- add 1 iron ore to player's enderchest
- on pickup:
- item is a diamond
- add 1 diamond to player's enderchest
- on pickup:
- item is a gold ingot
- add 1 gold ingot to player's enderchest
- on pickup:
- item is a iron ingot
- add 1 iron ingot to player's enderchest
Advertisement
Add Comment
Please, Sign In to add comment