Ver código fonte

protect entities only on plots

Kajetan Johannes Hammerle 2 anos atrás
pai
commit
d79769e214
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      src/me/hammerle/kp/plots/PlotEvents.java

+ 3 - 1
src/me/hammerle/kp/plots/PlotEvents.java

@@ -82,7 +82,9 @@ public class PlotEvents {
         } else if(direct instanceof Player) {
             p = (Player) direct;
         } else {
-            e.setCancelled(true);
+            if(WorldPlotMap.hasPlotAt(e.getEntity().getLocation())) {
+                e.setCancelled(true);
+            }
             return;
         }
         if(!canBypass(p) && !WorldPlotMap.canHitAmbientEntity(e.getEntity().getLocation(), p)) {