Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ------------------------------------------------
- # | NO LAVA SUICIDE by Iron Wolf Network |
- # | Written by /u/NightWolf105 |
- # | Thanks to D4mnx for debugging |
- # | Thanks to Sitris for testing |
- # | http://ironwolfmc.net |
- # ------------------------------------------------
- command /deathchest <text="toggle">:
- description: Enable/Disable/Toggle
- usage: /deathchest [enable/disable/toggle] defaults to toggle
- permission: skript.op
- trigger:
- if arg 1 is "disable":
- set {deathchest} to false
- message "<orange>Death chest disabled!"
- else if arg 1 is "enable":
- set {deathchest} to true
- message "<orange>Death chest enabled!"
- else if arg 1 is "toggle":
- if {deathchest} is true:
- set {deathchest} to false
- message "<orange>Death chest disabled!"
- else:
- set {deathchest} to true
- message "<orange>Death chest enabled!"
- on damage of player:
- if {deathchest} is true:
- if {pvptimer.%victim%} is 0:
- attacker is a player
- victim is a player
- set {pvptimer.%victim%} to 1
- wait 60 seconds
- set {pvptimer.%victim%} to 0
- on death of player:
- if {pvptimer.%player%} is 1:
- damage was caused by lava, fire or burning:
- set {_tempinventory} to the player's inventory
- set {_templocation} to the block below the player
- set block 1 meter north of {_templocation} to Chest
- set block at {_templocation} to Chest
- set the inventory of the block at {_templocation} to {_tempinventory}
- clear drops
- on player respawn:
- if {deathchest} is true:
- clear the player's inventory
- set {pvptimer.%player%} to 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement