fix: npe thrown in entity spawn listener (#3399)

This commit is contained in:
Yannick Lamprecht 2021-12-27 11:01:28 +01:00 committed by GitHub
parent 2559c889e2
commit 9f4af889f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -75,8 +75,7 @@ public class EntitySpawnListener implements Listener {
public static void testCreate(final Entity entity) {
@NonNull World world = entity.getWorld();
if (areaName.equals(world.getName())) {
} else {
if (!world.getName().equals(areaName)) {
areaName = world.getName();
hasPlotArea = PlotSquared.get().getPlotAreaManager().hasPlotArea(areaName);
}