Method getArea(someLocation) from Lands API may return null, which leads to a NullPointerException, bacause your code appears to be missing at least an if-statement at this position:
[15:02:46 WARN]: java.lang.NullPointerException: Cannot invoke "me.angeschossen.lands.api.land.Area.hasNaturalFlag(me.angeschossen.lands.api.flags.type.NaturalFlag)" because the return value of "me.angeschossen.lands.api.land.LandWorld.getArea(org.bukkit.Location)" is null
[15:02:46 WARN]: at AdvancedSeasons-1.1.5.jar//net.advancedplugins.as.impl.utils.hooks.plugins.LandsHook.canMobsSpawn(LandsHook.java:43)
[15:02:46 WARN]: at AdvancedSeasons-1.1.5.jar//net.advancedplugins.seasons.handlers.SeasonalMobsHandler.onMobSpawn(SeasonalMobsHandler.java:96)
[15:02:46 WARN]: at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor847.execute(Unknown Source)
[15:02:46 WARN]: at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77)
[15:02:46 WARN]: at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:81)
[15:02:46 WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
[15:02:46 WARN]: at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
[15:02:46 WARN]: at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126)
[15:02:46 WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615)
[15:02:46 WARN]: at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.callCreatureSpawnEvent(CraftEventFactory.java:790)
[15:02:46 WARN]: at org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory.doEntityAddEventCalling(CraftEventFactory.java:692)
[15:02:46 WARN]: at net.minecraft.server.level.WorldServer.addEntity(WorldServer.java:1719)
[15:02:46 WARN]: at net.minecraft.server.level.WorldServer.addFreshEntity(WorldServer.java:1626)
[15:02:46 WARN]: at net.minecraft.world.level.WorldAccess.lambda$addFreshEntityWithPassengers$0(WorldAccess.java:16)
[15:02:46 WARN]: at java.base/java.util.stream.Streams$StreamBuilderImpl.forEachRemaining(Streams.java:411)
[15:02:46 WARN]: at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
[15:02:46 WARN]: at net.minecraft.world.level.WorldAccess.addFreshEntityWithPassengers(WorldAccess.java:16)
[15:02:46 WARN]: at net.minecraft.world.level.SpawnerCreature.spawnCategoryForPosition(SpawnerCreature.java:301)
[15:02:46 WARN]: at net.minecraft.world.level.SpawnerCreature.spawnCategoryForChunk(SpawnerCreature.java:212)
[15:02:46 WARN]: at net.minecraft.world.level.SpawnerCreature.a(SpawnerCreature.java:182)
[15:02:46 WARN]: at net.minecraft.server.level.ChunkProviderServer.t(ChunkProviderServer.java:644)
[15:02:46 WARN]: at net.minecraft.server.level.ChunkProviderServer.a(ChunkProviderServer.java:496)
[15:02:46 WARN]: at net.minecraft.server.level.WorldServer.a(WorldServer.java:873)
[15:02:46 WARN]: at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1711)
[15:02:46 WARN]: at net.minecraft.server.dedicated.DedicatedServer.b(DedicatedServer.java:446)
[15:02:46 WARN]: at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:1512)
[15:02:46 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1214)
[15:02:46 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321)
[15:02:46 WARN]: at java.base/java.lang.Thread.run(Thread.java:1583)
Describe the bug
Method getArea(someLocation) from Lands API may return null, which leads to a NullPointerException, bacause your code appears to be missing at least an if-statement at this position:
How to reproduce
false
Screenshots / Videos
No response
Server Log
No response