mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +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();
|
||||||
if (!area.isMobSpawning()) {
|
// PreCreatureSpawnEvent **should** not be called for DROPPED_ITEM, just for the sake of consistency
|
||||||
if (type == EntityType.PLAYER) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (type == EntityType.DROPPED_ITEM) {
|
if (type == EntityType.DROPPED_ITEM) {
|
||||||
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
if (Settings.Enabled_Components.KILL_ROAD_ITEMS) {
|
||||||
event.setShouldAbortSpawn(true);
|
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (!area.isMobSpawning()) {
|
||||||
|
if (type == EntityType.PLAYER) {
|
||||||
|
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