ソースを参照

protect entities only on plots

Kajetan Johannes Hammerle 2 年 前
コミット
d79769e214
1 ファイル変更3 行追加1 行削除
  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)) {