From 13a887d1b9d1bea692fb2e1d8d6bed3181a298e5 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 18 Aug 2018 14:40:56 -0700 Subject: [PATCH] Removed commands that will be done via GUI. --- .../addon/challenges/ChallengesManager.java | 14 ++-- .../challenges/commands/admin/Challenges.java | 2 +- .../challenges/commands/admin/MakeLevel.java | 65 ------------------- .../commands/admin/SetDeployed.java | 65 ------------------- .../commands/admin/SetDescription.java | 65 ------------------- .../challenges/commands/admin/SetExp.java | 65 ------------------- .../commands/admin/SetFriendlyName.java | 65 ------------------- .../challenges/commands/admin/SetIcon.java | 63 ------------------ .../challenges/commands/admin/SetLevel.java | 65 ------------------- .../commands/admin/SetMaxTimes.java | 65 ------------------- .../challenges/commands/admin/SetPerm.java | 65 ------------------- .../commands/admin/SetRepeatable.java | 65 ------------------- .../challenges/commands/admin/SetReward.java | 65 ------------------- .../challenges/commands/admin/SetType.java | 65 ------------------- .../challenges/commands/admin/TakeItems.java | 65 ------------------- ...yerData.java => ChallengesPlayerData.java} | 10 +-- src/main/resources/addon.yml | 2 + 17 files changed, 15 insertions(+), 856 deletions(-) delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/MakeLevel.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetDeployed.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetDescription.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetExp.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetFriendlyName.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetIcon.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetLevel.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetMaxTimes.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetPerm.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetRepeatable.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetReward.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/SetType.java delete mode 100644 src/main/java/bentobox/addon/challenges/commands/admin/TakeItems.java rename src/main/java/bentobox/addon/challenges/database/object/{PlayerData.java => ChallengesPlayerData.java} (94%) diff --git a/src/main/java/bentobox/addon/challenges/ChallengesManager.java b/src/main/java/bentobox/addon/challenges/ChallengesManager.java index bbc118c..0d7a022 100644 --- a/src/main/java/bentobox/addon/challenges/ChallengesManager.java +++ b/src/main/java/bentobox/addon/challenges/ChallengesManager.java @@ -24,7 +24,7 @@ import bentobox.addon.challenges.commands.admin.SurroundChallengeBuilder; import bentobox.addon.challenges.database.object.ChallengeLevels; import bentobox.addon.challenges.database.object.Challenges; import bentobox.addon.challenges.database.object.Challenges.ChallengeType; -import bentobox.addon.challenges.database.object.PlayerData; +import bentobox.addon.challenges.database.object.ChallengesPlayerData; import bentobox.addon.challenges.panel.ChallengesPanels; import world.bentobox.bentobox.api.configuration.Config; import world.bentobox.bentobox.api.user.User; @@ -37,9 +37,9 @@ public class ChallengesManager { private Map> challengeMap; private Config chConfig; private Config lvConfig; - private Database players; + private Database players; private ChallengesPanels challengesPanels; - private Map playerData; + private Map playerData; private ChallengesAddon addon; public ChallengesManager(ChallengesAddon addon) { @@ -48,7 +48,7 @@ public class ChallengesManager { chConfig = new Config<>(addon, Challenges.class); lvConfig = new Config<>(addon, ChallengeLevels.class); // Players is where all the player history will be stored - players = new Database<>(addon, PlayerData.class); + players = new Database<>(addon, ChallengesPlayerData.class); // Cache of challenges challengeMap = new LinkedHashMap<>(); // Cache of player data @@ -68,12 +68,12 @@ public class ChallengesManager { // Check if the player exists in the database if (players.objectExists(user.getUniqueId().toString())) { // Load player from database - PlayerData data = players.loadObject(user.getUniqueId().toString()); + ChallengesPlayerData data = players.loadObject(user.getUniqueId().toString()); // Store in cache playerData.put(user.getUniqueId(), data); } else { // Create the player data - PlayerData pd = new PlayerData(user.getUniqueId().toString()); + ChallengesPlayerData pd = new ChallengesPlayerData(user.getUniqueId().toString()); players.saveObject(pd); // Add to cache playerData.put(user.getUniqueId(), pd); @@ -215,7 +215,7 @@ public class ChallengesManager { */ public List getChallengeLevelStatus(User user, World world) { addPlayer(user); - PlayerData pd = playerData.get(user.getUniqueId()); + ChallengesPlayerData pd = playerData.get(user.getUniqueId()); List result = new ArrayList<>(); ChallengeLevels previousLevel = null; // The first level is always unlocked diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/Challenges.java b/src/main/java/bentobox/addon/challenges/commands/admin/Challenges.java index 87dcdf0..237cc7b 100644 --- a/src/main/java/bentobox/addon/challenges/commands/admin/Challenges.java +++ b/src/main/java/bentobox/addon/challenges/commands/admin/Challenges.java @@ -24,7 +24,7 @@ public class Challenges extends CompositeCommand { this.setDescription("challenges.admin.description"); // Register sub commands new ImportCommand(getAddon(), this); - new ShowChallenges(getAddon(), this); + //new ShowChallenges(getAddon(), this); } diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/MakeLevel.java b/src/main/java/bentobox/addon/challenges/commands/admin/MakeLevel.java deleted file mode 100644 index 5712ff5..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/MakeLevel.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class MakeLevel extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public MakeLevel(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public MakeLevel(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public MakeLevel(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetDeployed.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetDeployed.java deleted file mode 100644 index 45f18b6..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetDeployed.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetDeployed extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetDeployed(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetDeployed(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetDeployed(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetDescription.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetDescription.java deleted file mode 100644 index a99f2ee..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetDescription.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetDescription extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetDescription(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetDescription(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetDescription(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetExp.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetExp.java deleted file mode 100644 index cf25273..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetExp.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetExp extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetExp(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetExp(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetExp(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetFriendlyName.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetFriendlyName.java deleted file mode 100644 index 3a6fa3d..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetFriendlyName.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetFriendlyName extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetFriendlyName(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetFriendlyName(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetFriendlyName(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetIcon.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetIcon.java deleted file mode 100644 index ed03118..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetIcon.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import org.bukkit.inventory.ItemStack; - -import bentobox.addon.challenges.ChallengesAddon; -import bentobox.addon.challenges.database.object.Challenges; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetIcon extends CompositeCommand { - - private ChallengesAddon addon; - - /** - * @param parent - * @param label - * @param aliases - */ - public SetIcon(ChallengesAddon addon, CompositeCommand parent) { - super(parent, "seticon"); - this.addon = addon; - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - setParametersHelp("challenges.admin.seticon.parameters"); - setDescription("challenges.admin.seticon.description"); - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - ItemStack icon = user.getInventory().getItemInMainHand(); - if (args.isEmpty() || icon == null) { - user.sendMessage("challenges.admin.seticon.description"); - return false; - } - Challenges challenge = addon.getChallengesManager().getChallenge(args.get(0), getWorld()); - // Check if this challenge name exists - if (challenge == null) { - user.sendMessage("challenges.admin.seticon.error.no-such-challenge"); - return false; - } - challenge.setIcon(icon); - user.sendMessage("general.success"); - return true; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetLevel.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetLevel.java deleted file mode 100644 index 8b496b5..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetLevel.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetLevel extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetLevel(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetLevel(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetLevel(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetMaxTimes.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetMaxTimes.java deleted file mode 100644 index 367ae3b..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetMaxTimes.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetMaxTimes extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetMaxTimes(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetMaxTimes(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetMaxTimes(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetPerm.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetPerm.java deleted file mode 100644 index 737bc86..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetPerm.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetPerm extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetPerm(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetPerm(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetPerm(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetRepeatable.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetRepeatable.java deleted file mode 100644 index c7875f3..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetRepeatable.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetRepeatable extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetRepeatable(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetRepeatable(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetRepeatable(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetReward.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetReward.java deleted file mode 100644 index d8d0808..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetReward.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetReward extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetReward(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetReward(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetReward(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/SetType.java b/src/main/java/bentobox/addon/challenges/commands/admin/SetType.java deleted file mode 100644 index b38bb92..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/SetType.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class SetType extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public SetType(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public SetType(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public SetType(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/commands/admin/TakeItems.java b/src/main/java/bentobox/addon/challenges/commands/admin/TakeItems.java deleted file mode 100644 index ba08d41..0000000 --- a/src/main/java/bentobox/addon/challenges/commands/admin/TakeItems.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * - */ -package bentobox.addon.challenges.commands.admin; - -import java.util.List; - -import bentobox.addon.challenges.ChallengesAddon; -import world.bentobox.bentobox.api.commands.CompositeCommand; -import world.bentobox.bentobox.api.user.User; - -/** - * @author tastybento - * - */ -public class TakeItems extends CompositeCommand { - - /** - * @param plugin - * @param label - * @param string - */ - public TakeItems(ChallengesAddon plugin, String label, String... string) { - super(plugin, label, string); - // TODO Auto-generated constructor stub - } - - /** - * @param parent - * @param label - * @param aliases - */ - public TakeItems(CompositeCommand parent, String label, String... aliases) { - super(parent, label, aliases); - // TODO Auto-generated constructor stub - } - - /** - * @param label - * @param aliases - */ - public TakeItems(String label, String... aliases) { - super(label, aliases); - // TODO Auto-generated constructor stub - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#setup() - */ - @Override - public void setup() { - // TODO Auto-generated method stub - - } - - /* (non-Javadoc) - * @see world.bentobox.bbox.api.commands.BSBCommand#execute(world.bentobox.bbox.api.commands.User, java.util.List) - */ - @Override - public boolean execute(User user, String label, List args) { - // TODO Auto-generated method stub - return false; - } - -} diff --git a/src/main/java/bentobox/addon/challenges/database/object/PlayerData.java b/src/main/java/bentobox/addon/challenges/database/object/ChallengesPlayerData.java similarity index 94% rename from src/main/java/bentobox/addon/challenges/database/object/PlayerData.java rename to src/main/java/bentobox/addon/challenges/database/object/ChallengesPlayerData.java index ff07ccd..828ae57 100644 --- a/src/main/java/bentobox/addon/challenges/database/object/PlayerData.java +++ b/src/main/java/bentobox/addon/challenges/database/object/ChallengesPlayerData.java @@ -20,7 +20,7 @@ import world.bentobox.bentobox.util.Util; * @author tastybento * */ -public class PlayerData implements DataObject { +public class ChallengesPlayerData implements DataObject { @Expose private String uniqueId = ""; @@ -35,7 +35,7 @@ public class PlayerData implements DataObject { private Set levelsDone = new HashSet<>(); // Required for bean instantiation - public PlayerData() {} + public ChallengesPlayerData() {} /** * Mark a challenge as having been completed. Will increment the number of times and timestamp @@ -70,7 +70,7 @@ public class PlayerData implements DataObject { * Creates a player data entry * @param uniqueId - the player's UUID in string format */ - public PlayerData(String uniqueId) { + public ChallengesPlayerData(String uniqueId) { this.uniqueId = uniqueId; } @@ -150,10 +150,10 @@ public class PlayerData implements DataObject { if (obj == null) { return false; } - if (!(obj instanceof PlayerData)) { + if (!(obj instanceof ChallengesPlayerData)) { return false; } - PlayerData other = (PlayerData) obj; + ChallengesPlayerData other = (ChallengesPlayerData) obj; if (uniqueId == null) { if (other.uniqueId != null) { return false; diff --git a/src/main/resources/addon.yml b/src/main/resources/addon.yml index 57766e5..7614a21 100755 --- a/src/main/resources/addon.yml +++ b/src/main/resources/addon.yml @@ -4,6 +4,8 @@ version: 0.1 authors: tastybento +softdepend: AcidIsland, BSkyBlock + permissions: bskyblock.challenges: description: Let the player use the /challenges command