Added support for EpicSpawners 7.

This commit is contained in:
Brianna 2021-01-04 13:17:21 -06:00
parent ca8a314656
commit c74ce51fee
4 changed files with 6 additions and 8 deletions

View File

@ -206,7 +206,7 @@
<dependency>
<groupId>com.songoda</groupId>
<artifactId>epicspawners</artifactId>
<version>6-pre4</version>
<version>7.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>

View File

@ -22,11 +22,9 @@ import org.bukkit.block.BlockFace;
import org.bukkit.block.CreatureSpawner;
import org.bukkit.configuration.Configuration;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.PluginManager;
import java.io.File;
import java.util.*;
import java.util.Map.Entry;

View File

@ -1,7 +1,7 @@
package com.songoda.skyblock.levelling.calculator.impl;
import com.songoda.epicspawners.EpicSpawners;
import com.songoda.epicspawners.spawners.spawner.Spawner;
import com.songoda.epicspawners.spawners.spawner.PlacedSpawner;
import com.songoda.skyblock.levelling.calculator.SpawnerCalculator;
import org.bukkit.block.CreatureSpawner;
@ -9,8 +9,8 @@ public class EpicSpawnerCalculator implements SpawnerCalculator {
@Override
public long getSpawnerAmount(CreatureSpawner spawner) {
final Spawner epic = EpicSpawners.getInstance().getSpawnerManager().getSpawnerFromWorld(spawner.getLocation());
return epic == null ? 0 : epic.getFirstStack().getStackSize();
final PlacedSpawner epic = EpicSpawners.getInstance().getSpawnerManager().getSpawnerFromWorld(spawner.getLocation());
return epic.getStackSize();
}
}

View File

@ -39,7 +39,7 @@ public class EpicSpawners implements Listener {
Island island = islandManager.getIslandAtLocation(location);
int amount = event.getSpawner().getFirstStack().getStackSize();
int amount = event.getSpawner().getStackSize();
EntityType spawnerType = event.getSpawner().getCreatureSpawner().getSpawnedType();
FileConfiguration configLoad = plugin.getConfiguration();
@ -107,7 +107,7 @@ public class EpicSpawners implements Listener {
Island island = islandManager.getIslandAtLocation(location);
int amount = event.getSpawner().getFirstStack().getStackSize();
int amount = event.getSpawner().getStackSize();
EntityType spawnerType = event.getSpawner().getCreatureSpawner().getSpawnedType();
FileConfiguration configLoad = plugin.getConfiguration();