mirror of
https://github.com/BentoBoxWorld/Level.git
synced 2024-11-27 12:38:21 +01:00
Updated to renamed API
This commit is contained in:
parent
b764fcb5fa
commit
c3f8879a8a
2
pom.xml
2
pom.xml
@ -49,7 +49,7 @@
|
||||
<dependency>
|
||||
<groupId>world.bentobox</groupId>
|
||||
<artifactId>bentobox</artifactId>
|
||||
<version>LATEST</version>
|
||||
<version>FC-0.81</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
@ -17,7 +17,7 @@ import bentobox.addon.level.listeners.NewIslandListener;
|
||||
import world.bentobox.bentobox.api.addons.Addon;
|
||||
import world.bentobox.bentobox.api.commands.CompositeCommand;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.database.BSBDatabase;
|
||||
import world.bentobox.bentobox.database.BBDatabase;
|
||||
import world.bentobox.bentobox.database.objects.Island;
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ public class Level extends Addon {
|
||||
private Settings settings;
|
||||
|
||||
// Database handler for level data
|
||||
private BSBDatabase<LevelsData> handler;
|
||||
private BBDatabase<LevelsData> handler;
|
||||
|
||||
// A cache of island levels.
|
||||
private Map<UUID, LevelsData> levelsCache;
|
||||
@ -112,7 +112,7 @@ public class Level extends Addon {
|
||||
// Get the BSkyBlock database
|
||||
// Set up the database handler to store and retrieve Island classes
|
||||
// Note that these are saved by the BSkyBlock database
|
||||
handler = new BSBDatabase<>(this, LevelsData.class);
|
||||
handler = new BBDatabase<>(this, LevelsData.class);
|
||||
// Initialize the cache
|
||||
levelsCache = new HashMap<>();
|
||||
// Load the calculator
|
||||
@ -191,7 +191,7 @@ public class Level extends Addon {
|
||||
}
|
||||
|
||||
|
||||
public BSBDatabase<LevelsData> getHandler() {
|
||||
public BBDatabase<LevelsData> getHandler() {
|
||||
return handler;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ import world.bentobox.bentobox.api.panels.PanelItem;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
|
||||
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;
|
||||
import world.bentobox.bentobox.api.user.User;
|
||||
import world.bentobox.bentobox.database.BSBDatabase;
|
||||
import world.bentobox.bentobox.database.BBDatabase;
|
||||
|
||||
/**
|
||||
* Handles all Top Ten List functions
|
||||
@ -34,13 +34,13 @@ public class TopTen implements Listener {
|
||||
private Map<World,TopTenData> topTenList;
|
||||
private final int[] SLOTS = new int[] {4, 12, 14, 19, 20, 21, 22, 23, 24, 25};
|
||||
private final boolean DEBUG = false;
|
||||
private BSBDatabase<TopTenData> handler;
|
||||
private BBDatabase<TopTenData> handler;
|
||||
|
||||
public TopTen(Level addon) {
|
||||
this.addon = addon;
|
||||
// Set up the database handler to store and retrieve the TopTenList class
|
||||
// Note that these are saved in the BSkyBlock database
|
||||
handler = new BSBDatabase<>(addon, TopTenData.class);
|
||||
handler = new BBDatabase<>(addon, TopTenData.class);
|
||||
loadTopTen();
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ public class TopTen implements Listener {
|
||||
*/
|
||||
public void create(String permPrefix) {
|
||||
// Obtain all the levels for each known player
|
||||
BSBDatabase<LevelsData> levelHandler = addon.getHandler();
|
||||
BBDatabase<LevelsData> levelHandler = addon.getHandler();
|
||||
long index = 0;
|
||||
for (LevelsData lv : levelHandler.loadObjects()) {
|
||||
if (index++ % 1000 == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user