run function death.mcfunction not working
hello, this is my first datapack im trying to make. what i am trying to make is a permadeath screen, that doesnt boot you out of the server immediately. the intended effect is that with the immediateRespawn gamerule enabled, when you die, you will instantly be teleported to the end dimension which is a void, because it wouldnt be in use in the minecraft server anyway, as a sort of temporary death dimension. while in the end, it would apply blindness and slowness for a pitch black screen, and then print the titles announcing you have died. shortly there after, it should run another function to ban the player.
Right now i am completely stumped. in the current state when i test and /reload, inEnd is always 1, deathDone is always 1 and deathFlag is always 3 for some inexplicable reason. i inserted a debug objective creation into the death.mcfunction but the objective is never made. i have absolutely zero idea why it is not working. i hope you can replicate this behaviour i keep getting.