Created by Slaim36

Just so you know, we don't know the file format for every file. If it's just a bunch of random characters, it's probably a .zip or .jar.

#  ---------------------
#   30Timers by Slaim36
#  ---------------------

	#The seconds to wait to drop a random item
	seconds: 3
	#What will appear in each player's chat when receiving a random item
	onDropMessage: &aYour random item: \item
	#true = shows how many seconds are left in an action bar. False = nothing is displayed
	announceSecondsInActionBar: true
	actionBarMessage: &aRandom item in \seconds seconds
on join:
	if {30timers::getrandomitem::%player%} is not set:
		set {30timers::getrandomitem::%player%} to true
command /togglerandomitems:
	permission: 30timers.togglerandomitems
		if {30timers::getrandomitem::%player%} is true:
			set {30timers::getrandomitem::%player%} to false
			set {30timers::getrandomitem::%player%} to true
on load:
	set {30timers::seconds} to {@seconds}
every second:
	remove 1 from {30timers::seconds}
	loop all players:
		set {_actionBarMessage::*} to "{@actionBarMessage}"
		replace all "\seconds" with "%{30timers::seconds}%" in {_actionBarMessage::*}
		send action bar "%{_actionBarMessage::*}%" to loop-player
	if {30timers::seconds} is 0:
		set {30timers::seconds} to {@seconds}
		loop all players:
			if {30timers::getrandomitem::%loop-player%} is true:
				set {_item} to 1 of random items out of all items
				set {_onDropMessage::*} to "{@onDropMessage}"
				replace all "\item" with "%{_item}%" in {_onDropMessage::*}
				send "%{_onDropMessage::*}%" to loop-player
				if loop-player has enough space for {_item}:
					give loop-player {_item}
					drop {_item} at loop-player's position