Skip to content

Commit

Permalink
Create GUI that could edit challenges levels.
Browse files Browse the repository at this point in the history
  • Loading branch information
BONNe committed Jan 16, 2019
1 parent 016deec commit 818892e
Show file tree
Hide file tree
Showing 3 changed files with 558 additions and 20 deletions.
33 changes: 17 additions & 16 deletions src/main/java/world/bentobox/challenges/ChallengesManager.java
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
package world.bentobox.challenges;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;

import org.apache.commons.lang.WordUtils;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;
import java.util.*;
import java.util.Map.Entry;
import java.util.stream.Collectors;

import world.bentobox.bentobox.api.configuration.Config;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.Database;
import world.bentobox.bentobox.util.Util;
import world.bentobox.challenges.commands.admin.SurroundChallengeBuilder;
import world.bentobox.challenges.database.object.ChallengeLevels;
import world.bentobox.challenges.database.object.Challenges;
import world.bentobox.challenges.database.object.Challenges.ChallengeType;
import world.bentobox.challenges.database.object.ChallengesPlayerData;
import world.bentobox.challenges.panel.ChallengesPanels;
import world.bentobox.bentobox.api.configuration.Config;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.Database;
import world.bentobox.bentobox.util.Util;

public class ChallengesManager {

Expand Down Expand Up @@ -514,4 +505,14 @@ public void resetAllChallenges(UUID uuid, World world) {
}


public Challenges createChallenge()
{
return new Challenges();
}


public List<Challenges> getChallenges(ChallengeLevels challengeLevel)
{
return new ArrayList<>(this.challengeMap.get(challengeLevel));
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package world.bentobox.challenges.database.object;

import java.util.ArrayList;
import java.util.List;

import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
import java.util.List;

import world.bentobox.challenges.ChallengesManager;
import world.bentobox.bentobox.api.configuration.ConfigComment;
import world.bentobox.bentobox.database.objects.DataObject;
import world.bentobox.challenges.ChallengesManager;

/**
* Represent a challenge level
Expand Down Expand Up @@ -221,5 +221,10 @@ public boolean equals(Object obj) {
}
return true;
}



public ItemStack getIcon()
{
return null;
}
}

0 comments on commit 818892e

Please sign in to comment.