script/phd_generator.rb
#Generates an execute command for the Player Head Drop function
#Returns Sting
Generates an execute command for the Player Head Drop function
Returns Sting
Generates an execute command for the Player Head Drop function Returns Sting
def genCommand user
	uuid = getUuid user
	if uuid != false
		texture = getTexture uuid
		command = "execute as @a[name="+user+",scores={phd.deaths=1..}] run give @a[scores={phd.kills=1..}] player_head{SkullOwner:{Id:\""+olduuid(uuid)+"\",Name:\""+user+"\",Properties:{textures:[{Value:\""+texture+"\"}]}}} 1"
		p "Command generated for "+user
	else
		command = "# User #{user} doesn't exist in Mojang's database"
		p command		
	end
	return command
end
def genCommand user uuid = getUuid user if uuid != false texture = getTexture uuid command = "execute as @a[name=" + user + ",scores={phd.deaths=1..}] run give @a[scores={phd.kills=1..}] player_head{SkullOwner:{Id:\"" + olduuid ( uuid ) + "\",Name:\"" + user + "\",Properties:{textures:[{Value:\"" + texture + "\"}]}}} 1" p "Command generated for " + user else command = "# User #{user} doesn't exist in Mojang's database" p command end return command end
Generates an execute command for the Player Head Drop function
Returns Sting
Generates an execute command for the Player Head Drop function Returns Sting
#display:{Name:\"{\\\"text\\\":\\\""+user+"'s Head\\\"}\"},
user