Fixes JavaDoc warnings. (#164)

@inheritDoc cannot be used on Constructors.

Fixed some other warnings.
This commit is contained in:
tastybento 2019-08-05 03:00:03 -07:00 committed by BONNe
parent 76fb30be36
commit a50d00b2e7
14 changed files with 4738 additions and 4678 deletions

View File

@ -29,10 +29,10 @@ public class ChallengeDataRequestHandler extends AddonRequestHandler
}
/**
/* (non-Javadoc)
* @param metaData Required meta data.
* @return Map that returns information about challenges
* @see AddonRequestHandler#handle(Map<String, Object>)
* @see world.bentobox.bentobox.api.addons.request.AddonRequestHandler#handle(java.util.Map)
*/
@Override
public Object handle(Map<String, Object> metaData)
@ -94,9 +94,9 @@ public class ChallengeDataRequestHandler extends AddonRequestHandler
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**

View File

@ -26,10 +26,10 @@ public class ChallengeListRequestHandler extends AddonRequestHandler
}
/**
/* (non-Javadoc)
* @see world.bentobox.bentobox.api.addons.request.AddonRequestHandler#handle(java.util.Map)
* @param metaData Required meta data.
* @return Set of strings that contains completed challenges.
* @see AddonRequestHandler#handle(Map <String, Object>)
*/
@Override
public Object handle(Map<String, Object> metaData)
@ -54,9 +54,9 @@ public class ChallengeListRequestHandler extends AddonRequestHandler
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**

View File

@ -29,10 +29,10 @@ public class CompletedChallengesRequestHandler extends AddonRequestHandler
}
/**
/* (non-Javadoc)
* @see world.bentobox.bentobox.api.addons.request.AddonRequestHandler#handle(java.util.Map)
* @param metaData Required meta data.
* @return Set of strings that contains completed challenges.
* @see AddonRequestHandler#handle(Map<String, Object>)
*/
@Override
public Object handle(Map<String, Object> metaData)
@ -68,9 +68,9 @@ public class CompletedChallengesRequestHandler extends AddonRequestHandler
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**

View File

@ -27,10 +27,10 @@ public class LevelDataRequestHandler extends AddonRequestHandler
}
/**
/* (non-Javadoc)
* @see world.bentobox.bentobox.api.addons.request.AddonRequestHandler#handle(java.util.Map)
* @param metaData Required meta data.
* @return Map that returns information about level
* @see AddonRequestHandler#handle(Map <String, Object>)
*/
@Override
public Object handle(Map<String, Object> metaData)
@ -86,9 +86,9 @@ public class LevelDataRequestHandler extends AddonRequestHandler
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**

View File

@ -27,10 +27,10 @@ public class LevelListRequestHandler extends AddonRequestHandler
}
/**
/* (non-Javadoc)
* @see world.bentobox.bentobox.api.addons.request.AddonRequestHandler#handle(java.util.Map)
* @param metaData Required meta data.
* @return List of strings that contains levels in given world
* @see AddonRequestHandler#handle(Map <String, Object>)
*/
@Override
public Object handle(Map<String, Object> metaData)
@ -55,9 +55,9 @@ public class LevelListRequestHandler extends AddonRequestHandler
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**

View File

