From 664e173860195350c2d4ebf78ba95a67f0675168 Mon Sep 17 00:00:00 2001 From: Magnus Ulf Date: Thu, 16 Jan 2020 23:54:56 +0100 Subject: [PATCH] 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. --- src/com/massivecraft/factions/engine/EnginePermBuild.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/massivecraft/factions/engine/EnginePermBuild.java b/src/com/massivecraft/factions/engine/EnginePermBuild.java index 4ffc7b0f..84b17c36 100644 --- a/src/com/massivecraft/factions/engine/EnginePermBuild.java +++ b/src/com/massivecraft/factions/engine/EnginePermBuild.java @@ -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); }