File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
multiworld-bukkit/src/main/java/com/dev7ex/multiworld/listener Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 33import com .dev7ex .multiworld .api .bukkit .MultiWorldBukkitApi ;
44import com .dev7ex .multiworld .api .bukkit .event .MultiWorldListener ;
55import com .dev7ex .multiworld .api .bukkit .world .BukkitWorldHolder ;
6+ import org .bukkit .entity .LivingEntity ;
67import org .bukkit .event .EventHandler ;
78import org .bukkit .event .EventPriority ;
89import org .bukkit .event .entity .EntitySpawnEvent ;
@@ -30,6 +31,10 @@ public void handleEntitySpawn(final EntitySpawnEvent event) {
3031 }
3132 final BukkitWorldHolder worldHolder = super .getWorldProvider ().getWorldHolder (worldName ).get ();
3233
34+ if (!(event .getEntity () instanceof LivingEntity )) {
35+ return ;
36+ }
37+
3338 event .setCancelled (!worldHolder .isSpawnEntities ());
3439 }
3540
You can’t perform that action at this time.
0 commit comments