#This command has a cooldown of 1 minute,
#meaning a player can only use it each minute.
#If a player tries to use it more than once in a minute,
#the cooldown message is shown

command /cake:
	description: Give the command sender some cake!
	cooldown: 1 minute
	cooldown message: You need to wait &l%remaining time% &rto use this command again!
	cooldown bypass: cake.nocooldown
	
	#See https://skriptlang.github.io/Skript/expressions.html#ExprCmdCooldownInfo for more info
	#on the expressions you can use in a cooldown message.
	
	trigger:
		if the player's inventory doesn't have space for cake:
			send "&cYou don't have space for cake in your inventory! :("
			cancel command cooldown 
	  		#This is used so the player doesn't have to wait 1 minute before
			#using the command again if they didn't have space for cake.
		else:
			give cake to the player
			send "Here you go!"
