From d70a4bf9b7a46ca1dce2a9ce5d4f751728d8ed0b Mon Sep 17 00:00:00 2001 From: tastybento Date: Mon, 6 Aug 2018 07:43:17 -0700 Subject: [PATCH] Using Config and Database API naming --- src/main/java/bentobox/addon/level/Level.java | 8 ++++---- src/main/java/bentobox/addon/level/TopTen.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/bentobox/addon/level/Level.java b/src/main/java/bentobox/addon/level/Level.java index 0759933..b878da3 100644 --- a/src/main/java/bentobox/addon/level/Level.java +++ b/src/main/java/bentobox/addon/level/Level.java @@ -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.BBDatabase; +import world.bentobox.bentobox.database.Database; 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 BBDatabase handler; + private Database handler; // A cache of island levels. private Map 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 BBDatabase<>(this, LevelsData.class); + handler = new Database<>(this, LevelsData.class); // Initialize the cache levelsCache = new HashMap<>(); // Load the calculator @@ -191,7 +191,7 @@ public class Level extends Addon { } - public BBDatabase getHandler() { + public Database getHandler() { return handler; } diff --git a/src/main/java/bentobox/addon/level/TopTen.java b/src/main/java/bentobox/addon/level/TopTen.java index 9b59236..80025f6 100644 --- a/src/main/java/bentobox/addon/level/TopTen.java +++ b/src/main/java/bentobox/addon/level/TopTen.java @@ -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.BBDatabase; +import world.bentobox.bentobox.database.Database; /** * Handles all Top Ten List functions @@ -34,13 +34,13 @@ public class TopTen implements Listener { private Map topTenList; private final int[] SLOTS = new int[] {4, 12, 14, 19, 20, 21, 22, 23, 24, 25}; private final boolean DEBUG = false; - private BBDatabase handler; + private Database 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 BBDatabase<>(addon, TopTenData.class); + handler = new Database<>(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 - BBDatabase levelHandler = addon.getHandler(); + Database levelHandler = addon.getHandler(); long index = 0; for (LevelsData lv : levelHandler.loadObjects()) { if (index++ % 1000 == 0) {