C Since it is the correct code for protection in PM4, I am doing this but it does not protect at all if ($spawn->distance($ev->getBlock()->getPosition()) < 100) { but it doesn't work or protect, can someone tell me what I'm doing wrong?
var_dump the distance to console and see what the values are when code is being executed. Debug this way. Not to be mean, but how is that not the obvious way to do it?