mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-07 09:45:09 +01:00
Tweak item drop check
This commit is contained in:
parent
73d0068d07
commit
c5d5b52df4
@ -8,6 +8,7 @@ import com.intellectualcrafters.plot.object.Plot;
|
|||||||
import com.intellectualcrafters.plot.object.PlotArea;
|
import com.intellectualcrafters.plot.object.PlotArea;
|
||||||
import com.plotsquared.bukkit.util.BukkitUtil;
|
import com.plotsquared.bukkit.util.BukkitUtil;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
|
import org.bukkit.entity.EntityType;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
import org.bukkit.event.Listener;
|
import org.bukkit.event.Listener;
|
||||||
@ -27,7 +28,16 @@ public class EntitySpawnListener implements Listener {
|
|||||||
Plot plot = area.getOwnedPlotAbs(location);
|
Plot plot = area.getOwnedPlotAbs(location);
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
if (!area.MOB_SPAWNING) {
|
if (!area.MOB_SPAWNING) {
|
||||||
if (event.getEntityType().isAlive() || !area.MISC_SPAWN_UNOWNED) {
|
EntityType type = entity.getType();
|
||||||
|
switch (type) {
|
||||||
|
case DROPPED_ITEM:
|
||||||
|
if (Settings.Enabled_Components.KILL_ROAD_MOBS) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case PLAYER:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (type.isAlive() || !area.MISC_SPAWN_UNOWNED) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user