Level: Make spawn protection always active regardless of op count (#2290)

I don't care if this matches PC behaviour or not. bugs.mojang.com is full of bug reports about this. Just search for "minecraft spawn protection not working" and you'll see what I mean.

If you want to disable spawn protection, actually disable it. This behaviour is something that most users are not aware of and find astonishing when they discover it.

This behaviour was copied from Minecraft PC, and it's nearly as unexpected there as it is here.

This commit reverses the stupidity done in eb0525e892219508d0c0e4602e835d5ddbacaf45.
This commit is contained in:
Dylan K. Taylor 2018-07-12 17:25:05 +01:00 committed by GitHub
parent 6a637d9099
commit 8aa8280a63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1627,7 +1627,7 @@ class Level implements ChunkManager, Metadatable{
$spawnLocation = $this->getSpawnLocation();
$s = new Vector2($spawnLocation->x, $spawnLocation->z);
if(count($this->server->getOps()->getAll()) > 0 and $t->distance($s) <= $distance){
if($t->distance($s) <= $distance){
return true;
}
}