Reformatted code with new code style

This commit is contained in:
Tim Visée 2015-11-23 21:46:34 +01:00
parent b2db25d16c
commit 36c50c4507
92 changed files with 2458 additions and 2080 deletions

View File

@ -941,6 +941,7 @@ public class AuthMe extends JavaPlugin {
* @param cmd The command (Bukkit). * @param cmd The command (Bukkit).
* @param commandLabel The command label (Bukkit). * @param commandLabel The command label (Bukkit).
* @param args The command arguments (Bukkit). * @param args The command arguments (Bukkit).
*
* @return True if the command was executed, false otherwise. * @return True if the command was executed, false otherwise.
*/ */
@Override @Override

View File

@ -18,6 +18,7 @@ public class ConsoleFilter implements Filter {
* Method isLoggable. * Method isLoggable.
* *
* @param record LogRecord * @param record LogRecord
*
* @return boolean * @see java.util.logging.Filter#isLoggable(LogRecord) * @return boolean * @see java.util.logging.Filter#isLoggable(LogRecord)
*/ */
@Override @Override

View File

@ -36,6 +36,7 @@ public class DataManager {
* Method getOfflinePlayer. * Method getOfflinePlayer.
* *
* @param name String * @param name String
*
* @return OfflinePlayer * @return OfflinePlayer
*/ */
public synchronized OfflinePlayer getOfflinePlayer(final String name) { public synchronized OfflinePlayer getOfflinePlayer(final String name) {
@ -226,6 +227,7 @@ public class DataManager {
* *
* @param player Player * @param player Player
* @param name String * @param name String
*
* @return boolean * @return boolean
*/ */
public boolean isOnline(Player player, final String name) { public boolean isOnline(Player player, final String name) {
@ -256,6 +258,7 @@ public class DataManager {
* Method getOnlinePlayerLower. * Method getOnlinePlayerLower.
* *
* @param name String * @param name String
*
* @return Player * @return Player
*/ */
public Player getOnlinePlayerLower(String name) { public Player getOnlinePlayerLower(String name) {

View File

@ -34,6 +34,7 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
* data. * data.
* *
* @param message the Message object to verify * @param message the Message object to verify
*
* @return the Result value * @return the Result value
*/ */
private static Result validateMessage(Message message) { private static Result validateMessage(Message message) {
@ -48,6 +49,7 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
* depending on whether the message contains sensitive AuthMe data. * depending on whether the message contains sensitive AuthMe data.
* *
* @param message the message to verify * @param message the message to verify
*
* @return the Result value * @return the Result value
*/ */
private static Result validateMessage(String message) { private static Result validateMessage(String message) {

View File

@ -128,6 +128,7 @@ public class PerformBackup {
* Method FileBackup. * Method FileBackup.
* *
* @param backend String * @param backend String
*
* @return boolean * @return boolean
*/ */
private boolean FileBackup(String backend) { private boolean FileBackup(String backend) {
@ -150,6 +151,7 @@ public class PerformBackup {
* Method checkWindows. * Method checkWindows.
* *
* @param windowsPath String * @param windowsPath String
*
* @return boolean * @return boolean
*/ */
private boolean checkWindows(String windowsPath) { private boolean checkWindows(String windowsPath) {
@ -174,6 +176,7 @@ public class PerformBackup {
* *
* @param src File * @param src File
* @param dst File * @param dst File
*
* @throws IOException * @throws IOException
*/ */
void copy(File src, File dst) throws IOException { void copy(File src, File dst) throws IOException {

View File

@ -50,6 +50,7 @@ public class API {
/** /**
* @param player * @param player
*
* @return true if player is authenticate * @return true if player is authenticate
*/ */
@Deprecated @Deprecated
@ -59,6 +60,7 @@ public class API {
/** /**
* @param player * @param player
*
* @return true if the player is unrestricted * @return true if the player is unrestricted
*/ */
@Deprecated @Deprecated
@ -70,6 +72,7 @@ public class API {
* Method getLastLocation. * Method getLastLocation.
* *
* @param player Player * @param player Player
*
* @return Location * @return Location
*/ */
@Deprecated @Deprecated
@ -108,6 +111,7 @@ public class API {
/** /**
* @param playerName * @param playerName
*
* @return true if player is registered * @return true if player is registered
*/ */
@Deprecated @Deprecated
@ -119,6 +123,7 @@ public class API {
/** /**
* @param playerName String * @param playerName String
* @param passwordToCheck String * @param passwordToCheck String
*
* @return true if the password is correct , false else * @return true if the password is correct , false else
*/ */
@Deprecated @Deprecated
@ -140,6 +145,7 @@ public class API {
* *
* @param playerName String * @param playerName String
* @param password String * @param password String
*
* @return true if the player is register correctly * @return true if the player is register correctly
*/ */
@Deprecated @Deprecated
@ -182,6 +188,7 @@ public class API {
/** /**
* @param player * @param player
*
* @return true if player is a npc * @return true if player is a npc
*/ */
@Deprecated @Deprecated
@ -191,6 +198,7 @@ public class API {
/** /**
* @param player * @param player
*
* @return true if player is a npc * @return true if player is a npc
*/ */
@Deprecated @Deprecated

View File

@ -67,6 +67,7 @@ public class NewAPI {
/** /**
* @param player * @param player
*
* @return true if player is authenticate * @return true if player is authenticate
*/ */
public boolean isAuthenticated(Player player) { public boolean isAuthenticated(Player player) {
@ -75,6 +76,7 @@ public class NewAPI {
/** /**
* @param player * @param player
*
* @return true if player is a npc * @return true if player is a npc
*/ */
public boolean isNPC(Player player) { public boolean isNPC(Player player) {
@ -83,6 +85,7 @@ public class NewAPI {
/** /**
* @param player * @param player
*
* @return true if the player is unrestricted * @return true if the player is unrestricted
*/ */
public boolean isUnrestricted(Player player) { public boolean isUnrestricted(Player player) {
@ -93,6 +96,7 @@ public class NewAPI {
* Method getLastLocation. * Method getLastLocation.
* *
* @param player Player * @param player Player
*
* @return Location * @return Location
*/ */
public Location getLastLocation(Player player) { public Location getLastLocation(Player player) {
@ -112,6 +116,7 @@ public class NewAPI {
/** /**
* @param playerName * @param playerName
*
* @return true if player is registered * @return true if player is registered
*/ */
public boolean isRegistered(String playerName) { public boolean isRegistered(String playerName) {
@ -122,6 +127,7 @@ public class NewAPI {
/** /**
* @param playerName String * @param playerName String
* @param passwordToCheck String * @param passwordToCheck String
*
* @return true if the password is correct , false else * @return true if the password is correct , false else
*/ */
public boolean checkPassword(String playerName, String passwordToCheck) { public boolean checkPassword(String playerName, String passwordToCheck) {
@ -141,6 +147,7 @@ public class NewAPI {
* *
* @param playerName String * @param playerName String
* @param password String * @param password String
*
* @return true if the player is register correctly * @return true if the player is register correctly
*/ */
public boolean registerPlayer(String playerName, String password) { public boolean registerPlayer(String playerName, String password) {

View File

@ -405,6 +405,7 @@ public class PlayerAuth {
* Method equals. * Method equals.
* *
* @param obj Object * @param obj Object
*
* @return boolean * @return boolean
*/ */
@Override @Override

View File

@ -57,6 +57,7 @@ public class PlayerCache {
* Method isAuthenticated. * Method isAuthenticated.
* *
* @param user String * @param user String
*
* @return boolean * @return boolean
*/ */
public boolean isAuthenticated(String user) { public boolean isAuthenticated(String user) {
@ -67,6 +68,7 @@ public class PlayerCache {
* Method getAuth. * Method getAuth.
* *
* @param user String * @param user String
*
* @return PlayerAuth * @return PlayerAuth
*/ */
public PlayerAuth getAuth(String user) { public PlayerAuth getAuth(String user) {

View File

@ -70,6 +70,7 @@ public class JsonCache {
* Method readCache. * Method readCache.
* *
* @param player Player * @param player Player
*
* @return DataFileCache * @return DataFileCache
*/ */
public DataFileCache readCache(Player player) { public DataFileCache readCache(Player player) {
@ -119,6 +120,7 @@ public class JsonCache {
* Method doesCacheExist. * Method doesCacheExist.
* *
* @param player Player * @param player Player
*
* @return boolean * @return boolean
*/ */
public boolean doesCacheExist(Player player) { public boolean doesCacheExist(Player player) {
@ -141,6 +143,7 @@ public class JsonCache {
* @param jsonElement JsonElement * @param jsonElement JsonElement
* @param type Type * @param type Type
* @param jsonDeserializationContext JsonDeserializationContext * @param jsonDeserializationContext JsonDeserializationContext
*
* @return DataFileCache * @throws JsonParseException * @see com.google.gson.JsonDeserializer#deserialize(JsonElement, Type, JsonDeserializationContext) * @return DataFileCache * @throws JsonParseException * @see com.google.gson.JsonDeserializer#deserialize(JsonElement, Type, JsonDeserializationContext)
*/ */
@Override @Override
@ -177,6 +180,7 @@ public class JsonCache {
* @param dataFileCache DataFileCache * @param dataFileCache DataFileCache
* @param type Type * @param type Type
* @param jsonSerializationContext JsonSerializationContext * @param jsonSerializationContext JsonSerializationContext
*
* @return JsonElement * @return JsonElement
*/ */
@Override @Override

View File

@ -124,6 +124,7 @@ public class LimboCache {
* Method getLimboPlayer. * Method getLimboPlayer.
* *
* @param name String * @param name String
*
* @return LimboPlayer * @return LimboPlayer
*/ */
public LimboPlayer getLimboPlayer(String name) { public LimboPlayer getLimboPlayer(String name) {
@ -134,6 +135,7 @@ public class LimboCache {
* Method hasLimboPlayer. * Method hasLimboPlayer.
* *
* @param name String * @param name String
*
* @return boolean * @return boolean
*/ */
public boolean hasLimboPlayer(String name) { public boolean hasLimboPlayer(String name) {

View File

@ -117,6 +117,7 @@ public class CommandDescription {
* Check whether a label is valid to use. * Check whether a label is valid to use.
* *
* @param label The label to test. * @param label The label to test.
*
* @return True if the label is valid to use, false otherwise. * @return True if the label is valid to use, false otherwise.
*/ */
public static boolean isValidLabel(String label) { public static boolean isValidLabel(String label) {
@ -140,6 +141,7 @@ public class CommandDescription {
* *
* @param commandLabel The first command label. * @param commandLabel The first command label.
* @param otherCommandLabel The other command label. * @param otherCommandLabel The other command label.
*
* @return True if the labels are equal to each other. * @return True if the labels are equal to each other.
*/ */
private static boolean commandLabelEquals(String commandLabel, String otherCommandLabel) { private static boolean commandLabelEquals(String commandLabel, String otherCommandLabel) {
@ -178,6 +180,7 @@ public class CommandDescription {
* Get the label most similar to the reference. The first label will be returned if no reference was supplied. * Get the label most similar to the reference. The first label will be returned if no reference was supplied.
* *
* @param reference The command reference. * @param reference The command reference.
*
* @return The most similar label, or the first label. An empty label will be returned if no label was set. * @return The most similar label, or the first label. An empty label will be returned if no label was set.
*/ */
public String getLabel(CommandParts reference) { public String getLabel(CommandParts reference) {
@ -236,6 +239,7 @@ public class CommandDescription {
* @param commandLabel Command label to set. * @param commandLabel Command label to set.
* @param overwrite True to replace all old command labels, false to append this command label to the currently * @param overwrite True to replace all old command labels, false to append this command label to the currently
* existing labels. * existing labels.
*
* @return Trie if the command label is added, or if it was added already. False on failure. * @return Trie if the command label is added, or if it was added already. False on failure.
*/ */
public boolean setLabel(String commandLabel, boolean overwrite) { public boolean setLabel(String commandLabel, boolean overwrite) {
@ -252,6 +256,7 @@ public class CommandDescription {
* Add a command label to the list. * Add a command label to the list.
* *
* @param commandLabel Command label to add. * @param commandLabel Command label to add.
*
* @return True if the label was added, or if it was added already. False on error. * @return True if the label was added, or if it was added already. False on error.
*/ */
public boolean addLabel(String commandLabel) { public boolean addLabel(String commandLabel) {
@ -271,6 +276,7 @@ public class CommandDescription {
* Add a list of command labels. * Add a list of command labels.
* *
* @param commandLabels List of command labels to add. * @param commandLabels List of command labels to add.
*
* @return True if succeed, false on failure. * @return True if succeed, false on failure.
*/ */
public boolean addLabels(List<String> commandLabels) { public boolean addLabels(List<String> commandLabels) {
@ -285,6 +291,7 @@ public class CommandDescription {
* Check whether this command description has a specific command. * Check whether this command description has a specific command.
* *
* @param commandLabel Command to check for. * @param commandLabel Command to check for.
*
* @return True if this command label equals to the param command. * @return True if this command label equals to the param command.
*/ */
public boolean hasLabel(String commandLabel) { public boolean hasLabel(String commandLabel) {
@ -301,6 +308,7 @@ public class CommandDescription {
* Check whether this command description has a list of labels * Check whether this command description has a list of labels
* *
* @param commandLabels List of labels * @param commandLabels List of labels
*
* @return True if all labels match, false otherwise * @return True if all labels match, false otherwise
*/ */
public boolean hasLabels(List<String> commandLabels) { public boolean hasLabels(List<String> commandLabels) {
@ -318,6 +326,7 @@ public class CommandDescription {
* are suitable too. * are suitable too.
* *
* @param commandReference The command reference. * @param commandReference The command reference.
*
* @return True if the command reference is suitable to this command label, false otherwise. * @return True if the command reference is suitable to this command label, false otherwise.
*/ */
public boolean isSuitableLabel(CommandParts commandReference) { public boolean isSuitableLabel(CommandParts commandReference) {
@ -345,6 +354,7 @@ public class CommandDescription {
* Get the absolute command label. * Get the absolute command label.
* *
* @param includeSlash boolean * @param includeSlash boolean
*
* @return Absolute command label. * @return Absolute command label.
*/ */
public String getAbsoluteLabel(boolean includeSlash) { public String getAbsoluteLabel(boolean includeSlash) {
@ -356,6 +366,7 @@ public class CommandDescription {
* *
* @param includeSlash boolean * @param includeSlash boolean
* @param reference CommandParts * @param reference CommandParts
*
* @return Absolute command label. * @return Absolute command label.
*/ */
public String getAbsoluteLabel(boolean includeSlash, CommandParts reference) { public String getAbsoluteLabel(boolean includeSlash, CommandParts reference) {
@ -372,6 +383,7 @@ public class CommandDescription {
* Get the command reference. * Get the command reference.
* *
* @param reference The reference to use as template, which is used to choose the most similar reference. * @param reference The reference to use as template, which is used to choose the most similar reference.
*
* @return Command reference. * @return Command reference.
*/ */
public CommandParts getCommandReference(CommandParts reference) { public CommandParts getCommandReference(CommandParts reference) {
@ -393,6 +405,7 @@ public class CommandDescription {
* Get the difference between this command and another command reference. * Get the difference between this command and another command reference.
* *
* @param other The other command reference. * @param other The other command reference.
*
* @return The command difference. Zero if there's no difference. A negative number on error. * @return The command difference. Zero if there's no difference. A negative number on error.
*/ */
public double getCommandDifference(CommandParts other) { public double getCommandDifference(CommandParts other) {
@ -404,6 +417,7 @@ public class CommandDescription {
* *
* @param other The other command reference. * @param other The other command reference.
* @param fullCompare True to fully compare both command references. * @param fullCompare True to fully compare both command references.
*
* @return The command difference. Zero if there's no difference. A negative number on error. * @return The command difference. Zero if there's no difference. A negative number on error.
*/ */
public double getCommandDifference(CommandParts other, boolean fullCompare) { public double getCommandDifference(CommandParts other, boolean fullCompare) {
@ -451,6 +465,7 @@ public class CommandDescription {
* @param sender The command sender that triggered the execution of this command. * @param sender The command sender that triggered the execution of this command.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True on success, false on failure. * @return True on success, false on failure.
*/ */
public boolean execute(CommandSender sender, CommandParts commandReference, CommandParts commandArguments) { public boolean execute(CommandSender sender, CommandParts commandReference, CommandParts commandArguments) {
@ -489,6 +504,7 @@ public class CommandDescription {
* Set the parent command. * Set the parent command.
* *
* @param parent Parent command. * @param parent Parent command.
*
* @return True on success, false on failure. * @return True on success, false on failure.
*/ */
public boolean setParent(CommandDescription parent) { public boolean setParent(CommandDescription parent) {
@ -543,6 +559,7 @@ public class CommandDescription {
* Add a child to the command description. * Add a child to the command description.
* *
* @param commandDescription The child to add. * @param commandDescription The child to add.
*
* @return True on success, false on failure. * @return True on success, false on failure.
*/ */
public boolean addChild(CommandDescription commandDescription) { public boolean addChild(CommandDescription commandDescription) {
@ -577,6 +594,7 @@ public class CommandDescription {
* Check if this command description has a specific child. * Check if this command description has a specific child.
* *
* @param commandDescription The command description to check for. * @param commandDescription The command description to check for.
*
* @return True if this command description has the specific child, false otherwise. * @return True if this command description has the specific child, false otherwise.
*/ */
public boolean isChild(CommandDescription commandDescription) { public boolean isChild(CommandDescription commandDescription) {
@ -594,6 +612,7 @@ public class CommandDescription {
* Add an argument. * Add an argument.
* *
* @param argument The argument to add. * @param argument The argument to add.
*
* @return True if succeed, false if failed. * @return True if succeed, false if failed.
*/ */
public boolean addArgument(CommandArgumentDescription argument) { public boolean addArgument(CommandArgumentDescription argument) {
@ -636,6 +655,7 @@ public class CommandDescription {
* Check whether an argument exists. * Check whether an argument exists.
* *
* @param argument The argument to check for. * @param argument The argument to check for.
*
* @return True if this argument already exists, false otherwise. * @return True if this argument already exists, false otherwise.
*/ */
public boolean hasArgument(CommandArgumentDescription argument) { public boolean hasArgument(CommandArgumentDescription argument) {
@ -771,6 +791,7 @@ public class CommandDescription {
* Find the best suitable command for a query reference. * Find the best suitable command for a query reference.
* *
* @param queryReference The query reference to find a command for. * @param queryReference The query reference to find a command for.
*
* @return The command found, or null. * @return The command found, or null.
*/ */
public FoundCommandResult findCommand(final CommandParts queryReference) { public FoundCommandResult findCommand(final CommandParts queryReference) {
@ -832,6 +853,7 @@ public class CommandDescription {
* Check whether there's any command description that matches the specified command reference. * Check whether there's any command description that matches the specified command reference.
* *
* @param commandReference The command reference. * @param commandReference The command reference.
*
* @return True if so, false otherwise. * @return True if so, false otherwise.
*/ */
public boolean hasSuitableCommand(CommandParts commandReference) { public boolean hasSuitableCommand(CommandParts commandReference) {
@ -842,6 +864,7 @@ public class CommandDescription {
* Check if the remaining command reference elements are suitable with arguments of the current command description. * Check if the remaining command reference elements are suitable with arguments of the current command description.
* *
* @param commandReference The command reference. * @param commandReference The command reference.
*
* @return True if the arguments are suitable, false otherwise. * @return True if the arguments are suitable, false otherwise.
*/ */
public boolean hasSuitableArguments(CommandParts commandReference) { public boolean hasSuitableArguments(CommandParts commandReference) {
@ -853,6 +876,7 @@ public class CommandDescription {
* and get the difference in argument count. * and get the difference in argument count.
* *
* @param commandReference The command reference. * @param commandReference The command reference.
*
* @return The difference in argument count between the reference and the actual command. * @return The difference in argument count between the reference and the actual command.
*/ */
public int getSuitableArgumentsDifference(CommandParts commandReference) { public int getSuitableArgumentsDifference(CommandParts commandReference) {

View File

@ -89,6 +89,7 @@ public class CommandHandler {
* @param bukkitCommand The command (Bukkit). * @param bukkitCommand The command (Bukkit).
* @param bukkitCommandLabel The command label (Bukkit). * @param bukkitCommandLabel The command label (Bukkit).
* @param bukkitArgs The command arguments (Bukkit). * @param bukkitArgs The command arguments (Bukkit).
*
* @return True if the command was executed, false otherwise. * @return True if the command was executed, false otherwise.
*/ */
public boolean onCommand(CommandSender sender, org.bukkit.command.Command bukkitCommand, String bukkitCommandLabel, String[] bukkitArgs) { public boolean onCommand(CommandSender sender, org.bukkit.command.Command bukkitCommand, String bukkitCommandLabel, String[] bukkitArgs) {
@ -181,6 +182,7 @@ public class CommandHandler {
* Process the command arguments, and return them as an array list. * Process the command arguments, and return them as an array list.
* *
* @param args The command arguments to process. * @param args The command arguments to process.
*
* @return The processed command arguments. * @return The processed command arguments.
*/ */
private List<String> processArguments(String[] args) { private List<String> processArguments(String[] args) {

View File

@ -575,6 +575,7 @@ public class CommandManager {
* Find the best suitable command for the specified reference. * Find the best suitable command for the specified reference.
* *
* @param queryReference The query reference to find a command for. * @param queryReference The query reference to find a command for.
*
* @return The command found, or null. * @return The command found, or null.
*/ */
public FoundCommandResult findCommand(CommandParts queryReference) { public FoundCommandResult findCommand(CommandParts queryReference) {

View File

@ -71,6 +71,7 @@ public class CommandParts {
* Add a part. * Add a part.
* *
* @param part The part to add. * @param part The part to add.
*
* @return The result. * @return The result.
*/ */
public boolean add(String part) { public boolean add(String part) {
@ -81,6 +82,7 @@ public class CommandParts {
* Add some parts. * Add some parts.
* *
* @param parts The parts to add. * @param parts The parts to add.
*
* @return The result. * @return The result.
*/ */
public boolean add(List<String> parts) { public boolean add(List<String> parts) {
@ -91,6 +93,7 @@ public class CommandParts {
* Add some parts. * Add some parts.
* *
* @param parts The parts to add. * @param parts The parts to add.
*
* @return The result. * @return The result.
*/ */
public boolean add(String[] parts) { public boolean add(String[] parts) {
@ -112,6 +115,7 @@ public class CommandParts {
* Get a part by it's index. * Get a part by it's index.
* *
* @param i Part index. * @param i Part index.
*
* @return The part. * @return The part.
*/ */
public String get(int i) { public String get(int i) {
@ -127,6 +131,7 @@ public class CommandParts {
* Get a range of the parts starting at the specified index up to the end of the range. * Get a range of the parts starting at the specified index up to the end of the range.
* *
* @param start The starting index. * @param start The starting index.
*
* @return The parts range. Arguments that were out of bound are not included. * @return The parts range. Arguments that were out of bound are not included.
*/ */
public List<String> getRange(int start) { public List<String> getRange(int start) {
@ -138,6 +143,7 @@ public class CommandParts {
* *
* @param start The starting index. * @param start The starting index.
* @param count The number of parts to get. * @param count The number of parts to get.
*
* @return The parts range. Parts that were out of bound are not included. * @return The parts range. Parts that were out of bound are not included.
*/ */
public List<String> getRange(int start, int count) { public List<String> getRange(int start, int count) {
@ -160,6 +166,7 @@ public class CommandParts {
* Get the difference value between two references. This won't do a full compare, just the last reference parts instead. * Get the difference value between two references. This won't do a full compare, just the last reference parts instead.
* *
* @param other The other reference. * @param other The other reference.
*
* @return The result from zero to above. A negative number will be returned on error. * @return The result from zero to above. A negative number will be returned on error.
*/ */
public double getDifference(CommandParts other) { public double getDifference(CommandParts other) {
@ -171,6 +178,7 @@ public class CommandParts {
* *
* @param other The other reference. * @param other The other reference.
* @param fullCompare True to compare the full references as far as the range reaches. * @param fullCompare True to compare the full references as far as the range reaches.
*
* @return The result from zero to above. A negative number will be returned on error. * @return The result from zero to above. A negative number will be returned on error.
*/ */
public double getDifference(CommandParts other, boolean fullCompare) { public double getDifference(CommandParts other, boolean fullCompare) {

View File

@ -55,6 +55,7 @@ public class CommandPermissions {
* Add a permission node required to execute this command. * Add a permission node required to execute this command.
* *
* @param permissionNode The permission node to add. * @param permissionNode The permission node to add.
*
* @return True on success, false on failure. * @return True on success, false on failure.
*/ */
public boolean addPermissionNode(String permissionNode) { public boolean addPermissionNode(String permissionNode) {
@ -77,6 +78,7 @@ public class CommandPermissions {
* Check whether this command requires a specified permission node to execute. * Check whether this command requires a specified permission node to execute.
* *
* @param permissionNode The permission node to check for. * @param permissionNode The permission node to check for.
*
* @return True if this permission node is required, false if not. * @return True if this permission node is required, false if not.
*/ */
public boolean hasPermissionNode(String permissionNode) { public boolean hasPermissionNode(String permissionNode) {
@ -114,6 +116,7 @@ public class CommandPermissions {
* Check whether this command requires any permission to be executed. This is based on the getPermission() method. * Check whether this command requires any permission to be executed. This is based on the getPermission() method.
* *
* @param sender CommandSender * @param sender CommandSender
*
* @return True if this command requires any permission to be executed by a player. * @return True if this command requires any permission to be executed by a player.
*/ */
public boolean hasPermission(CommandSender sender) { public boolean hasPermission(CommandSender sender) {
@ -165,6 +168,7 @@ public class CommandPermissions {
* Get the default permission for a specified command sender. * Get the default permission for a specified command sender.
* *
* @param sender The command sender to get the default permission for. * @param sender The command sender to get the default permission for.
*
* @return True if the command sender has permission by default, false otherwise. * @return True if the command sender has permission by default, false otherwise.
*/ */
public boolean getDefaultPermissionCommandSender(CommandSender sender) { public boolean getDefaultPermissionCommandSender(CommandSender sender) {

View File

@ -13,6 +13,7 @@ public abstract class ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
public abstract boolean executeCommand(CommandSender sender, CommandParts commandReference, CommandParts commandArguments); public abstract boolean executeCommand(CommandSender sender, CommandParts commandReference, CommandParts commandArguments);

View File

@ -88,6 +88,7 @@ public class FoundCommandResult {
* Execute the command. * Execute the command.
* *
* @param sender The command sender that executed the command. * @param sender The command sender that executed the command.
*
* @return True on success, false on failure. * @return True on success, false on failure.
*/ */
public boolean executeCommand(CommandSender sender) { public boolean executeCommand(CommandSender sender) {
@ -103,6 +104,7 @@ public class FoundCommandResult {
* Check whether a command sender has permission to execute the command. * Check whether a command sender has permission to execute the command.
* *
* @param sender The command sender. * @param sender The command sender.
*
* @return True if the command sender has permission, false otherwise. * @return True if the command sender has permission, false otherwise.
*/ */
public boolean hasPermission(CommandSender sender) { public boolean hasPermission(CommandSender sender) {

View File

@ -17,6 +17,7 @@ public class GetEmailCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -20,6 +20,7 @@ public class PurgeBannedPlayersCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -20,6 +20,7 @@ public class PurgeCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -19,6 +19,7 @@ public class PurgeLastPositionCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -23,6 +23,7 @@ public class RegisterCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -21,6 +21,7 @@ public class ReloadCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -19,6 +19,7 @@ public class ResetNameCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -19,6 +19,7 @@ public class SetEmailCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -17,6 +17,7 @@ public class SetFirstSpawnCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -17,6 +17,7 @@ public class SetSpawnCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -17,6 +17,7 @@ public class SpawnCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -17,6 +17,7 @@ public class SwitchAntiBotCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -29,6 +29,7 @@ public class UnregisterCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -18,6 +18,7 @@ public class VersionCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override
@ -70,6 +71,7 @@ public class VersionCommand extends ExecutableCommand {
* Check whether a player is online. * Check whether a player is online.
* *
* @param minecraftName The Minecraft player name. * @param minecraftName The Minecraft player name.
*
* @return True if the player is online, false otherwise. * @return True if the player is online, false otherwise.
*/ */
private boolean isPlayerOnline(String minecraftName) { private boolean isPlayerOnline(String minecraftName) {

View File

@ -20,6 +20,7 @@ public class CaptchaCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -18,6 +18,7 @@ public class ConverterCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override
@ -104,6 +105,7 @@ public class ConverterCommand extends ExecutableCommand {
* Method fromName. * Method fromName.
* *
* @param name String * @param name String
*
* @return ConvertType * @return ConvertType
*/ */
public static ConvertType fromName(String name) { public static ConvertType fromName(String name) {

View File

@ -18,6 +18,7 @@ public class UnregisterCommand extends ExecutableCommand {
* @param sender The command sender. * @param sender The command sender.
* @param commandReference The command reference. * @param commandReference The command reference.
* @param commandArguments The command arguments. * @param commandArguments The command arguments.
*
* @return True if the command was executed successfully, false otherwise. * @return True if the command was executed successfully, false otherwise.
*/ */
@Override @Override

View File

@ -23,6 +23,7 @@ public final class HelpSyntaxHelper {
* @param commandReference The reference of the command. * @param commandReference The reference of the command.
* @param alternativeLabel The alternative label to use for this command syntax. * @param alternativeLabel The alternative label to use for this command syntax.
* @param highlight True to highlight the important parts of this command. * @param highlight True to highlight the important parts of this command.
*
* @return The command with proper syntax. * @return The command with proper syntax.
*/ */
public static String getCommandSyntax(CommandDescription commandDescription, CommandParts commandReference, public static String getCommandSyntax(CommandDescription commandDescription, CommandParts commandReference,

View File

@ -179,6 +179,7 @@ public class FlatToSqlite implements Converter {
* Method saveAuth. * Method saveAuth.
* *
* @param s String * @param s String
*
* @return boolean * @return boolean
*/ */
private synchronized boolean saveAuth(String s) { private synchronized boolean saveAuth(String s) {

View File

@ -73,6 +73,7 @@ public class vAuthFileReader {
* Method isUUIDinstance. * Method isUUIDinstance.
* *
* @param s String * @param s String
*
* @return boolean * @return boolean
*/ */
private boolean isUUIDinstance(String s) { private boolean isUUIDinstance(String s) {
@ -85,6 +86,7 @@ public class vAuthFileReader {
* Method getName. * Method getName.
* *
* @param uuid UUID * @param uuid UUID
*
* @return String * @return String
*/ */
private String getName(UUID uuid) { private String getName(UUID uuid) {

View File

@ -75,6 +75,7 @@ public class xAuthToFlat {
* Method getIdPlayer. * Method getIdPlayer.
* *
* @param id int * @param id int
*
* @return String * @return String
*/ */
public String getIdPlayer(int id) { public String getIdPlayer(int id) {
@ -129,6 +130,7 @@ public class xAuthToFlat {
* Method getPassword. * Method getPassword.
* *
* @param accountId int * @param accountId int
*
* @return String * @return String
*/ */
public String getPassword(int accountId) { public String getPassword(int accountId) {

View File

@ -53,6 +53,7 @@ public class CacheDataSource implements DataSource {
* Method isAuthAvailable. * Method isAuthAvailable.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ */
@Override @Override
@ -64,6 +65,7 @@ public class CacheDataSource implements DataSource {
* Method getAuth. * Method getAuth.
* *
* @param user String * @param user String
*
* @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ */
@Override @Override
@ -79,6 +81,7 @@ public class CacheDataSource implements DataSource {
* Method saveAuth. * Method saveAuth.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ */
@Override @Override
@ -99,6 +102,7 @@ public class CacheDataSource implements DataSource {
* Method updatePassword. * Method updatePassword.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ */
@Override @Override
@ -125,6 +129,7 @@ public class CacheDataSource implements DataSource {
* Method updateSession. * Method updateSession.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ */
@Override @Override
@ -160,6 +165,7 @@ public class CacheDataSource implements DataSource {
* Method updateQuitLoc. * Method updateQuitLoc.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ */
@Override @Override
@ -198,6 +204,7 @@ public class CacheDataSource implements DataSource {
* Method getIps. * Method getIps.
* *
* @param ip String * @param ip String
*
* @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ */
@Override @Override
@ -215,6 +222,7 @@ public class CacheDataSource implements DataSource {
* Method purgeDatabase. * Method purgeDatabase.
* *
* @param until long * @param until long
*
* @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ */
@Override @Override
@ -234,6 +242,7 @@ public class CacheDataSource implements DataSource {
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* *
* @param until long * @param until long
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ */
@Override @Override
@ -253,6 +262,7 @@ public class CacheDataSource implements DataSource {
* Method removeAuth. * Method removeAuth.
* *
* @param username String * @param username String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ */
@Override @Override
@ -309,6 +319,7 @@ public class CacheDataSource implements DataSource {
* Method updateEmail. * Method updateEmail.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ */
@Override @Override
@ -328,6 +339,7 @@ public class CacheDataSource implements DataSource {
* Method updateSalt. * Method updateSalt.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ */
@Override @Override
@ -355,6 +367,7 @@ public class CacheDataSource implements DataSource {
* Method getAllAuthsByName. * Method getAllAuthsByName.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ */
@Override @Override
@ -372,6 +385,7 @@ public class CacheDataSource implements DataSource {
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* *
* @param ip String * @param ip String
*
* @return List<String> * @throws Exception * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) * @return List<String> * @throws Exception * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ */
@Override @Override
@ -387,6 +401,7 @@ public class CacheDataSource implements DataSource {
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* *
* @param email String * @param email String
*
* @return List<String> * @throws Exception * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) * @return List<String> * @throws Exception * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ */
@Override @Override
@ -402,6 +417,7 @@ public class CacheDataSource implements DataSource {
* Method purgeBanned. * Method purgeBanned.
* *
* @param banned List<String> * @param banned List<String>
*
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ */
@Override @Override
@ -433,6 +449,7 @@ public class CacheDataSource implements DataSource {
* Method isLogged. * Method isLogged.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ */
@Override @Override
@ -445,6 +462,7 @@ public class CacheDataSource implements DataSource {
* Method setLogged. * Method setLogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setLogged(String) * @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ */
@Override @Override
@ -461,6 +479,7 @@ public class CacheDataSource implements DataSource {
* Method setUnlogged. * Method setUnlogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ */
@Override @Override
@ -503,6 +522,7 @@ public class CacheDataSource implements DataSource {
* *
* @param oldone String * @param oldone String
* @param newone String * @param newone String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String) * @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public interface DataSource {
* Method isAuthAvailable. * Method isAuthAvailable.
* *
* @param user String * @param user String
*
* @return boolean * @return boolean
*/ */
boolean isAuthAvailable(String user); boolean isAuthAvailable(String user);
@ -20,6 +21,7 @@ public interface DataSource {
* Method getAuth. * Method getAuth.
* *
* @param user String * @param user String
*
* @return PlayerAuth * @return PlayerAuth
*/ */
PlayerAuth getAuth(String user); PlayerAuth getAuth(String user);
@ -28,6 +30,7 @@ public interface DataSource {
* Method saveAuth. * Method saveAuth.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @return boolean
*/ */
boolean saveAuth(PlayerAuth auth); boolean saveAuth(PlayerAuth auth);
@ -36,6 +39,7 @@ public interface DataSource {
* Method updateSession. * Method updateSession.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @return boolean
*/ */
boolean updateSession(PlayerAuth auth); boolean updateSession(PlayerAuth auth);
@ -44,6 +48,7 @@ public interface DataSource {
* Method updatePassword. * Method updatePassword.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @return boolean
*/ */
boolean updatePassword(PlayerAuth auth); boolean updatePassword(PlayerAuth auth);
@ -52,6 +57,7 @@ public interface DataSource {
* Method purgeDatabase. * Method purgeDatabase.
* *
* @param until long * @param until long
*
* @return int * @return int
*/ */
int purgeDatabase(long until); int purgeDatabase(long until);
@ -60,6 +66,7 @@ public interface DataSource {
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* *
* @param until long * @param until long
*
* @return List<String> * @return List<String>
*/ */
List<String> autoPurgeDatabase(long until); List<String> autoPurgeDatabase(long until);
@ -68,6 +75,7 @@ public interface DataSource {
* Method removeAuth. * Method removeAuth.
* *
* @param user String * @param user String
*
* @return boolean * @return boolean
*/ */
boolean removeAuth(String user); boolean removeAuth(String user);
@ -76,6 +84,7 @@ public interface DataSource {
* Method updateQuitLoc. * Method updateQuitLoc.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @return boolean
*/ */
boolean updateQuitLoc(PlayerAuth auth); boolean updateQuitLoc(PlayerAuth auth);
@ -84,6 +93,7 @@ public interface DataSource {
* Method getIps. * Method getIps.
* *
* @param ip String * @param ip String
*
* @return int * @return int
*/ */
int getIps(String ip); int getIps(String ip);
@ -92,6 +102,7 @@ public interface DataSource {
* Method getAllAuthsByName. * Method getAllAuthsByName.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return List<String> * @return List<String>
*/ */
List<String> getAllAuthsByName(PlayerAuth auth); List<String> getAllAuthsByName(PlayerAuth auth);
@ -100,6 +111,7 @@ public interface DataSource {
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* *
* @param ip String * @param ip String
*
* @return List<String> * @throws Exception * @return List<String> * @throws Exception
*/ */
List<String> getAllAuthsByIp(String ip) throws Exception; List<String> getAllAuthsByIp(String ip) throws Exception;
@ -108,6 +120,7 @@ public interface DataSource {
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* *
* @param email String * @param email String
*
* @return List<String> * @throws Exception * @return List<String> * @throws Exception
*/ */
List<String> getAllAuthsByEmail(String email) throws Exception; List<String> getAllAuthsByEmail(String email) throws Exception;
@ -116,6 +129,7 @@ public interface DataSource {
* Method updateEmail. * Method updateEmail.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @return boolean
*/ */
boolean updateEmail(PlayerAuth auth); boolean updateEmail(PlayerAuth auth);
@ -124,6 +138,7 @@ public interface DataSource {
* Method updateSalt. * Method updateSalt.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @return boolean
*/ */
boolean updateSalt(PlayerAuth auth); boolean updateSalt(PlayerAuth auth);
@ -150,6 +165,7 @@ public interface DataSource {
* Method isLogged. * Method isLogged.
* *
* @param user String * @param user String
*
* @return boolean * @return boolean
*/ */
boolean isLogged(String user); boolean isLogged(String user);

View File

@ -29,6 +29,7 @@ public class DatabaseCalls implements DataSource {
* Method isAuthAvailable. * Method isAuthAvailable.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ */
@Override @Override
@ -48,6 +49,7 @@ public class DatabaseCalls implements DataSource {
* Method getAuth. * Method getAuth.
* *
* @param user String * @param user String
*
* @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ */
@Override @Override
@ -67,6 +69,7 @@ public class DatabaseCalls implements DataSource {
* Method saveAuth. * Method saveAuth.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ */
@Override @Override
@ -86,6 +89,7 @@ public class DatabaseCalls implements DataSource {
* Method updateSession. * Method updateSession.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ */
@Override @Override
@ -105,6 +109,7 @@ public class DatabaseCalls implements DataSource {
* Method updatePassword. * Method updatePassword.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ */
@Override @Override
@ -124,6 +129,7 @@ public class DatabaseCalls implements DataSource {
* Method purgeDatabase. * Method purgeDatabase.
* *
* @param until long * @param until long
*
* @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ */
@Override @Override
@ -143,6 +149,7 @@ public class DatabaseCalls implements DataSource {
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* *
* @param until long * @param until long
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ */
@Override @Override
@ -162,6 +169,7 @@ public class DatabaseCalls implements DataSource {
* Method removeAuth. * Method removeAuth.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ */
@Override @Override
@ -181,6 +189,7 @@ public class DatabaseCalls implements DataSource {
* Method updateQuitLoc. * Method updateQuitLoc.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ */
@Override @Override
@ -200,6 +209,7 @@ public class DatabaseCalls implements DataSource {
* Method getIps. * Method getIps.
* *
* @param ip String * @param ip String
*
* @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ */
@Override @Override
@ -220,6 +230,7 @@ public class DatabaseCalls implements DataSource {
* Method getAllAuthsByName. * Method getAllAuthsByName.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ */
@Override @Override
@ -239,6 +250,7 @@ public class DatabaseCalls implements DataSource {
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* *
* @param ip String * @param ip String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ */
@Override @Override
@ -258,6 +270,7 @@ public class DatabaseCalls implements DataSource {
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* *
* @param email String * @param email String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ */
@Override @Override
@ -277,6 +290,7 @@ public class DatabaseCalls implements DataSource {
* Method updateEmail. * Method updateEmail.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ */
@Override @Override
@ -296,6 +310,7 @@ public class DatabaseCalls implements DataSource {
* Method updateSalt. * Method updateSalt.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ */
@Override @Override
@ -336,6 +351,7 @@ public class DatabaseCalls implements DataSource {
* Method purgeBanned. * Method purgeBanned.
* *
* @param banned List<String> * @param banned List<String>
*
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ */
@Override @Override
@ -361,6 +377,7 @@ public class DatabaseCalls implements DataSource {
* Method isLogged. * Method isLogged.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ */
@Override @Override
@ -380,6 +397,7 @@ public class DatabaseCalls implements DataSource {
* Method setLogged. * Method setLogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setLogged(String) * @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ */
@Override @Override
@ -395,6 +413,7 @@ public class DatabaseCalls implements DataSource {
* Method setUnlogged. * Method setUnlogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ */
@Override @Override
@ -443,6 +462,7 @@ public class DatabaseCalls implements DataSource {
* *
* @param oldone String * @param oldone String
* @param newone String * @param newone String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String) * @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ */
@Override @Override

View File

@ -48,6 +48,7 @@ public class FlatFile implements DataSource {
* Method isAuthAvailable. * Method isAuthAvailable.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ */
@Override @Override
@ -83,6 +84,7 @@ public class FlatFile implements DataSource {
* Method saveAuth. * Method saveAuth.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ */
@Override @Override
@ -112,6 +114,7 @@ public class FlatFile implements DataSource {
* Method updatePassword. * Method updatePassword.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ */
@Override @Override
@ -177,6 +180,7 @@ public class FlatFile implements DataSource {
* Method updateSession. * Method updateSession.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ */
@Override @Override
@ -242,6 +246,7 @@ public class FlatFile implements DataSource {
* Method updateQuitLoc. * Method updateQuitLoc.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ */
@Override @Override
@ -286,6 +291,7 @@ public class FlatFile implements DataSource {
* Method getIps. * Method getIps.
* *
* @param ip String * @param ip String
*
* @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ */
@Override @Override
@ -322,6 +328,7 @@ public class FlatFile implements DataSource {
* Method purgeDatabase. * Method purgeDatabase.
* *
* @param until long * @param until long
*
* @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ */
@Override @Override
@ -374,6 +381,7 @@ public class FlatFile implements DataSource {
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* *
* @param until long * @param until long
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ */
@Override @Override
@ -426,6 +434,7 @@ public class FlatFile implements DataSource {
* Method removeAuth. * Method removeAuth.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ */
@Override @Override
@ -476,6 +485,7 @@ public class FlatFile implements DataSource {
* Method getAuth. * Method getAuth.
* *
* @param user String * @param user String
*
* @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ */
@Override @Override
@ -542,6 +552,7 @@ public class FlatFile implements DataSource {
* Method updateEmail. * Method updateEmail.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ */
@Override @Override
@ -586,6 +597,7 @@ public class FlatFile implements DataSource {
* Method updateSalt. * Method updateSalt.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ */
@Override @Override
@ -597,6 +609,7 @@ public class FlatFile implements DataSource {
* Method getAllAuthsByName. * Method getAllAuthsByName.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ */
@Override @Override
@ -633,6 +646,7 @@ public class FlatFile implements DataSource {
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* *
* @param ip String * @param ip String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ */
@Override @Override
@ -669,6 +683,7 @@ public class FlatFile implements DataSource {
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* *
* @param email String * @param email String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ */
@Override @Override
@ -705,6 +720,7 @@ public class FlatFile implements DataSource {
* Method purgeBanned. * Method purgeBanned.
* *
* @param banned List<String> * @param banned List<String>
*
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ */
@Override @Override
@ -765,6 +781,7 @@ public class FlatFile implements DataSource {
* Method isLogged. * Method isLogged.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ */
@Override @Override
@ -776,6 +793,7 @@ public class FlatFile implements DataSource {
* Method setLogged. * Method setLogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setLogged(String) * @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ */
@Override @Override
@ -786,6 +804,7 @@ public class FlatFile implements DataSource {
* Method setUnlogged. * Method setUnlogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ */
@Override @Override
@ -834,6 +853,7 @@ public class FlatFile implements DataSource {
* *
* @param oldone String * @param oldone String
* @param newone String * @param newone String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String) * @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ */
@Override @Override

View File

@ -218,6 +218,7 @@ public class MySQL implements DataSource {
* Method isAuthAvailable. * Method isAuthAvailable.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ */
@Override @Override
@ -246,6 +247,7 @@ public class MySQL implements DataSource {
* Method getAuth. * Method getAuth.
* *
* @param user String * @param user String
*
* @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ */
@Override @Override
@ -305,6 +307,7 @@ public class MySQL implements DataSource {
* Method saveAuth. * Method saveAuth.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ */
@Override @Override
@ -518,6 +521,7 @@ public class MySQL implements DataSource {
* Method updatePassword. * Method updatePassword.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ */
@Override @Override
@ -569,6 +573,7 @@ public class MySQL implements DataSource {
* Method updateSession. * Method updateSession.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ */
@Override @Override
@ -598,6 +603,7 @@ public class MySQL implements DataSource {
* Method purgeDatabase. * Method purgeDatabase.
* *
* @param until long * @param until long
*
* @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ */
@Override @Override
@ -623,6 +629,7 @@ public class MySQL implements DataSource {
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* *
* @param until long * @param until long
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ */
@Override @Override
@ -659,6 +666,7 @@ public class MySQL implements DataSource {
* Method removeAuth. * Method removeAuth.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ */
@Override @Override
@ -702,6 +710,7 @@ public class MySQL implements DataSource {
* Method updateQuitLoc. * Method updateQuitLoc.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ */
@Override @Override
@ -732,6 +741,7 @@ public class MySQL implements DataSource {
* Method getIps. * Method getIps.
* *
* @param ip String * @param ip String
*
* @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ */
@Override @Override
@ -764,6 +774,7 @@ public class MySQL implements DataSource {
* Method updateEmail. * Method updateEmail.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ */
@Override @Override
@ -792,6 +803,7 @@ public class MySQL implements DataSource {
* Method updateSalt. * Method updateSalt.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ */
@Override @Override
@ -869,6 +881,7 @@ public class MySQL implements DataSource {
* Method getAllAuthsByName. * Method getAllAuthsByName.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ */
@Override @Override
@ -901,6 +914,7 @@ public class MySQL implements DataSource {
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* *
* @param ip String * @param ip String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ */
@Override @Override
@ -933,6 +947,7 @@ public class MySQL implements DataSource {
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* *
* @param email String * @param email String
*
* @return List<String> * @throws SQLException * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) * @return List<String> * @throws SQLException * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ */
@Override @Override
@ -961,6 +976,7 @@ public class MySQL implements DataSource {
* Method purgeBanned. * Method purgeBanned.
* *
* @param banned List<String> * @param banned List<String>
*
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ */
@Override @Override
@ -997,6 +1013,7 @@ public class MySQL implements DataSource {
* Method isLogged. * Method isLogged.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ */
@Override @Override
@ -1027,6 +1044,7 @@ public class MySQL implements DataSource {
* Method setLogged. * Method setLogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setLogged(String) * @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ */
@Override @Override
@ -1052,6 +1070,7 @@ public class MySQL implements DataSource {
* Method setUnlogged. * Method setUnlogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ */
@Override @Override
@ -1132,6 +1151,7 @@ public class MySQL implements DataSource {
* *
* @param oldone String * @param oldone String
* @param newone String * @param newone String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String) * @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ */
@Override @Override

View File

@ -137,6 +137,7 @@ public class SQLite implements DataSource {
* Method isAuthAvailable. * Method isAuthAvailable.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ */
@Override @Override
@ -161,6 +162,7 @@ public class SQLite implements DataSource {
* Method getAuth. * Method getAuth.
* *
* @param user String * @param user String
*
* @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ */
@Override @Override
@ -197,6 +199,7 @@ public class SQLite implements DataSource {
* Method saveAuth. * Method saveAuth.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ */
@Override @Override
@ -234,6 +237,7 @@ public class SQLite implements DataSource {
* Method updatePassword. * Method updatePassword.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ */
@Override @Override
@ -257,6 +261,7 @@ public class SQLite implements DataSource {
* Method updateSession. * Method updateSession.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ */
@Override @Override
@ -282,6 +287,7 @@ public class SQLite implements DataSource {
* Method purgeDatabase. * Method purgeDatabase.
* *
* @param until long * @param until long
*
* @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ */
@Override @Override
@ -304,6 +310,7 @@ public class SQLite implements DataSource {
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* *
* @param until long * @param until long
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ */
@Override @Override
@ -332,6 +339,7 @@ public class SQLite implements DataSource {
* Method removeAuth. * Method removeAuth.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ */
@Override @Override
@ -354,6 +362,7 @@ public class SQLite implements DataSource {
* Method updateQuitLoc. * Method updateQuitLoc.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ */
@Override @Override
@ -380,6 +389,7 @@ public class SQLite implements DataSource {
* Method getIps. * Method getIps.
* *
* @param ip String * @param ip String
*
* @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ */
@Override @Override
@ -408,6 +418,7 @@ public class SQLite implements DataSource {
* Method updateEmail. * Method updateEmail.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ */
@Override @Override
@ -431,6 +442,7 @@ public class SQLite implements DataSource {
* Method updateSalt. * Method updateSalt.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ */
@Override @Override
@ -510,6 +522,7 @@ public class SQLite implements DataSource {
* Method getAllAuthsByName. * Method getAllAuthsByName.
* *
* @param auth PlayerAuth * @param auth PlayerAuth
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ */
@Override @Override
@ -540,6 +553,7 @@ public class SQLite implements DataSource {
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* *
* @param ip String * @param ip String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ */
@Override @Override
@ -570,6 +584,7 @@ public class SQLite implements DataSource {
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* *
* @param email String * @param email String
*
* @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ */
@Override @Override
@ -600,6 +615,7 @@ public class SQLite implements DataSource {
* Method purgeBanned. * Method purgeBanned.
* *
* @param banned List<String> * @param banned List<String>
*
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ */
@Override @Override
@ -632,6 +648,7 @@ public class SQLite implements DataSource {
* Method isLogged. * Method isLogged.
* *
* @param user String * @param user String
*
* @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ */
@Override @Override
@ -658,6 +675,7 @@ public class SQLite implements DataSource {
* Method setLogged. * Method setLogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setLogged(String) * @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ */
@Override @Override
@ -679,6 +697,7 @@ public class SQLite implements DataSource {
* Method setUnlogged. * Method setUnlogged.
* *
* @param user String * @param user String
*
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ */
@Override @Override
@ -747,6 +766,7 @@ public class SQLite implements DataSource {
* *
* @param oldone String * @param oldone String
* @param newone String * @param newone String
*
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String) * @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ */
@Override @Override

View File

@ -57,6 +57,7 @@ public class CustomEvent extends Event implements Cancellable {
* Method setCancelled. * Method setCancelled.
* *
* @param cancelled boolean * @param cancelled boolean
*
* @see org.bukkit.event.Cancellable#setCancelled(boolean) * @see org.bukkit.event.Cancellable#setCancelled(boolean)
*/ */
public void setCancelled(boolean cancelled) { public void setCancelled(boolean cancelled) {

View File

@ -27,6 +27,7 @@ public class BungeeCordMessage implements PluginMessageListener {
* @param channel String * @param channel String
* @param player Player * @param player Player
* @param message byte[] * @param message byte[]
*
* @see org.bukkit.plugin.messaging.PluginMessageListener#onPluginMessageReceived(String, Player, byte[]) * @see org.bukkit.plugin.messaging.PluginMessageListener#onPluginMessageReceived(String, Player, byte[])
*/ */
@Override @Override

View File

@ -57,6 +57,7 @@ public class AuthMeInventoryPacketAdapter extends PacketAdapter {
* Method onPacketSending. * Method onPacketSending.
* *
* @param packetEvent PacketEvent * @param packetEvent PacketEvent
*
* @see com.comphenix.protocol.events.PacketListener#onPacketSending(PacketEvent) * @see com.comphenix.protocol.events.PacketListener#onPacketSending(PacketEvent)
*/ */
@Override @Override

View File

@ -33,6 +33,7 @@ public class ModuleManager {
* Method isModuleEnabled. * Method isModuleEnabled.
* *
* @param name String * @param name String
*
* @return boolean * @return boolean
*/ */
public boolean isModuleEnabled(String name) { public boolean isModuleEnabled(String name) {
@ -47,6 +48,7 @@ public class ModuleManager {
* Method isModuleEnabled. * Method isModuleEnabled.
* *
* @param type Module.ModuleType * @param type Module.ModuleType
*
* @return boolean * @return boolean
*/ */
public boolean isModuleEnabled(Module.ModuleType type) { public boolean isModuleEnabled(Module.ModuleType type) {
@ -61,6 +63,7 @@ public class ModuleManager {
* Method getModule. * Method getModule.
* *
* @param name String * @param name String
*
* @return Module * @return Module
*/ */
public Module getModule(String name) { public Module getModule(String name) {
@ -75,6 +78,7 @@ public class ModuleManager {
* Method getModule. * Method getModule.
* *
* @param type Module.ModuleType * @param type Module.ModuleType
*
* @return Module * @return Module
*/ */
public Module getModule(Module.ModuleType type) { public Module getModule(Module.ModuleType type) {

View File

@ -318,6 +318,7 @@ public class PermissionsManager {
* *
* @param player The player. * @param player The player.
* @param permsNode Permissions node. * @param permsNode Permissions node.
*
* @return True if the player has permission. * @return True if the player has permission.
*/ */
public boolean hasPermission(Player player, String permsNode) { public boolean hasPermission(Player player, String permsNode) {
@ -330,6 +331,7 @@ public class PermissionsManager {
* @param player The player. * @param player The player.
* @param permsNode The permission node. * @param permsNode The permission node.
* @param def Default returned if no permissions system is used. * @param def Default returned if no permissions system is used.
*
* @return True if the player has permission. * @return True if the player has permission.
*/ */
public boolean hasPermission(Player player, String permsNode, boolean def) { public boolean hasPermission(Player player, String permsNode, boolean def) {
@ -425,6 +427,7 @@ public class PermissionsManager {
* Get the permission groups of a player, if available. * Get the permission groups of a player, if available.
* *
* @param player The player. * @param player The player.
*
* @return Permission groups, or an empty list if this feature is not supported. * @return Permission groups, or an empty list if this feature is not supported.
*/ */
@SuppressWarnings({"unchecked", "rawtypes", "deprecation"}) @SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
@ -489,6 +492,7 @@ public class PermissionsManager {
* Get the primary group of a player, if available. * Get the primary group of a player, if available.
* *
* @param player The player. * @param player The player.
*
* @return The name of the primary permission group. Or null. * @return The name of the primary permission group. Or null.
*/ */
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
@ -542,6 +546,7 @@ public class PermissionsManager {
* *
* @param player The player. * @param player The player.
* @param groupName The group name. * @param groupName The group name.
*
* @return True if the player is in the specified group, false otherwise. * @return True if the player is in the specified group, false otherwise.
* False is also returned if groups aren't supported by the used permissions system. * False is also returned if groups aren't supported by the used permissions system.
*/ */
@ -599,6 +604,7 @@ public class PermissionsManager {
* *
* @param player The player * @param player The player
* @param groupName The name of the group. * @param groupName The name of the group.
*
* @return True if succeed, false otherwise. * @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system. * False is also returned if this feature isn't supported for the current permissions system.
*/ */
@ -660,6 +666,7 @@ public class PermissionsManager {
* *
* @param player The player * @param player The player
* @param groupNames The name of the groups to add. * @param groupNames The name of the groups to add.
*
* @return True if succeed, false otherwise. * @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system. * False is also returned if this feature isn't supported for the current permissions system.
*/ */
@ -683,6 +690,7 @@ public class PermissionsManager {
* *
* @param player The player * @param player The player
* @param groupName The name of the group. * @param groupName The name of the group.
*
* @return True if succeed, false otherwise. * @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system. * False is also returned if this feature isn't supported for the current permissions system.
*/ */
@ -744,6 +752,7 @@ public class PermissionsManager {
* *
* @param player The player * @param player The player
* @param groupNames The name of the groups to add. * @param groupNames The name of the groups to add.
*
* @return True if succeed, false otherwise. * @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system. * False is also returned if this feature isn't supported for the current permissions system.
*/ */
@ -768,6 +777,7 @@ public class PermissionsManager {
* *
* @param player The player * @param player The player
* @param groupName The name of the group. * @param groupName The name of the group.
*
* @return True if succeed, false otherwise. * @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system. * False is also returned if this feature isn't supported for the current permissions system.
*/ */
@ -837,6 +847,7 @@ public class PermissionsManager {
* *
* @param player The player * @param player The player
* @param groupNames The name of the groups to set. * @param groupNames The name of the groups to set.
*
* @return True if succeed, false otherwise. * @return True if succeed, false otherwise.
* False is also returned if this feature isn't supported for the current permissions system. * False is also returned if this feature isn't supported for the current permissions system.
*/ */
@ -870,6 +881,7 @@ public class PermissionsManager {
* in it's primary group. All the subgroups are removed just fine. * in it's primary group. All the subgroups are removed just fine.
* *
* @param player The player to remove all groups from. * @param player The player to remove all groups from.
*
* @return True if succeed, false otherwise. * @return True if succeed, false otherwise.
* False will also be returned if this feature isn't supported for the used permissions system. * False will also be returned if this feature isn't supported for the used permissions system.
*/ */

View File

@ -25,6 +25,7 @@ public class PasswordSecurity {
* Method createSalt. * Method createSalt.
* *
* @param length int * @param length int
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
public static String createSalt(int length) public static String createSalt(int length)
@ -43,6 +44,7 @@ public class PasswordSecurity {
* @param alg HashAlgorithm * @param alg HashAlgorithm
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
public static String getHash(HashAlgorithm alg, String password, public static String getHash(HashAlgorithm alg, String password,
@ -146,6 +148,7 @@ public class PasswordSecurity {
* @param password String * @param password String
* @param hash String * @param hash String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @return boolean * @throws NoSuchAlgorithmException
*/ */
public static boolean comparePasswordWithHash(String password, String hash, public static boolean comparePasswordWithHash(String password, String hash,
@ -184,6 +187,7 @@ public class PasswordSecurity {
* @param password String * @param password String
* @param hash String * @param hash String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @return boolean * @throws NoSuchAlgorithmException
*/ */
private static boolean compareWithAllEncryptionMethod(String password, private static boolean compareWithAllEncryptionMethod(String password,

View File

@ -92,6 +92,7 @@ public class BCRYPT implements EncryptionMethod {
* *
* @param d the byte array to encode * @param d the byte array to encode
* @param len the number of bytes to encode * @param len the number of bytes to encode
*
* @return base64-encoded string * @throws IllegalArgumentException if the length is invalid * @throws IllegalArgumentException * @return base64-encoded string * @throws IllegalArgumentException if the length is invalid * @throws IllegalArgumentException
*/ */
private static String encode_base64(byte d[], int len) private static String encode_base64(byte d[], int len)
@ -132,6 +133,7 @@ public class BCRYPT implements EncryptionMethod {
* range-checking againt conversion table * range-checking againt conversion table
* *
* @param x the base64-encoded value * @param x the base64-encoded value
*
* @return the decoded value of x * @return the decoded value of x
*/ */
private static byte char64(char x) { private static byte char64(char x) {
@ -147,6 +149,7 @@ public class BCRYPT implements EncryptionMethod {
* *
* @param s the string to decode * @param s the string to decode
* @param maxolen the maximum number of bytes to decode * @param maxolen the maximum number of bytes to decode
*
* @return an array containing the decoded bytes * @throws IllegalArgumentException if maxolen is invalid * @throws IllegalArgumentException * @return an array containing the decoded bytes * @throws IllegalArgumentException if maxolen is invalid * @throws IllegalArgumentException
*/ */
private static byte[] decode_base64(String s, int maxolen) private static byte[] decode_base64(String s, int maxolen)
@ -196,6 +199,7 @@ public class BCRYPT implements EncryptionMethod {
* @param data the string to extract the data from * @param data the string to extract the data from
* @param offp a "pointer" (as a one-entry array) to the current offset into * @param offp a "pointer" (as a one-entry array) to the current offset into
* data * data
*
* @return the next word of material from data * @return the next word of material from data
*/ */
private static int streamtoword(byte data[], int offp[]) { private static int streamtoword(byte data[], int offp[]) {
@ -217,6 +221,7 @@ public class BCRYPT implements EncryptionMethod {
* *
* @param password the password to hash * @param password the password to hash
* @param salt the salt to hash with (perhaps generated using BCrypt.gensalt) * @param salt the salt to hash with (perhaps generated using BCrypt.gensalt)
*
* @return the hashed password * @return the hashed password
*/ */
public static String hashpw(String password, String salt) { public static String hashpw(String password, String salt) {
@ -274,6 +279,7 @@ public class BCRYPT implements EncryptionMethod {
* @param log_rounds the log2 of the number of rounds of hashing to apply - the * @param log_rounds the log2 of the number of rounds of hashing to apply - the
* work factor therefore increases as 2**log_rounds. * work factor therefore increases as 2**log_rounds.
* @param random an instance of SecureRandom to use * @param random an instance of SecureRandom to use
*
* @return an encoded salt value * @return an encoded salt value
*/ */
public static String gensalt(int log_rounds, SecureRandom random) { public static String gensalt(int log_rounds, SecureRandom random) {
@ -296,6 +302,7 @@ public class BCRYPT implements EncryptionMethod {
* *
* @param log_rounds the log2 of the number of rounds of hashing to apply - the * @param log_rounds the log2 of the number of rounds of hashing to apply - the
* work factor therefore increases as 2**log_rounds. * work factor therefore increases as 2**log_rounds.
*
* @return an encoded salt value * @return an encoded salt value
*/ */
public static String gensalt(int log_rounds) { public static String gensalt(int log_rounds) {
@ -317,6 +324,7 @@ public class BCRYPT implements EncryptionMethod {
* *
* @param plaintext the plaintext password to verify * @param plaintext the plaintext password to verify
* @param hashed the previously-hashed password * @param hashed the previously-hashed password
*
* @return true if the passwords match, false otherwise * @return true if the passwords match, false otherwise
*/ */
public static boolean checkpw(String plaintext, String hashed) { public static boolean checkpw(String plaintext, String hashed) {
@ -330,6 +338,7 @@ public class BCRYPT implements EncryptionMethod {
* @param text plaintext or hashed text * @param text plaintext or hashed text
* @param hashed the previously-hashed password * @param hashed the previously-hashed password
* @param rounds number of rounds to hash the password * @param rounds number of rounds to hash the password
*
* @return boolean * @return boolean
*/ */
public static boolean checkpw(String text, String hashed, int rounds) { public static boolean checkpw(String text, String hashed, int rounds) {
@ -355,6 +364,7 @@ public class BCRYPT implements EncryptionMethod {
* *
* @param text String * @param text String
* @param salt String * @param salt String
*
* @return String * @return String
*/ */
public static String getDoubleHash(String text, String salt) { public static String getDoubleHash(String text, String salt) {
@ -467,6 +477,7 @@ public class BCRYPT implements EncryptionMethod {
* @param salt the binary salt to hash with the password * @param salt the binary salt to hash with the password
* @param log_rounds the binary logarithm of the number of rounds of hashing to * @param log_rounds the binary logarithm of the number of rounds of hashing to
* apply * apply
*
* @return an array containing the binary hashed password * @return an array containing the binary hashed password
*/ */
private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) { private byte[] crypt_raw(byte password[], byte salt[], int log_rounds) {
@ -509,6 +520,7 @@ public class BCRYPT implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -523,6 +535,7 @@ public class BCRYPT implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class BCRYPT2Y implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -28,6 +29,7 @@ public class BCRYPT2Y implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -32,6 +32,7 @@ public class CRAZYCRYPT1 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override

View File

@ -15,6 +15,7 @@ public class CryptPBKDF2 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -33,6 +34,7 @@ public class CryptPBKDF2 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -16,6 +16,7 @@ public class CryptPBKDF2Django implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -34,6 +35,7 @@ public class CryptPBKDF2Django implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* Method getMD5. * Method getMD5.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getMD5(String message) private static String getMD5(String message)
@ -29,6 +30,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class DOUBLEMD5 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -24,6 +24,7 @@ public interface EncryptionMethod {
* @param salt (can be an other data like playerName;salt , playerName, * @param salt (can be an other data like playerName;salt , playerName,
* etc... for customs methods) * etc... for customs methods)
* @param name String * @param name String
*
* @return Hashing password * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException * @return Hashing password * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/ */
String getHash(String password, String salt, String name) String getHash(String password, String salt, String name)
@ -33,6 +34,7 @@ public interface EncryptionMethod {
* @param hash * @param hash
* @param password * @param password
* @param playerName * @param playerName
*
* @return true if password match, false else * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException * @return true if password match, false else * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/ */
boolean comparePassword(String hash, String password, String playerName) boolean comparePassword(String hash, String password, String playerName)

View File

@ -14,6 +14,7 @@ public class IPB3 implements EncryptionMethod {
* Method getMD5. * Method getMD5.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getMD5(String message) private static String getMD5(String message)
@ -31,6 +32,7 @@ public class IPB3 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -45,6 +47,7 @@ public class IPB3 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class JOOMLA implements EncryptionMethod {
* Method getMD5. * Method getMD5.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getMD5(String message) private static String getMD5(String message)
@ -29,6 +30,7 @@ public class JOOMLA implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class JOOMLA implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class MD5 implements EncryptionMethod {
* Method getMD5. * Method getMD5.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getMD5(String message) private static String getMD5(String message)
@ -29,6 +30,7 @@ public class MD5 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class MD5 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class MD5VB implements EncryptionMethod {
* Method getMD5. * Method getMD5.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getMD5(String message) private static String getMD5(String message)
@ -29,6 +30,7 @@ public class MD5VB implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class MD5VB implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -14,6 +14,7 @@ public class MYBB implements EncryptionMethod {
* Method getMD5. * Method getMD5.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getMD5(String message) private static String getMD5(String message)
@ -31,6 +32,7 @@ public class MYBB implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -45,6 +47,7 @@ public class MYBB implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -21,6 +21,7 @@ public class PHPBB implements EncryptionMethod {
* Method md5. * Method md5.
* *
* @param data String * @param data String
*
* @return String * @return String
*/ */
public static String md5(String data) { public static String md5(String data) {
@ -38,6 +39,7 @@ public class PHPBB implements EncryptionMethod {
* Method hexToInt. * Method hexToInt.
* *
* @param ch char * @param ch char
*
* @return int * @return int
*/ */
static int hexToInt(char ch) { static int hexToInt(char ch) {
@ -53,6 +55,7 @@ public class PHPBB implements EncryptionMethod {
* Method bytes2hex. * Method bytes2hex.
* *
* @param bytes byte[] * @param bytes byte[]
*
* @return String * @return String
*/ */
private static String bytes2hex(byte[] bytes) { private static String bytes2hex(byte[] bytes) {
@ -70,6 +73,7 @@ public class PHPBB implements EncryptionMethod {
* Method pack. * Method pack.
* *
* @param hex String * @param hex String
*
* @return String * @return String
*/ */
static String pack(String hex) { static String pack(String hex) {
@ -88,6 +92,7 @@ public class PHPBB implements EncryptionMethod {
* *
* @param password String * @param password String
* @param salt String * @param salt String
*
* @return String * @return String
*/ */
public String phpbb_hash(String password, String salt) { public String phpbb_hash(String password, String salt) {
@ -110,6 +115,7 @@ public class PHPBB implements EncryptionMethod {
* *
* @param input String * @param input String
* @param itoa64 String * @param itoa64 String
*
* @return String * @return String
*/ */
private String _hash_gensalt_private(String input, String itoa64) { private String _hash_gensalt_private(String input, String itoa64) {
@ -122,6 +128,7 @@ public class PHPBB implements EncryptionMethod {
* @param input String * @param input String
* @param itoa64 String * @param itoa64 String
* @param iteration_count_log2 int * @param iteration_count_log2 int
*
* @return String * @return String
*/ */
private String _hash_gensalt_private(String input, String itoa64, private String _hash_gensalt_private(String input, String itoa64,
@ -140,6 +147,7 @@ public class PHPBB implements EncryptionMethod {
* *
* @param input String * @param input String
* @param count int * @param count int
*
* @return String * @return String
*/ */
private String _hash_encode64(String input, int count) { private String _hash_encode64(String input, int count) {
@ -168,6 +176,7 @@ public class PHPBB implements EncryptionMethod {
* *
* @param password String * @param password String
* @param setting String * @param setting String
*
* @return String * @return String
*/ */
String _hash_crypt_private(String password, String setting) { String _hash_crypt_private(String password, String setting) {
@ -196,6 +205,7 @@ public class PHPBB implements EncryptionMethod {
* *
* @param password String * @param password String
* @param hash String * @param hash String
*
* @return boolean * @return boolean
*/ */
public boolean phpbb_check_hash(String password, String hash) { public boolean phpbb_check_hash(String password, String hash) {
@ -210,6 +220,7 @@ public class PHPBB implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -224,6 +235,7 @@ public class PHPBB implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -18,6 +18,7 @@ public class PHPFUSION implements EncryptionMethod {
* Method getSHA1. * Method getSHA1.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getSHA1(String message) private static String getSHA1(String message)
@ -35,6 +36,7 @@ public class PHPFUSION implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -70,6 +72,7 @@ public class PHPFUSION implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class PLAINTEXT implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -26,6 +27,7 @@ public class PLAINTEXT implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -13,6 +13,7 @@ public class ROYALAUTH implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -28,6 +29,7 @@ public class ROYALAUTH implements EncryptionMethod {
* *
* @param password String * @param password String
* @param salt String * @param salt String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
public String hash(String password, String salt) public String hash(String password, String salt)
@ -47,6 +49,7 @@ public class ROYALAUTH implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -14,6 +14,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* Method getMD5. * Method getMD5.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getMD5(String message) private static String getMD5(String message)
@ -31,6 +32,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -45,6 +47,7 @@ public class SALTED2MD5 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -14,6 +14,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* Method getSHA512. * Method getSHA512.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getSHA512(String message) private static String getSHA512(String message)
@ -31,6 +32,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -45,6 +47,7 @@ public class SALTEDSHA512 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class SHA1 implements EncryptionMethod {
* Method getSHA1. * Method getSHA1.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getSHA1(String message) private static String getSHA1(String message)
@ -29,6 +30,7 @@ public class SHA1 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class SHA1 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class SHA256 implements EncryptionMethod {
* Method getSHA256. * Method getSHA256.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getSHA256(String message) private static String getSHA256(String message)
@ -29,6 +30,7 @@ public class SHA256 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class SHA256 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class SHA512 implements EncryptionMethod {
* Method getSHA512. * Method getSHA512.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getSHA512(String message) private static String getSHA512(String message)
@ -29,6 +30,7 @@ public class SHA512 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class SHA512 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class SMF implements EncryptionMethod {
* Method getSHA1. * Method getSHA1.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getSHA1(String message) private static String getSHA1(String message)
@ -29,6 +30,7 @@ public class SMF implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class SMF implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -14,6 +14,7 @@ public class WBB3 implements EncryptionMethod {
* Method getSHA1. * Method getSHA1.
* *
* @param message String * @param message String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
private static String getSHA1(String message) private static String getSHA1(String message)
@ -31,6 +32,7 @@ public class WBB3 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -45,6 +47,7 @@ public class WBB3 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -12,6 +12,7 @@ public class WBB4 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -26,6 +27,7 @@ public class WBB4 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -168,6 +168,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* Method display. * Method display.
* *
* @param array byte[] * @param array byte[]
*
* @return String * @return String
*/ */
protected static String display(byte[] array) { protected static String display(byte[] array) {
@ -395,6 +396,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -413,6 +415,7 @@ public class WHIRLPOOL implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -18,6 +18,7 @@ public class WORDPRESS implements EncryptionMethod {
* *
* @param src byte[] * @param src byte[]
* @param count int * @param count int
*
* @return String * @return String
*/ */
private String encode64(byte[] src, int count) { private String encode64(byte[] src, int count) {
@ -59,6 +60,7 @@ public class WORDPRESS implements EncryptionMethod {
* *
* @param password String * @param password String
* @param setting String * @param setting String
*
* @return String * @return String
*/ */
private String crypt(String password, String setting) { private String crypt(String password, String setting) {
@ -103,6 +105,7 @@ public class WORDPRESS implements EncryptionMethod {
* Method gensaltPrivate. * Method gensaltPrivate.
* *
* @param input byte[] * @param input byte[]
*
* @return String * @return String
*/ */
private String gensaltPrivate(byte[] input) { private String gensaltPrivate(byte[] input) {
@ -117,6 +120,7 @@ public class WORDPRESS implements EncryptionMethod {
* Method stringToUtf8. * Method stringToUtf8.
* *
* @param string String * @param string String
*
* @return byte[] * @return byte[]
*/ */
private byte[] stringToUtf8(String string) { private byte[] stringToUtf8(String string) {
@ -133,6 +137,7 @@ public class WORDPRESS implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -149,6 +154,7 @@ public class WORDPRESS implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -10,6 +10,7 @@ public class XAUTH implements EncryptionMethod {
* Method getWhirlpool. * Method getWhirlpool.
* *
* @param message String * @param message String
*
* @return String * @return String
*/ */
public static String getWhirlpool(String message) { public static String getWhirlpool(String message) {
@ -27,6 +28,7 @@ public class XAUTH implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -43,6 +45,7 @@ public class XAUTH implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override

View File

@ -19,6 +19,7 @@ public class XF implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
*
* @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ */
@Override @Override
@ -33,6 +34,7 @@ public class XF implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
*
* @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override
@ -46,6 +48,7 @@ public class XF implements EncryptionMethod {
* Method getSHA256. * Method getSHA256.
* *
* @param password String * @param password String
*
* @return String * @throws NoSuchAlgorithmException * @return String * @throws NoSuchAlgorithmException
*/ */
public String getSHA256(String password) throws NoSuchAlgorithmException { public String getSHA256(String password) throws NoSuchAlgorithmException {
@ -72,6 +75,7 @@ public class XF implements EncryptionMethod {
* *
* @param pattern String * @param pattern String
* @param line String * @param line String
*
* @return String * @return String
*/ */
public String regmatch(String pattern, String line) { public String regmatch(String pattern, String line) {

View File

@ -38,6 +38,7 @@ public class BinTools {
* Simple binary-to-hexadecimal conversion. * Simple binary-to-hexadecimal conversion.
* *
* @param b Input bytes. May be <code>null</code>. * @param b Input bytes. May be <code>null</code>.
*
* @return Hexadecimal representation of b. Uppercase A-F, two characters * @return Hexadecimal representation of b. Uppercase A-F, two characters
* per byte. Empty string on <code>null</code> input. * per byte. Empty string on <code>null</code> input.
*/ */
@ -59,6 +60,7 @@ public class BinTools {
* *
* @param s String containing hexadecimal digits. May be <code>null</code> * @param s String containing hexadecimal digits. May be <code>null</code>
* . On odd length leading zero will be assumed. * . On odd length leading zero will be assumed.
*
* @return Array on bytes, non-<code>null</code>. * @throws IllegalArgumentException * @return Array on bytes, non-<code>null</code>. * @throws IllegalArgumentException
* when string contains non-hex character * when string contains non-hex character
*/ */
@ -84,6 +86,7 @@ public class BinTools {
* Convert hex digit to numerical value. * Convert hex digit to numerical value.
* *
* @param c 0-9, a-f, A-F allowd. * @param c 0-9, a-f, A-F allowd.
*
* @return 0-15 * @throws IllegalArgumentException * @return 0-15 * @throws IllegalArgumentException
* on non-hex character * on non-hex character
*/ */

View File

@ -83,6 +83,7 @@ public class MacBasedPRF implements PRF {
* Method doFinal. * Method doFinal.
* *
* @param M byte[] * @param M byte[]
*
* @return byte[] * @see fr.xephi.authme.security.pbkdf2.PRF#doFinal(byte[]) * @return byte[] * @see fr.xephi.authme.security.pbkdf2.PRF#doFinal(byte[])
*/ */
public byte[] doFinal(byte[] M) { public byte[] doFinal(byte[] M) {
@ -103,6 +104,7 @@ public class MacBasedPRF implements PRF {
* Method init. * Method init.
* *
* @param P byte[] * @param P byte[]
*
* @see fr.xephi.authme.security.pbkdf2.PRF#init(byte[]) * @see fr.xephi.authme.security.pbkdf2.PRF#init(byte[])
*/ */
public void init(byte[] P) { public void init(byte[] P) {

View File

@ -38,6 +38,7 @@ public interface PBKDF2 {
* Desired key length defaults to Pseudo Random Function block size. * Desired key length defaults to Pseudo Random Function block size.
* *
* @param inputPassword Candidate password to compute the derived key for. * @param inputPassword Candidate password to compute the derived key for.
*
* @return internal byte array * @return internal byte array
*/ */
public abstract byte[] deriveKey(String inputPassword); public abstract byte[] deriveKey(String inputPassword);
@ -47,6 +48,7 @@ public interface PBKDF2 {
* *
* @param inputPassword Candidate password to compute the derived key for. * @param inputPassword Candidate password to compute the derived key for.
* @param dkLen Specify desired key length * @param dkLen Specify desired key length
*
* @return internal byte array * @return internal byte array
*/ */
public abstract byte[] deriveKey(String inputPassword, int dkLen); public abstract byte[] deriveKey(String inputPassword, int dkLen);
@ -57,6 +59,7 @@ public interface PBKDF2 {
* PBKDF2Parameters. * PBKDF2Parameters.
* *
* @param inputPassword Candidate password to compute the derived key for. * @param inputPassword Candidate password to compute the derived key for.
*
* @return <code>true</code> password match; <code>false</code> incorrect * @return <code>true</code> password match; <code>false</code> incorrect
* password * password
*/ */

View File

@ -120,6 +120,7 @@ public class PBKDF2Engine implements PBKDF2 {
* 48290A0B96C426C3:1000:973899B1D4AFEB3ED371060D0797E0EE0142BD04 * 48290A0B96C426C3:1000:973899B1D4AFEB3ED371060D0797E0EE0142BD04
* *
* @param args Supply the password as argument. * @param args Supply the password as argument.
*
* @throws IOException * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException * @throws IOException * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/ */
public static void main(String[] args) public static void main(String[] args)
@ -162,6 +163,7 @@ public class PBKDF2Engine implements PBKDF2 {
* Method deriveKey. * Method deriveKey.
* *
* @param inputPassword String * @param inputPassword String
*
* @return byte[] * @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String) * @return byte[] * @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String)
*/ */
public byte[] deriveKey(String inputPassword) { public byte[] deriveKey(String inputPassword) {
@ -173,6 +175,7 @@ public class PBKDF2Engine implements PBKDF2 {
* *
* @param inputPassword String * @param inputPassword String
* @param dkLen int * @param dkLen int
*
* @return byte[] * @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String, int) * @return byte[] * @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String, int)
*/ */
public byte[] deriveKey(String inputPassword, int dkLen) { public byte[] deriveKey(String inputPassword, int dkLen) {
@ -203,6 +206,7 @@ public class PBKDF2Engine implements PBKDF2 {
* Method verifyKey. * Method verifyKey.
* *
* @param inputPassword String * @param inputPassword String
*
* @return boolean * @see fr.xephi.authme.security.pbkdf2.PBKDF2#verifyKey(String) * @return boolean * @see fr.xephi.authme.security.pbkdf2.PBKDF2#verifyKey(String)
*/ */
public boolean verifyKey(String inputPassword) { public boolean verifyKey(String inputPassword) {
@ -249,6 +253,7 @@ public class PBKDF2Engine implements PBKDF2 {
* Method setPseudoRandomFunction. * Method setPseudoRandomFunction.
* *
* @param prf PRF * @param prf PRF
*
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#setPseudoRandomFunction(PRF) * @see fr.xephi.authme.security.pbkdf2.PBKDF2#setPseudoRandomFunction(PRF)
*/ */
public void setPseudoRandomFunction(PRF prf) { public void setPseudoRandomFunction(PRF prf) {
@ -262,6 +267,7 @@ public class PBKDF2Engine implements PBKDF2 {
* @param S Salt as array of bytes. <code>null</code> means no salt. * @param S Salt as array of bytes. <code>null</code> means no salt.
* @param c Iteration count (see RFC 2898 4.2) * @param c Iteration count (see RFC 2898 4.2)
* @param dkLen desired length of derived key. * @param dkLen desired length of derived key.
*
* @return internal byte array * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2</a> * @return internal byte array * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2</a>
*/ */
protected byte[] PBKDF2(PRF prf, byte[] S, int c, int dkLen) { protected byte[] PBKDF2(PRF prf, byte[] S, int c, int dkLen) {
@ -291,6 +297,7 @@ public class PBKDF2Engine implements PBKDF2 {
* *
* @param a * @param a
* @param b * @param b
*
* @return ceil(a/b) * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step * @return ceil(a/b) * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step
* 2.</a> * 2.</a>
*/ */
@ -311,6 +318,7 @@ public class PBKDF2Engine implements PBKDF2 {
* @param S Salt as array of bytes * @param S Salt as array of bytes
* @param c Iteration count * @param c Iteration count
* @param blockIndex * @param blockIndex
*
* @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step
* 3.</a> * 3.</a>
*/ */
@ -350,6 +358,7 @@ public class PBKDF2Engine implements PBKDF2 {
* @param dest * @param dest
* @param offset * @param offset
* @param i * @param i
*
* @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step * @see <a href="http://tools.ietf.org/html/rfc2898">RFC 2898 5.2 Step
* 3.</a> * 3.</a>
*/ */
@ -373,6 +382,7 @@ public class PBKDF2Engine implements PBKDF2 {
* Method setParameters. * Method setParameters.
* *
* @param parameters PBKDF2Parameters * @param parameters PBKDF2Parameters
*
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#setParameters(PBKDF2Parameters) * @see fr.xephi.authme.security.pbkdf2.PBKDF2#setParameters(PBKDF2Parameters)
*/ */
public void setParameters(PBKDF2Parameters parameters) { public void setParameters(PBKDF2Parameters parameters) {

View File

@ -37,6 +37,7 @@ public interface PBKDF2Formatter {
* Convert parameters to String. * Convert parameters to String.
* *
* @param p Parameters object to output. * @param p Parameters object to output.
*
* @return String representation * @return String representation
*/ */
public abstract String toString(PBKDF2Parameters p); public abstract String toString(PBKDF2Parameters p);
@ -47,6 +48,7 @@ public interface PBKDF2Formatter {
* *
* @param s String representation of parameters to decode. * @param s String representation of parameters to decode.
* @param p PBKDF2Parameters * @param p PBKDF2Parameters
*
* @return <code>false</code> syntax OK, <code>true</code> some syntax * @return <code>false</code> syntax OK, <code>true</code> some syntax
* issue. * issue.
*/ */

View File

@ -38,6 +38,7 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter {
* *
* @param p PBKDF2Parameters * @param p PBKDF2Parameters
* @param s String * @param s String
*
* @return boolean * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#fromString(PBKDF2Parameters, String) * @return boolean * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#fromString(PBKDF2Parameters, String)
*/ */
public boolean fromString(PBKDF2Parameters p, String s) { public boolean fromString(PBKDF2Parameters p, String s) {
@ -64,6 +65,7 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter {
* Method toString. * Method toString.
* *
* @param p PBKDF2Parameters * @param p PBKDF2Parameters
*
* @return String * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#toString(PBKDF2Parameters) * @return String * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#toString(PBKDF2Parameters)
*/ */
public String toString(PBKDF2Parameters p) { public String toString(PBKDF2Parameters p) {

View File

@ -46,6 +46,7 @@ public interface PRF {
* *
* @param M Input data/message etc. Together with any data supplied during * @param M Input data/message etc. Together with any data supplied during
* initilization. * initilization.
*
* @return Random bytes of hLen length. * @return Random bytes of hLen length.
*/ */
public byte[] doFinal(byte[] M); public byte[] doFinal(byte[] M);

View File

@ -87,6 +87,7 @@ public class OtherAccounts extends CustomConfiguration {
* Method getAllPlayersByUUID. * Method getAllPlayersByUUID.
* *
* @param uuid UUID * @param uuid UUID
*
* @return List<String> * @return List<String>
*/ */
public List<String> getAllPlayersByUUID(UUID uuid) { public List<String> getAllPlayersByUUID(UUID uuid) {

View File

@ -338,6 +338,7 @@ public final class Settings extends YamlConfiguration {
* *
* @param name String * @param name String
* @param ip String * @param ip String
*
* @return boolean * @return boolean
*/ */
public static boolean getRestrictedIp(String name, String ip) { public static boolean getRestrictedIp(String name, String ip) {
@ -377,6 +378,7 @@ public final class Settings extends YamlConfiguration {
* Method checkLang. * Method checkLang.
* *
* @param lang String * @param lang String
*
* @return String * @return String
*/ */
public static String checkLang(String lang) { public static String checkLang(String lang) {
@ -442,6 +444,7 @@ public final class Settings extends YamlConfiguration {
* Method isEmailCorrect. * Method isEmailCorrect.
* *
* @param email String * @param email String
*
* @return boolean * @return boolean
*/ */
public static boolean isEmailCorrect(String email) { public static boolean isEmailCorrect(String email) {

View File

@ -58,6 +58,7 @@ public class Spawn extends CustomConfiguration {
* Method setSpawn. * Method setSpawn.
* *
* @param location Location * @param location Location
*
* @return boolean * @return boolean
*/ */
public boolean setSpawn(Location location) { public boolean setSpawn(Location location) {
@ -79,6 +80,7 @@ public class Spawn extends CustomConfiguration {
* Method setFirstSpawn. * Method setFirstSpawn.
* *
* @param location Location * @param location Location
*
* @return boolean * @return boolean
*/ */
public boolean setFirstSpawn(Location location) { public boolean setFirstSpawn(Location location) {

View File

@ -71,6 +71,7 @@ public class GeoLiteAPI {
* Get the country code of the given IP address. * Get the country code of the given IP address.
* *
* @param ip Ip address * @param ip Ip address
*
* @return String * @return String
*/ */
public static String getCountryCode(String ip) { public static String getCountryCode(String ip) {
@ -84,6 +85,7 @@ public class GeoLiteAPI {
* Get the country name of the given IP address. * Get the country name of the given IP address.
* *
* @param ip Ip address * @param ip Ip address
*
* @return String * @return String
*/ */
public static String getCountryName(String ip) { public static String getCountryName(String ip) {

View File

@ -19,6 +19,7 @@ public class StringUtils {
* *
* @param first First string * @param first First string
* @param second Second string * @param second Second string
*
* @return The difference value * @return The difference value
*/ */
public static double getDifference(String first, String second) { public static double getDifference(String first, String second) {
@ -38,6 +39,7 @@ public class StringUtils {
* *
* @param str the string to analyze * @param str the string to analyze
* @param pieces the items to check the string for * @param pieces the items to check the string for
*
* @return true if the string contains at least one of the items * @return true if the string contains at least one of the items
*/ */
public static boolean containsAny(String str, String... pieces) { public static boolean containsAny(String str, String... pieces) {
@ -57,6 +59,7 @@ public class StringUtils {
* is trimmed, so this method also considers a string with whitespace as empty. * is trimmed, so this method also considers a string with whitespace as empty.
* *
* @param str the string to verify * @param str the string to verify
*
* @return true if the string is empty, false otherwise * @return true if the string is empty, false otherwise
*/ */
public static boolean isEmpty(String str) { public static boolean isEmpty(String str) {
@ -68,6 +71,7 @@ public class StringUtils {
* *
* @param delimiter the delimiter to use * @param delimiter the delimiter to use
* @param elements the elements to join * @param elements the elements to join
*
* @return a new String that is composed of the elements separated by the delimiter * @return a new String that is composed of the elements separated by the delimiter
*/ */
public static String join(String delimiter, Iterable<String> elements) { public static String join(String delimiter, Iterable<String> elements) {
@ -89,6 +93,7 @@ public class StringUtils {
* Get a full stack trace of an exception as a string. * Get a full stack trace of an exception as a string.
* *
* @param exception The exception. * @param exception The exception.
*
* @return Stack trace as a string. * @return Stack trace as a string.
*/ */
public static String getStackTrace(Exception exception) { public static String getStackTrace(Exception exception) {

View File

@ -100,6 +100,7 @@ public final class Utils {
* *
* @param player The player. * @param player The player.
* @param group The group type. * @param group The group type.
*
* @return True if succeed, false otherwise. False is also returned if groups aren't supported * @return True if succeed, false otherwise. False is also returned if groups aren't supported
* with the current permissions system. * with the current permissions system.
*/ */
@ -159,6 +160,7 @@ public final class Utils {
* *
* @param player The player. * @param player The player.
* @param group The normal group. * @param group The normal group.
*
* @return True on success, false on failure. * @return True on success, false on failure.
*/ */
public static boolean addNormal(Player player, String group) { public static boolean addNormal(Player player, String group) {
@ -277,6 +279,7 @@ public final class Utils {
* Bukkit#getOnlinePlayers()} directly. * Bukkit#getOnlinePlayers()} directly.
* *
* @return collection of online players * @return collection of online players
*
* @see <a href="https://www.spigotmc.org/threads/solved-cant-use-new-getonlineplayers.33061/">SpigotMC * @see <a href="https://www.spigotmc.org/threads/solved-cant-use-new-getonlineplayers.33061/">SpigotMC
* forum</a> * forum</a>
* @see <a href="http://stackoverflow.com/questions/32130851/player-changed-from-array-to-collection">StackOverflow</a> * @see <a href="http://stackoverflow.com/questions/32130851/player-changed-from-array-to-collection">StackOverflow</a>