Make sure block is a spawner before update.

This commit is contained in:
Brianna 2019-06-28 16:03:13 -04:00
parent 98193e5f9a
commit 06b4f73db0
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@ stages:
variables:
name: "UltimateStacker"
path: "/builds/$CI_PROJECT_PATH"
version: "1.5.4"
version: "1.5.5"
build:
stage: build

View File

@ -29,6 +29,7 @@ public class SpawnerStack {
this.amount = amount;
Bukkit.getScheduler().runTaskLater(UltimateStacker.getInstance(), () -> {
if (!(location.getBlock().getState() instanceof CreatureSpawner)) return;
int count = 4 * amount;
int maxNearby = amount > 6 ? amount + 3 : 6;
CreatureSpawner creatureSpawner = (CreatureSpawner) location.getBlock().getState();