mirror of
https://github.com/songoda/FabledSkyBlock.git
synced 2024-11-22 10:15:54 +01:00
Updates UltimateStacker Dependency+Implementation to API v1.0.0-SNAPSHOT
This commit is contained in:
parent
a259589897
commit
700b293f9c
6
pom.xml
6
pom.xml
@ -172,9 +172,9 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.songoda</groupId>
|
||||
<artifactId>UltimateStacker</artifactId>
|
||||
<version>2.1.1</version>
|
||||
<groupId>com.craftaro</groupId>
|
||||
<artifactId>UltimateStacker-API</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -1,18 +1,24 @@
|
||||
package com.craftaro.skyblock.levelling.calculator.impl;
|
||||
|
||||
import com.craftaro.skyblock.levelling.calculator.SpawnerCalculator;
|
||||
import com.songoda.ultimatestacker.UltimateStacker;
|
||||
import com.songoda.ultimatestacker.stackable.spawner.SpawnerStack;
|
||||
import com.craftaro.ultimatestacker.api.UltimateStackerApi;
|
||||
import com.craftaro.ultimatestacker.api.stack.spawner.SpawnerStack;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.block.CreatureSpawner;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
|
||||
public class UltimateStackerCalculator implements SpawnerCalculator {
|
||||
@Override
|
||||
public long getSpawnerAmount(CreatureSpawner spawner) {
|
||||
if (!UltimateStacker.getInstance().getConfig().getBoolean("Spawners.Enabled")) {
|
||||
if (!getUltimateStackerPlugin().getConfig().getBoolean("Spawners.Enabled")) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
final SpawnerStack stack = UltimateStacker.getInstance().getSpawnerStackManager().getSpawner(spawner.getLocation());
|
||||
final SpawnerStack stack = UltimateStackerApi.getSpawnerStackManager().getSpawner(spawner.getLocation());
|
||||
return stack == null ? 0 : stack.getAmount();
|
||||
}
|
||||
|
||||
private Plugin getUltimateStackerPlugin() {
|
||||
return Bukkit.getPluginManager().getPlugin("UltimateStacker");
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ import com.craftaro.skyblock.island.IslandLevel;
|
||||
import com.craftaro.skyblock.island.IslandManager;
|
||||
import com.craftaro.skyblock.utils.version.CompatibleSpawners;
|
||||
import com.craftaro.skyblock.world.WorldManager;
|
||||
import com.songoda.ultimatestacker.events.SpawnerBreakEvent;
|
||||
import com.songoda.ultimatestacker.events.SpawnerPlaceEvent;
|
||||
import com.craftaro.ultimatestacker.api.events.spawner.SpawnerPlaceEvent;
|
||||
import com.craftaro.ultimatestacker.api.events.spawner.SpawnerBreakEvent;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
Loading…
Reference in New Issue
Block a user