mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
chore: check in PaperListener for consistency
This commit is contained in:
parent
98ee2d162b
commit
10d140b33c
@ -229,17 +229,17 @@ public class PaperListener implements Listener {
|
|||||||
Plot plot = location.getOwnedPlotAbs();
|
Plot plot = location.getOwnedPlotAbs();
|
||||||
if (plot == null) {
|
if (plot == null) {
|
||||||
EntityType type = event.getType();
|
EntityType type = event.getType();
|
||||||
|
// PreCreatureSpawnEvent **should** not be called for DROPPED_ITEM, just for the sake of consistency
|
||||||
|
if (type == EntityType.DROPPED_ITEM) {
|
||||||
|
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!area.isMobSpawning()) {
|
if (!area.isMobSpawning()) {
|
||||||
if (type == EntityType.PLAYER) {
|
if (type == EntityType.PLAYER) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (type == EntityType.DROPPED_ITEM) {
|
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
|
||||||
event.setShouldAbortSpawn(true);
|
|
||||||
event.setCancelled(true);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (type.isAlive()) {
|
if (type.isAlive()) {
|
||||||
event.setShouldAbortSpawn(true);
|
event.setShouldAbortSpawn(true);
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user