options:
min.x: -250 #DO NOT TOUCH!
max.x: 250 #DO NOT TOUCH!
min.z: -250 #DO NOT TOUCH!
max.z: 250 #DO NOT TOUCH!
avoid: air or water block or lava block or stone block or sandstone block or mossy cobblestone block or dirt block
perm: sparx.wild #CHANGE TO YOUR PERMISSION!
cooldown: 1 second #CHANGE TO YOUR COOLDOWN! (Formats: second/s, minute/s, hour/s, day/s)
Command /wild:
permission: {@perm}
trigger:
set {_waited} to difference between {wild.%player%.lastused} and now
if {_waited} is less than {@cooldown}:
message "&7(&6!&7) &eYou must wait &6%difference between {@cooldown} and {_waited}% &ebefore using this command again."
stop
send "&7(&6!&7) &eTeleporting to the Wilderness." to player
send "&7(&6&lREMINDER&r&7) &6PvP &eis allowed in this area!" to player
wait 1 tick
send "&7(&6!&7) &eTeleporting in 3 Seconds."
wait 1 second
send "&7(&6!&7) &eTeleporting in 2 Seconds."
wait 1 second
send "&7(&6!&7) &eTeleporting in 1 Second."
wait 2 second
apply blindness 100 to player for 6 seconds
wait 1 tick
set {_loc::old} to player's location
while player's location is {_loc::old}:
set {_loc::new} to location at random number between {@min.x} and {@max.x}, 0, random number between {@min.z} and {@max.z}
loop blocks above {_loc::new}:
if loop-block and block above loop-block are air:
if block under loop-block is not {@avoid}:
set {_loc::new} to location of loop-block
teleport player to {_loc::new}
stop loop
wait 10 ticks
set {wild.%player%.lastused} to now