Merge branch 'development'

This commit is contained in:
Christian Koop 2022-01-04 22:21:19 +01:00
commit 5747427e7d
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
2 changed files with 15 additions and 8 deletions

View File

@ -2,7 +2,7 @@
<groupId>com.songoda</groupId>
<artifactId>EpicSpawners</artifactId>
<modelVersion>4.0.0</modelVersion>
<version>7.2.0</version>
<version>7.2.1</version>
<build>
<defaultGoal>clean install</defaultGoal>
<finalName>EpicSpawners-${project.version}</finalName>
@ -103,35 +103,42 @@
<version>1.18-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.songoda</groupId>
<artifactId>SongodaCore</artifactId>
<version>2.6.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.songoda</groupId>
<artifactId>UltimateStacker</artifactId>
<version>LATEST</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.songoda</groupId>
<artifactId>EpicAnchors</artifactId>
<version>2.0.0-ALPHA</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>me.clip</groupId>
<artifactId>placeholderapi</artifactId>
<version>2.9.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.brcdev-minecraft</groupId>
<artifactId>shopgui-api</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.songoda</groupId>
<artifactId>Lootables</artifactId>

View File

@ -36,30 +36,30 @@ public class SpawnerSpawnTask extends BukkitRunnable {
try {
if (spawner.getWorld() == null
|| plugin.getBlacklistHandler().isBlacklisted(spawner.getWorld())
|| !spawner.getWorld().isChunkLoaded(spawner.getX() >> 4, spawner.getZ() >> 4)) return;
|| !spawner.getWorld().isChunkLoaded(spawner.getX() >> 4, spawner.getZ() >> 4)) continue;
if (spawner.getLocation().getBlock().getType() != CompatibleMaterial.SPAWNER.getMaterial()
|| !spawner.isValid()) {
spawner.destroy(plugin);
return;
continue;
}
if (spawner.getStackSize() == 0
|| (spawner.getPlacedBy() == null && Settings.DISABLE_NATURAL_SPAWNERS.getBoolean())
|| !spawner.checkConditions()) return;
|| !spawner.checkConditions()) continue;
CreatureSpawner cSpawner = spawner.getCreatureSpawner();
if (cSpawner == null) return;
if (cSpawner == null) continue;
int delay = spawner.getCreatureSpawner().getDelay();
delay = delay - Settings.CUSTOM_SPAWNER_TICK_RATE.getInt();
spawner.getCreatureSpawner().setDelay(delay);
if (delay >= 0) return;
if (delay >= 0) continue;
if (!spawner.spawn()) {
spawner.updateDelay();
}
} catch (Exception e) {
e.printStackTrace();
} catch (Exception ex) {
ex.printStackTrace();
}
}
}