mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-12-01 06:53:37 +01:00
Updated to work with latest BSB
This commit is contained in:
parent
18a300c801
commit
b6dc87bfc9
@ -27,7 +27,7 @@ import bskyblock.addon.challenges.database.object.PlayerData;
|
|||||||
import bskyblock.addon.challenges.panel.ChallengesPanels;
|
import bskyblock.addon.challenges.panel.ChallengesPanels;
|
||||||
import us.tastybento.bskyblock.api.configuration.BSBConfig;
|
import us.tastybento.bskyblock.api.configuration.BSBConfig;
|
||||||
import us.tastybento.bskyblock.api.user.User;
|
import us.tastybento.bskyblock.api.user.User;
|
||||||
import us.tastybento.bskyblock.database.BSBdatab;
|
import us.tastybento.bskyblock.database.BSBDatabase;
|
||||||
import us.tastybento.bskyblock.util.Util;
|
import us.tastybento.bskyblock.util.Util;
|
||||||
|
|
||||||
public class ChallengesManager {
|
public class ChallengesManager {
|
||||||
@ -36,7 +36,7 @@ public class ChallengesManager {
|
|||||||
private Map<ChallengeLevels, Set<Challenges>> challengeMap;
|
private Map<ChallengeLevels, Set<Challenges>> challengeMap;
|
||||||
private BSBConfig<Challenges> chConfig;
|
private BSBConfig<Challenges> chConfig;
|
||||||
private BSBConfig<ChallengeLevels> lvConfig;
|
private BSBConfig<ChallengeLevels> lvConfig;
|
||||||
private BSBdatab<PlayerData> players;
|
private BSBDatabase<PlayerData> players;
|
||||||
private ChallengesPanels challengesPanels;
|
private ChallengesPanels challengesPanels;
|
||||||
private Map<UUID,PlayerData> playerData;
|
private Map<UUID,PlayerData> playerData;
|
||||||
private ChallengesAddon addon;
|
private ChallengesAddon addon;
|
||||||
@ -47,7 +47,7 @@ public class ChallengesManager {
|
|||||||
chConfig = new BSBConfig<>(addon, Challenges.class);
|
chConfig = new BSBConfig<>(addon, Challenges.class);
|
||||||
lvConfig = new BSBConfig<>(addon, ChallengeLevels.class);
|
lvConfig = new BSBConfig<>(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 BSBdatab<>(addon, PlayerData.class);
|
players = new BSBDatabase<>(addon, PlayerData.class);
|
||||||
// Cache of challenges
|
// Cache of challenges
|
||||||
challengeMap = new LinkedHashMap<>();
|
challengeMap = new LinkedHashMap<>();
|
||||||
// Start panels
|
// Start panels
|
||||||
|
@ -87,6 +87,7 @@ public class ChallengesPanels {
|
|||||||
.icon(challenge.getIcon())
|
.icon(challenge.getIcon())
|
||||||
.name(challenge.getFriendlyName().isEmpty() ? challenge.getUniqueId() : challenge.getFriendlyName())
|
.name(challenge.getFriendlyName().isEmpty() ? challenge.getUniqueId() : challenge.getFriendlyName())
|
||||||
.description(challenge.getDescription())
|
.description(challenge.getDescription())
|
||||||
|
// TODO Complete the description
|
||||||
.glow(completed)
|
.glow(completed)
|
||||||
.clickHandler((player,c) -> {
|
.clickHandler((player,c) -> {
|
||||||
if (!challenge.getChallengeType().equals(ChallengeType.ICON)) {
|
if (!challenge.getChallengeType().equals(ChallengeType.ICON)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user