mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2025-03-02 11:11:21 +01:00
Using Config and Database API naming
This commit is contained in:
parent
ab32c1de80
commit
2272c5f59b
@ -26,18 +26,18 @@ import bentobox.addon.challenges.database.object.Challenges;
|
|||||||
import bentobox.addon.challenges.database.object.Challenges.ChallengeType;
|
import bentobox.addon.challenges.database.object.Challenges.ChallengeType;
|
||||||
import bentobox.addon.challenges.database.object.PlayerData;
|
import bentobox.addon.challenges.database.object.PlayerData;
|
||||||
import bentobox.addon.challenges.panel.ChallengesPanels;
|
import bentobox.addon.challenges.panel.ChallengesPanels;
|
||||||
import world.bentobox.bentobox.api.configuration.BBConfig;
|
import world.bentobox.bentobox.api.configuration.Config;
|
||||||
import world.bentobox.bentobox.api.user.User;
|
import world.bentobox.bentobox.api.user.User;
|
||||||
import world.bentobox.bentobox.database.BBDatabase;
|
import world.bentobox.bentobox.database.Database;
|
||||||
import world.bentobox.bentobox.util.Util;
|
import world.bentobox.bentobox.util.Util;
|
||||||
|
|
||||||
public class ChallengesManager {
|
public class ChallengesManager {
|
||||||
|
|
||||||
public static final String FREE = "Free";
|
public static final String FREE = "Free";
|
||||||
private Map<ChallengeLevels, Set<Challenges>> challengeMap;
|
private Map<ChallengeLevels, Set<Challenges>> challengeMap;
|
||||||
private BBConfig<Challenges> chConfig;
|
private Config<Challenges> chConfig;
|
||||||
private BBConfig<ChallengeLevels> lvConfig;
|
private Config<ChallengeLevels> lvConfig;
|
||||||
private BBDatabase<PlayerData> players;
|
private Database<PlayerData> players;
|
||||||
private ChallengesPanels challengesPanels;
|
private ChallengesPanels challengesPanels;
|
||||||
private Map<UUID,PlayerData> playerData;
|
private Map<UUID,PlayerData> playerData;
|
||||||
private ChallengesAddon addon;
|
private ChallengesAddon addon;
|
||||||
@ -45,10 +45,10 @@ public class ChallengesManager {
|
|||||||
public ChallengesManager(ChallengesAddon addon) {
|
public ChallengesManager(ChallengesAddon addon) {
|
||||||
this.addon = addon;
|
this.addon = addon;
|
||||||
// Set up the configs
|
// Set up the configs
|
||||||
chConfig = new BBConfig<>(addon, Challenges.class);
|
chConfig = new Config<>(addon, Challenges.class);
|
||||||
lvConfig = new BBConfig<>(addon, ChallengeLevels.class);
|
lvConfig = new Config<>(addon, ChallengeLevels.class);
|
||||||
// Players is where all the player history will be stored
|
// Players is where all the player history will be stored
|
||||||
players = new BBDatabase<>(addon, PlayerData.class);
|
players = new Database<>(addon, PlayerData.class);
|
||||||
// Cache of challenges
|
// Cache of challenges
|
||||||
challengeMap = new LinkedHashMap<>();
|
challengeMap = new LinkedHashMap<>();
|
||||||
// Cache of player data
|
// Cache of player data
|
||||||
|
Loading…
Reference in New Issue
Block a user