@ -1,6 +1,11 @@
package world.bentobox.challenges.panel;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.entity.EntityType;
@ -16,10 +21,6 @@ import org.bukkit.inventory.meta.SkullMeta;
import org.bukkit.inventory.meta.SpawnEggMeta;
import org.bukkit.inventory.meta.TropicalFishBucketMeta;
import org.bukkit.potion.PotionData;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import world.bentobox.bentobox.api.panels.PanelItem;
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;
@ -38,9 +39,9 @@ import world.bentobox.challenges.utils.Utils;
*/
public abstract class CommonGUI
{
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**
* This variable stores parent gui.
@ -99,9 +100,9 @@ public abstract class CommonGUI
}
// ---------------------------------------------------------------------
// Section: Constants
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constants
// ---------------------------------------------------------------------
protected static final String ADMIN = "admin";
@ -129,9 +130,9 @@ public abstract class CommonGUI
protected static final String COMPLETE = "complete";
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
/**
@ -197,9 +198,9 @@ public abstract class CommonGUI
}
// ---------------------------------------------------------------------
// Section: Common methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Common methods
// ---------------------------------------------------------------------
/**
@ -213,6 +214,7 @@ public abstract class CommonGUI
* @param button Button that must be returned.
* @return PanelItem with requested functionality.
*/
@SuppressWarnings("deprecation")
protected PanelItem getButton(CommonButtons button)
{
ItemStack icon;
@ -274,9 +276,9 @@ public abstract class CommonGUI
}
// ---------------------------------------------------------------------
// Section: Generate Challenge Description
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Generate Challenge Description
// ---------------------------------------------------------------------
/**
@ -661,9 +663,9 @@ public abstract class CommonGUI
}
// ---------------------------------------------------------------------
// Section: Generate Level Description
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Generate Level Description
// ---------------------------------------------------------------------
/**
@ -786,9 +788,9 @@ public abstract class CommonGUI
}
// ---------------------------------------------------------------------
// Section: ItemStack Description
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: ItemStack Description
// ---------------------------------------------------------------------
/**

View File

@ -23,9 +23,14 @@ import world.bentobox.challenges.utils.GuiUtils;
public class GameModesGUI extends CommonGUI
{
/**
* {@inheritDoc}
* @param adminMode - boolean that indicate if Gui is in admin mode.
* @param gameModeAddons - List with GameModes where Challenges addon is integrated.
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
*/
public GameModesGUI(ChallengesAddon addon,
World world,

View File

@ -5,15 +5,11 @@ import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.inventory.ItemStack;
import java.util.Optional;
import net.wesjd.anvilgui.AnvilGUI;
import world.bentobox.bentobox.api.addons.GameModeAddon;
import world.bentobox.bentobox.api.panels.PanelItem;
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
import world.bentobox.bentobox.api.panels.builders.PanelItemBuilder;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.util.Util;
import world.bentobox.challenges.ChallengesAddon;
import world.bentobox.challenges.panel.CommonGUI;
import world.bentobox.challenges.panel.util.ConfirmationGUI;
@ -26,9 +22,9 @@ import world.bentobox.challenges.utils.Utils;
*/
public class AdminGUI extends CommonGUI
{
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**
* This boolean holds if import should overwrite existing challenges.
@ -41,9 +37,9 @@ public class AdminGUI extends CommonGUI
private boolean resetAllMode;
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
/**
@ -67,13 +63,16 @@ public class AdminGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Constructor
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constructor
// ---------------------------------------------------------------------
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
*/
public AdminGUI(ChallengesAddon addon,
World world,
@ -85,14 +84,15 @@ public class AdminGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
/**
* {@inheritDoc}
*/
@Override
public void build()
{
PanelBuilder panelBuilder = new PanelBuilder().user(this.user).name(
@ -120,7 +120,7 @@ public class AdminGUI extends CommonGUI
panelBuilder.item(15, this.createButton(Button.IMPORT_CHALLENGES));
panelBuilder.item(24, this.createButton(Button.DEFAULT_IMPORT_CHALLENGES));
// Not added as I do not think admins should use it. It still will be able via command.
// panelBuilder.item(33, this.createButton(Button.DEFAULT_EXPORT_CHALLENGES));
// panelBuilder.item(33, this.createButton(Button.DEFAULT_EXPORT_CHALLENGES));
// Edit Addon Settings
panelBuilder.item(16, this.createButton(Button.EDIT_SETTINGS));

View File

@ -31,14 +31,18 @@ import world.bentobox.challenges.utils.Utils;
*/
public class EditChallengeGUI extends CommonGUI
{
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
/**
* {@inheritDoc}
* @param challenge challenge that needs editing.
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param challenge - challenge that needs editing
*/
public EditChallengeGUI(ChallengesAddon addon,
World world,
@ -52,7 +56,11 @@ public class EditChallengeGUI extends CommonGUI
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param challenge challenge that needs editing.
*/
public EditChallengeGUI(ChallengesAddon addon,
@ -71,9 +79,9 @@ public class EditChallengeGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Panel Creation related methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Panel Creation related methods
// ---------------------------------------------------------------------
/**
@ -221,9 +229,9 @@ public class EditChallengeGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Other methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Other methods
// ---------------------------------------------------------------------
/**
@ -1247,9 +1255,9 @@ public class EditChallengeGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
/**
@ -1308,9 +1316,9 @@ public class EditChallengeGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**

View File

@ -1,13 +1,17 @@
package world.bentobox.challenges.panel.admin;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.inventory.ItemStack;
import java.util.*;
import java.util.stream.Collectors;
import net.wesjd.anvilgui.AnvilGUI;
import world.bentobox.bentobox.api.panels.PanelItem;
@ -29,16 +33,20 @@ import world.bentobox.challenges.utils.Utils;
/**
* This class contains all necessary elements to create Levels Edit GUI.
*/
*/
public class EditLevelGUI extends CommonGUI
{
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param challengeLevel ChallengeLevel that must be edited.
*/
public EditLevelGUI(ChallengesAddon addon,
@ -53,7 +61,11 @@ public class EditLevelGUI extends CommonGUI
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param challengeLevel ChallengeLevel that must be edited.
*/
public EditLevelGUI(ChallengesAddon addon,
@ -70,9 +82,9 @@ public class EditLevelGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
/**
@ -193,9 +205,9 @@ public class EditLevelGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Other methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Other methods
// ---------------------------------------------------------------------
/**
@ -699,9 +711,9 @@ public class EditLevelGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
/**
@ -738,9 +750,9 @@ public class EditLevelGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**
* This variable holds current challenge level that is in editing GUI.

View File

@ -1,13 +1,13 @@
package world.bentobox.challenges.panel.admin;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.World;
import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
import java.util.List;
import net.wesjd.anvilgui.AnvilGUI;
import world.bentobox.bentobox.api.panels.PanelItem;
import world.bentobox.bentobox.api.panels.builders.PanelBuilder;
@ -26,13 +26,17 @@ import world.bentobox.challenges.utils.GuiUtils;
*/
public class EditSettingsGUI extends CommonGUI
{
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
*/
public EditSettingsGUI(ChallengesAddon addon,
World world,
@ -45,7 +49,11 @@ public class EditSettingsGUI extends CommonGUI
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
*/
public EditSettingsGUI(ChallengesAddon addon,
World world,
@ -59,9 +67,9 @@ public class EditSettingsGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
@Override
@ -116,6 +124,7 @@ public class EditSettingsGUI extends CommonGUI
}
@SuppressWarnings("deprecation")
private PanelItem getSettingsButton(Button button)
{
ItemStack icon;
@ -518,9 +527,9 @@ public class EditSettingsGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**

View File

@ -24,12 +24,16 @@ import world.bentobox.challenges.utils.GuiUtils;
public class ListChallengesGUI extends CommonGUI
{
// ---------------------------------------------------------------------
// Section: Constructor
// ---------------------------------------------------------------------
// Section: Constructor
// ---------------------------------------------------------------------
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param mode - mode that indicate what should do icon clicking.
*/
public ListChallengesGUI(ChallengesAddon addon,
@ -44,7 +48,11 @@ public class ListChallengesGUI extends CommonGUI
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param mode - mode that indicate what should do icon clicking.
*/
public ListChallengesGUI(ChallengesAddon addon,
@ -60,9 +68,9 @@ public class ListChallengesGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
/**
@ -172,9 +180,9 @@ public class ListChallengesGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
/**
@ -187,9 +195,9 @@ public class ListChallengesGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**
* Current mode in which icons will act.

View File

@ -23,13 +23,17 @@ import world.bentobox.challenges.utils.GuiUtils;
*/
public class ListLevelsGUI extends CommonGUI
{
// ---------------------------------------------------------------------
// Section: Constructor
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constructor
// ---------------------------------------------------------------------
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param mode - mode that indicate what should do icon clicking.
*/
public ListLevelsGUI(ChallengesAddon addon,
@ -44,7 +48,11 @@ public class ListLevelsGUI extends CommonGUI
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param mode - mode that indicate what should do icon clicking.
*/
public ListLevelsGUI(ChallengesAddon addon,
@ -60,9 +68,9 @@ public class ListLevelsGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
/**
@ -174,9 +182,9 @@ public class ListLevelsGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Enums
// ---------------------------------------------------------------------
/**
@ -189,9 +197,9 @@ public class ListLevelsGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**
* Current mode in which icons will act.

View File

@ -30,9 +30,9 @@ import world.bentobox.challenges.utils.GuiUtils;
*/
public class ListUsersGUI extends CommonGUI
{
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Variables
// ---------------------------------------------------------------------
/**
* List with players that should be in GUI.
@ -70,13 +70,17 @@ public class ListUsersGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Constructors
// ---------------------------------------------------------------------
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param operationMode Indicate what should happen on player icon click.
*/
public ListUsersGUI(ChallengesAddon addon,
@ -91,7 +95,11 @@ public class ListUsersGUI extends CommonGUI
/**
* {@inheritDoc}
* @param addon Addon where panel operates.
* @param world World from which panel was created.
* @param user User who created panel.
* @param topLabel Command top label which creates panel (f.e. island or ai)
* @param permissionPrefix Command permission prefix (f.e. bskyblock.)
* @param operationMode Indicate what should happen on player icon click.
*/
public ListUsersGUI(ChallengesAddon addon,
@ -108,9 +116,9 @@ public class ListUsersGUI extends CommonGUI
}
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
// ---------------------------------------------------------------------
// Section: Methods
// ---------------------------------------------------------------------
@Override