From b3e4eeebc243bac24a52e6f07c3985cb8852b03c Mon Sep 17 00:00:00 2001 From: Tastybento Date: Thu, 21 Dec 2017 23:16:43 -0800 Subject: [PATCH] Fixed main command setup. Added comments. --- .../tastybento/bskyblock/api/commands/CompositeCommand.java | 5 +++++ src/main/java/us/tastybento/bskyblock/api/commands/User.java | 5 +++++ .../java/us/tastybento/bskyblock/commands/AdminCommand.java | 2 +- .../java/us/tastybento/bskyblock/commands/IslandCommand.java | 2 +- .../bskyblock/commands/island/teams/AbstractTeamCommand.java | 5 +++++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java b/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java index fd0c359cb..95107c63e 100644 --- a/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java +++ b/src/main/java/us/tastybento/bskyblock/api/commands/CompositeCommand.java @@ -18,6 +18,11 @@ import us.tastybento.bskyblock.BSkyBlock; import us.tastybento.bskyblock.database.managers.PlayersManager; import us.tastybento.bskyblock.database.managers.island.IslandsManager; +/** + * BSB composite command + * @author ben, poslovich + * + */ public abstract class CompositeCommand extends Command implements PluginIdentifiableCommand, TabCompleter { private String helpReference; diff --git a/src/main/java/us/tastybento/bskyblock/api/commands/User.java b/src/main/java/us/tastybento/bskyblock/api/commands/User.java index caa0692fc..7d9845e02 100644 --- a/src/main/java/us/tastybento/bskyblock/api/commands/User.java +++ b/src/main/java/us/tastybento/bskyblock/api/commands/User.java @@ -16,6 +16,11 @@ import org.bukkit.permissions.PermissionAttachmentInfo; import us.tastybento.bskyblock.BSkyBlock; +/** + * BSB's user object. Wraps Player. + * @author ben + * + */ public class User { private static Map users = new HashMap<>(); diff --git a/src/main/java/us/tastybento/bskyblock/commands/AdminCommand.java b/src/main/java/us/tastybento/bskyblock/commands/AdminCommand.java index b367e1a00..aac8aff1c 100755 --- a/src/main/java/us/tastybento/bskyblock/commands/AdminCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/AdminCommand.java @@ -8,7 +8,7 @@ import us.tastybento.bskyblock.config.Settings; public class AdminCommand extends CompositeCommand { public AdminCommand() { - super(Settings.ADMINCOMMAND, "Admin commands", "bsb"); + super(Settings.ADMINCOMMAND, "bsb"); this.setPermission(Settings.PERMPREFIX + "admin.*"); this.setOnlyPlayer(false); } diff --git a/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java b/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java index 9559456c6..d292ee022 100755 --- a/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/IslandCommand.java @@ -21,7 +21,7 @@ import us.tastybento.bskyblock.config.Settings; public class IslandCommand extends CompositeCommand { public IslandCommand() { - super(Settings.ISLANDCOMMAND, "Main player command", "is"); + super(Settings.ISLANDCOMMAND, "is"); this.setOnlyPlayer(true); } diff --git a/src/main/java/us/tastybento/bskyblock/commands/island/teams/AbstractTeamCommand.java b/src/main/java/us/tastybento/bskyblock/commands/island/teams/AbstractTeamCommand.java index 9bdf34956..844609757 100644 --- a/src/main/java/us/tastybento/bskyblock/commands/island/teams/AbstractTeamCommand.java +++ b/src/main/java/us/tastybento/bskyblock/commands/island/teams/AbstractTeamCommand.java @@ -15,6 +15,11 @@ import us.tastybento.bskyblock.api.commands.CompositeCommand; import us.tastybento.bskyblock.api.commands.User; import us.tastybento.bskyblock.config.Settings; +/** + * A safe common space for team commands to share data + * @author ben + * + */ public abstract class AbstractTeamCommand extends CompositeCommand { protected final static boolean DEBUG = false;