Only stop players from building

At a later point in the code it stop executing if an mplayer is not found. Altough it might not get that far because it might throw an error when tring to get an mplayer for a creeper or another entity.
This commit is contained in:
Magnus Ulf 2020-01-16 23:54:56 +01:00
parent 8437a05660
commit 664e173860

View File

@ -95,6 +95,7 @@ public class EnginePermBuild extends Engine
public static Boolean build(Entity entity, Block block, Event event)
{
if (!(event instanceof Cancellable)) return true;
if (MUtil.isntPlayer(entity)) return false;
boolean verboose = !isFake(event);
return protect(ProtectCase.BUILD, verboose, entity, PS.valueOf(block), block, (Cancellable) event);
}