## Run by prisoners
## Run from custom_endermen.dialogue file
## @s = ldz:ender_charger, ldz:ender_chef, ldz:ender_gardener, ldz:ender_hydro

event entity @s set_barrier_sensor_to_false
event entity @s set_spawn_target_to_true

scoreboard objectives remove PrisonerID
scoreboard objectives add PrisonerID dummy

execute as @s[family=ender_charger] run scoreboard players set .var PrisonerID 1
execute as @s[family=ender_chef] run scoreboard players set .var PrisonerID 2
execute as @s[family=ender_gardener] run scoreboard players set .var PrisonerID 3
execute as @s[family=ender_hydro] run scoreboard players set .var PrisonerID 4