From bd1f868c6db7742f9f12a3f8ab3eefac4fd0168d Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Sat, 21 Nov 2015 01:31:18 +0100 Subject: [PATCH] standard javadoc --- src/main/java/fr/xephi/authme/AuthMe.java | 91 +++++----- .../java/fr/xephi/authme/ConsoleFilter.java | 6 +- .../java/fr/xephi/authme/DataManager.java | 12 +- .../java/fr/xephi/authme/ImageGenerator.java | 4 +- .../java/fr/xephi/authme/Log4JFilter.java | 36 ++-- .../java/fr/xephi/authme/PerformBackup.java | 24 +-- src/main/java/fr/xephi/authme/api/API.java | 8 +- src/main/java/fr/xephi/authme/api/NewAPI.java | 8 +- .../xephi/authme/cache/auth/PlayerAuth.java | 60 +++---- .../xephi/authme/cache/auth/PlayerCache.java | 20 +-- .../authme/cache/backup/DataFileCache.java | 12 +- .../xephi/authme/cache/backup/JsonCache.java | 20 +-- .../xephi/authme/cache/limbo/LimboCache.java | 12 +- .../xephi/authme/cache/limbo/LimboPlayer.java | 32 ++-- .../authme/command/CommandDescription.java | 4 +- .../converter/ConverterCommand.java | 8 +- .../authme/converter/CrazyLoginConverter.java | 4 +- .../xephi/authme/converter/FlatToSqlite.java | 14 +- .../authme/converter/RakamakConverter.java | 4 +- .../authme/converter/RoyalAuthYamlReader.java | 8 +- .../authme/converter/vAuthFileReader.java | 12 +- .../xephi/authme/converter/xAuthToFlat.java | 16 +- .../authme/datasource/CacheDataSource.java | 140 +++++++-------- .../xephi/authme/datasource/DataSource.java | 84 ++++----- .../authme/datasource/DatabaseCalls.java | 136 +++++++------- .../fr/xephi/authme/datasource/FlatFile.java | 136 +++++++------- .../fr/xephi/authme/datasource/MySQL.java | 168 +++++++++--------- .../fr/xephi/authme/datasource/SQLite.java | 152 ++++++++-------- .../events/AuthMeAsyncPreLoginEvent.java | 12 +- .../authme/events/AuthMeTeleportEvent.java | 12 +- .../fr/xephi/authme/events/CustomEvent.java | 18 +- .../events/FirstSpawnTeleportEvent.java | 12 +- .../fr/xephi/authme/events/LoginEvent.java | 16 +- .../fr/xephi/authme/events/LogoutEvent.java | 12 +- .../events/PasswordEncryptionEvent.java | 16 +- .../authme/events/ProtectInventoryEvent.java | 20 +-- .../authme/events/RegisterTeleportEvent.java | 12 +- .../authme/events/ResetInventoryEvent.java | 4 +- .../authme/events/RestoreInventoryEvent.java | 4 +- .../authme/events/SpawnTeleportEvent.java | 16 +- .../xephi/authme/hooks/BungeeCordMessage.java | 4 +- .../java/fr/xephi/authme/hooks/EssSpawn.java | 8 +- .../AuthMeInventoryPacketAdapter.java | 4 +- .../java/fr/xephi/authme/modules/Module.java | 8 +- .../xephi/authme/modules/ModuleManager.java | 20 +-- .../authme/permission/PermissionsManager.java | 22 +-- .../authme/process/join/AsyncronousJoin.java | 4 +- .../process/login/AsyncronousLogin.java | 12 +- .../login/ProcessSyncronousPlayerLogin.java | 4 +- .../process/register/AsyncRegister.java | 14 +- .../unregister/AsyncronousUnregister.java | 4 +- .../xephi/authme/security/HashAlgorithm.java | 4 +- .../authme/security/PasswordSecurity.java | 24 +-- .../xephi/authme/security/RandomString.java | 4 +- .../xephi/authme/security/crypts/BCRYPT.java | 30 ++-- .../authme/security/crypts/BCRYPT2Y.java | 16 +- .../authme/security/crypts/CRAZYCRYPT1.java | 16 +- .../authme/security/crypts/CryptPBKDF2.java | 16 +- .../security/crypts/CryptPBKDF2Django.java | 16 +- .../authme/security/crypts/DOUBLEMD5.java | 22 +-- .../security/crypts/EncryptionMethod.java | 6 +- .../fr/xephi/authme/security/crypts/IPB3.java | 22 +-- .../xephi/authme/security/crypts/JOOMLA.java | 22 +-- .../fr/xephi/authme/security/crypts/MD5.java | 22 +-- .../xephi/authme/security/crypts/MD5VB.java | 22 +-- .../fr/xephi/authme/security/crypts/MYBB.java | 22 +-- .../xephi/authme/security/crypts/PHPBB.java | 56 +++--- .../authme/security/crypts/PHPFUSION.java | 22 +-- .../authme/security/crypts/PLAINTEXT.java | 16 +- .../authme/security/crypts/ROYALAUTH.java | 22 +-- .../authme/security/crypts/SALTED2MD5.java | 22 +-- .../authme/security/crypts/SALTEDSHA512.java | 22 +-- .../fr/xephi/authme/security/crypts/SHA1.java | 22 +-- .../xephi/authme/security/crypts/SHA256.java | 22 +-- .../xephi/authme/security/crypts/SHA512.java | 22 +-- .../fr/xephi/authme/security/crypts/SMF.java | 22 +-- .../fr/xephi/authme/security/crypts/WBB3.java | 22 +-- .../fr/xephi/authme/security/crypts/WBB4.java | 16 +- .../authme/security/crypts/WHIRLPOOL.java | 20 +-- .../authme/security/crypts/WORDPRESS.java | 32 ++-- .../xephi/authme/security/crypts/XAUTH.java | 20 +-- .../fr/xephi/authme/security/crypts/XF.java | 26 +-- .../authme/security/pbkdf2/MacBasedPRF.java | 16 +- .../authme/security/pbkdf2/PBKDF2Engine.java | 41 ++--- .../security/pbkdf2/PBKDF2HexFormatter.java | 12 +- .../security/pbkdf2/PBKDF2Parameters.java | 20 +-- .../authme/settings/CustomConfiguration.java | 12 +- .../fr/xephi/authme/settings/Messages.java | 8 +- .../xephi/authme/settings/OtherAccounts.java | 8 +- .../fr/xephi/authme/settings/Settings.java | 24 +-- .../java/fr/xephi/authme/settings/Spawn.java | 24 +-- .../fr/xephi/authme/task/TimeoutTask.java | 4 +- .../fr/xephi/authme/util/StringUtils.java | 4 +- src/main/java/fr/xephi/authme/util/Utils.java | 40 ++--- 94 files changed, 1176 insertions(+), 1174 deletions(-) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index bdf8ad099..c4cd327ee 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -115,8 +115,8 @@ public class AuthMe extends JavaPlugin { /** * Method canConnect. - * @return boolean - */ + + * @return boolean */ public boolean canConnect() { return canConnect; } @@ -131,16 +131,16 @@ public class AuthMe extends JavaPlugin { /** * Method getInstance. - * @return AuthMe - */ + + * @return AuthMe */ public static AuthMe getInstance() { return plugin; } /** * Method getSettings. - * @return Settings - */ + + * @return Settings */ public Settings getSettings() { return settings; } @@ -155,8 +155,8 @@ public class AuthMe extends JavaPlugin { /** * Method getMessages. - * @return Messages - */ + + * @return Messages */ public Messages getMessages() { return m; } @@ -450,8 +450,8 @@ public class AuthMe extends JavaPlugin { // Initialize and setup the database /** * Method setupDatabase. - * @throws Exception - */ + + * @throws Exception */ public void setupDatabase() throws Exception { if (database != null) database.close(); @@ -614,8 +614,8 @@ public class AuthMe extends JavaPlugin { * @param player * @param perm - * @return boolean - */ + + * @return boolean */ public boolean authmePermissible(Player player, String perm) { // New code: return getPermissionsManager().hasPermission(player, perm); @@ -635,8 +635,8 @@ public class AuthMe extends JavaPlugin { * @param sender * @param perm - * @return boolean - */ + + * @return boolean */ public boolean authmePermissible(CommandSender sender, String perm) { // Handle players with the permissions manager if(sender instanceof Player) { @@ -685,8 +685,8 @@ public class AuthMe extends JavaPlugin { /** * Method generateKickPlayer. * @param collection Collection - * @return Player - */ + + * @return Player */ public Player generateKickPlayer(Collection collection) { Player player = null; for (Player p : collection) { @@ -734,8 +734,8 @@ public class AuthMe extends JavaPlugin { /** * Method getSpawnLocation. * @param player Player - * @return Location - */ + + * @return Location */ public Location getSpawnLocation(Player player) { World world = player.getWorld(); String[] spawnPriority = Settings.spawnPriority.split(","); @@ -761,8 +761,8 @@ public class AuthMe extends JavaPlugin { /** * Method getDefaultSpawn. * @param world World - * @return Location - */ + + * @return Location */ private Location getDefaultSpawn(World world) { return world.getSpawnLocation(); } @@ -771,8 +771,8 @@ public class AuthMe extends JavaPlugin { /** * Method getMultiverseSpawn. * @param world World - * @return Location - */ + + * @return Location */ private Location getMultiverseSpawn(World world) { if (multiverse != null && Settings.multiverse) { try { @@ -787,8 +787,8 @@ public class AuthMe extends JavaPlugin { // Return the essentials spawnpoint /** * Method getEssentialsSpawn. - * @return Location - */ + + * @return Location */ private Location getEssentialsSpawn() { if (essentialsSpawn != null) { return essentialsSpawn; @@ -800,8 +800,8 @@ public class AuthMe extends JavaPlugin { /** * Method getAuthMeSpawn. * @param player Player - * @return Location - */ + + * @return Location */ private Location getAuthMeSpawn(Player player) { if ((!database.isAuthAvailable(player.getName().toLowerCase()) || !player.hasPlayedBefore()) && (Spawn.getInstance().getFirstSpawn() != null)) { return Spawn.getInstance().getFirstSpawn(); @@ -823,8 +823,8 @@ public class AuthMe extends JavaPlugin { /** * Method getAntiBotModMode. - * @return boolean - */ + + * @return boolean */ public boolean getAntiBotModMode() { return this.antibotMod; } @@ -855,8 +855,8 @@ public class AuthMe extends JavaPlugin { * Method replaceAllInfos. * @param message String * @param player Player - * @return String - */ + + * @return String */ public String replaceAllInfos(String message, Player player) { int playersOnline = Utils.getOnlinePlayers().size(); message = message.replace("&", "\u00a7"); @@ -875,8 +875,8 @@ public class AuthMe extends JavaPlugin { /** * Method getIP. * @param player Player - * @return String - */ + + * @return String */ public String getIP(Player player) { String name = player.getName().toLowerCase(); String ip = player.getAddress().getAddress().getHostAddress(); @@ -894,8 +894,8 @@ public class AuthMe extends JavaPlugin { * Method isLoggedIp. * @param name String * @param ip String - * @return boolean - */ + + * @return boolean */ public boolean isLoggedIp(String name, String ip) { int count = 0; for (Player player : Utils.getOnlinePlayers()) { @@ -909,8 +909,8 @@ public class AuthMe extends JavaPlugin { * Method hasJoinedIp. * @param name String * @param ip String - * @return boolean - */ + + * @return boolean */ public boolean hasJoinedIp(String name, String ip) { int count = 0; for (Player player : Utils.getOnlinePlayers()) { @@ -922,8 +922,8 @@ public class AuthMe extends JavaPlugin { /** * Method getModuleManager. - * @return ModuleManager - */ + + * @return ModuleManager */ public ModuleManager getModuleManager() { return moduleManager; } @@ -933,8 +933,8 @@ public class AuthMe extends JavaPlugin { * * @param player * player - * @return String - */ + + * @return String */ @Deprecated public String getVeryGamesIP(Player player) { String realIP = player.getAddress().getAddress().getHostAddress(); @@ -956,8 +956,8 @@ public class AuthMe extends JavaPlugin { /** * Method getCountryCode. * @param ip String - * @return String - */ + + * @return String */ @Deprecated public String getCountryCode(String ip) { return Utils.getCountryCode(ip); @@ -966,8 +966,8 @@ public class AuthMe extends JavaPlugin { /** * Method getCountryName. * @param ip String - * @return String - */ + + * @return String */ @Deprecated public String getCountryName(String ip) { return Utils.getCountryName(ip); @@ -995,7 +995,8 @@ public class AuthMe extends JavaPlugin { * The command arguments (Bukkit). * - * @return True if the command was executed, false otherwise. * @see org.bukkit.command.CommandExecutor#onCommand(CommandSender, Command, String, String[]) + + * @return True if the command was executed, false otherwise. * @see org.bukkit.command.CommandExecutor#onCommand(CommandSender, Command, String, String[]) * @see org.bukkit.command.CommandExecutor#onCommand(CommandSender, Command, String, String[]) */ @Override public boolean onCommand(CommandSender sender, Command cmd, diff --git a/src/main/java/fr/xephi/authme/ConsoleFilter.java b/src/main/java/fr/xephi/authme/ConsoleFilter.java index 60282088d..668ff2066 100644 --- a/src/main/java/fr/xephi/authme/ConsoleFilter.java +++ b/src/main/java/fr/xephi/authme/ConsoleFilter.java @@ -16,9 +16,9 @@ public class ConsoleFilter implements Filter { /** * Method isLoggable. * @param record LogRecord - * @return boolean - * @see java.util.logging.Filter#isLoggable(LogRecord) - */ + + + * @return boolean * @see java.util.logging.Filter#isLoggable(LogRecord) */ @Override public boolean isLoggable(LogRecord record) { try { diff --git a/src/main/java/fr/xephi/authme/DataManager.java b/src/main/java/fr/xephi/authme/DataManager.java index fc65845e7..c808ebc54 100644 --- a/src/main/java/fr/xephi/authme/DataManager.java +++ b/src/main/java/fr/xephi/authme/DataManager.java @@ -35,8 +35,8 @@ public class DataManager { /** * Method getOfflinePlayer. * @param name String - * @return OfflinePlayer - */ + + * @return OfflinePlayer */ public synchronized OfflinePlayer getOfflinePlayer(final String name) { ExecutorService executor = Executors.newSingleThreadExecutor(); Future result = executor.submit(new Callable() { @@ -197,8 +197,8 @@ public class DataManager { * Method isOnline. * @param player Player * @param name String - * @return boolean - */ + + * @return boolean */ public boolean isOnline(Player player, final String name) { if (player.isOnline()) return true; @@ -226,8 +226,8 @@ public class DataManager { /** * Method getOnlinePlayerLower. * @param name String - * @return Player - */ + + * @return Player */ public Player getOnlinePlayerLower(String name) { name = name.toLowerCase(); for (Player player : Utils.getOnlinePlayers()) { diff --git a/src/main/java/fr/xephi/authme/ImageGenerator.java b/src/main/java/fr/xephi/authme/ImageGenerator.java index ea3d66341..2b6a187e3 100644 --- a/src/main/java/fr/xephi/authme/ImageGenerator.java +++ b/src/main/java/fr/xephi/authme/ImageGenerator.java @@ -21,8 +21,8 @@ public class ImageGenerator { /** * Method generateImage. - * @return BufferedImage - */ + + * @return BufferedImage */ public BufferedImage generateImage() { BufferedImage image = new BufferedImage(200, 60, BufferedImage.TYPE_BYTE_INDEXED); Graphics2D graphics = image.createGraphics(); diff --git a/src/main/java/fr/xephi/authme/Log4JFilter.java b/src/main/java/fr/xephi/authme/Log4JFilter.java index ed9ada5eb..5eebc7cb7 100644 --- a/src/main/java/fr/xephi/authme/Log4JFilter.java +++ b/src/main/java/fr/xephi/authme/Log4JFilter.java @@ -27,9 +27,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter { /** * Method filter. * @param record LogEvent - * @return Result - * @see org.apache.logging.log4j.core.Filter#filter(LogEvent) - */ + + + * @return Result * @see org.apache.logging.log4j.core.Filter#filter(LogEvent) */ @Override public Result filter(LogEvent record) { if (record == null) { @@ -45,9 +45,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter { * @param arg2 Marker * @param message String * @param arg4 Object[] - * @return Result - * @see org.apache.logging.log4j.core.Filter#filter(Logger, Level, Marker, String, Object[]) - */ + + + * @return Result * @see org.apache.logging.log4j.core.Filter#filter(Logger, Level, Marker, String, Object[]) */ @Override public Result filter(Logger arg0, Level arg1, Marker arg2, String message, Object... arg4) { @@ -61,9 +61,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter { * @param arg2 Marker * @param message Object * @param arg4 Throwable - * @return Result - * @see org.apache.logging.log4j.core.Filter#filter(Logger, Level, Marker, Object, Throwable) - */ + + + * @return Result * @see org.apache.logging.log4j.core.Filter#filter(Logger, Level, Marker, Object, Throwable) */ @Override public Result filter(Logger arg0, Level arg1, Marker arg2, Object message, Throwable arg4) { @@ -80,9 +80,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter { * @param arg2 Marker * @param message Message * @param arg4 Throwable - * @return Result - * @see org.apache.logging.log4j.core.Filter#filter(Logger, Level, Marker, Message, Throwable) - */ + + + * @return Result * @see org.apache.logging.log4j.core.Filter#filter(Logger, Level, Marker, Message, Throwable) */ @Override public Result filter(Logger arg0, Level arg1, Marker arg2, Message message, Throwable arg4) { @@ -91,9 +91,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter { /** * Method getOnMatch. - * @return Result - * @see org.apache.logging.log4j.core.Filter#getOnMatch() - */ + + + * @return Result * @see org.apache.logging.log4j.core.Filter#getOnMatch() */ @Override public Result getOnMatch() { return Result.NEUTRAL; @@ -101,9 +101,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter { /** * Method getOnMismatch. - * @return Result - * @see org.apache.logging.log4j.core.Filter#getOnMismatch() - */ + + + * @return Result * @see org.apache.logging.log4j.core.Filter#getOnMismatch() */ @Override public Result getOnMismatch() { return Result.NEUTRAL; diff --git a/src/main/java/fr/xephi/authme/PerformBackup.java b/src/main/java/fr/xephi/authme/PerformBackup.java index 9cda7fac1..355c16497 100644 --- a/src/main/java/fr/xephi/authme/PerformBackup.java +++ b/src/main/java/fr/xephi/authme/PerformBackup.java @@ -37,8 +37,8 @@ public class PerformBackup { /** * Method doBackup. - * @return boolean - */ + + * @return boolean */ public boolean doBackup() { switch (Settings.getDataSource) { @@ -55,8 +55,8 @@ public class PerformBackup { /** * Method MySqlBackup. - * @return boolean - */ + + * @return boolean */ private boolean MySqlBackup() { File dirBackup = new File(AuthMe.getInstance().getDataFolder() + "/backups"); @@ -99,8 +99,8 @@ public class PerformBackup { /** * Method FileBackup. * @param backend String - * @return boolean - */ + + * @return boolean */ private boolean FileBackup(String backend) { File dirBackup = new File(AuthMe.getInstance().getDataFolder() + "/backups"); @@ -124,8 +124,8 @@ public class PerformBackup { /** * Method checkWindows. * @param windowsPath String - * @return boolean - */ + + * @return boolean */ private boolean checkWindows(String windowsPath) { String isWin = System.getProperty("os.name").toLowerCase(); if (isWin.indexOf("win") >= 0) { @@ -145,8 +145,8 @@ public class PerformBackup { * Method copy. * @param src File * @param dst File - * @throws IOException - */ + + * @throws IOException */ void copy(File src, File dst) throws IOException { InputStream in = new FileInputStream(src); OutputStream out = new FileOutputStream(dst); @@ -171,8 +171,8 @@ public class PerformBackup { /** * Method getInstance. - * @return AuthMe - */ + + * @return AuthMe */ public AuthMe getInstance() { return instance; } diff --git a/src/main/java/fr/xephi/authme/api/API.java b/src/main/java/fr/xephi/authme/api/API.java index 8f5bf87e8..6119f28eb 100644 --- a/src/main/java/fr/xephi/authme/api/API.java +++ b/src/main/java/fr/xephi/authme/api/API.java @@ -50,8 +50,8 @@ public class API { /** * Method getPlugin. - * @return AuthMe - */ + + * @return AuthMe */ @Deprecated public AuthMe getPlugin() { return instance; @@ -100,8 +100,8 @@ public class API { /** * Method getLastLocation. * @param player Player - * @return Location - */ + + * @return Location */ @Deprecated public static Location getLastLocation(Player player) { try { diff --git a/src/main/java/fr/xephi/authme/api/NewAPI.java b/src/main/java/fr/xephi/authme/api/NewAPI.java index ea1fc4ac6..b1aa27a63 100644 --- a/src/main/java/fr/xephi/authme/api/NewAPI.java +++ b/src/main/java/fr/xephi/authme/api/NewAPI.java @@ -58,8 +58,8 @@ public class NewAPI { /** * Method getPlugin. - * @return AuthMe - */ + + * @return AuthMe */ public AuthMe getPlugin() { return plugin; } @@ -94,8 +94,8 @@ public class NewAPI { /** * Method getLastLocation. * @param player Player - * @return Location - */ + + * @return Location */ public Location getLastLocation(Player player) { try { PlayerAuth auth = PlayerCache.getInstance().getAuth(player.getName().toLowerCase()); diff --git a/src/main/java/fr/xephi/authme/cache/auth/PlayerAuth.java b/src/main/java/fr/xephi/authme/cache/auth/PlayerAuth.java index 9ca057285..5b2298233 100644 --- a/src/main/java/fr/xephi/authme/cache/auth/PlayerAuth.java +++ b/src/main/java/fr/xephi/authme/cache/auth/PlayerAuth.java @@ -189,16 +189,16 @@ public class PlayerAuth { /** * Method getNickname. - * @return String - */ + + * @return String */ public String getNickname() { return nickname; } /** * Method getRealName. - * @return String - */ + + * @return String */ public String getRealName() { return realName; } @@ -213,8 +213,8 @@ public class PlayerAuth { /** * Method getGroupId. - * @return int - */ + + * @return int */ public int getGroupId() { return groupId; } @@ -229,8 +229,8 @@ public class PlayerAuth { /** * Method getQuitLocX. - * @return double - */ + + * @return double */ public double getQuitLocX() { return x; } @@ -245,8 +245,8 @@ public class PlayerAuth { /** * Method getQuitLocY. - * @return double - */ + + * @return double */ public double getQuitLocY() { return y; } @@ -261,8 +261,8 @@ public class PlayerAuth { /** * Method getQuitLocZ. - * @return double - */ + + * @return double */ public double getQuitLocZ() { return z; } @@ -277,8 +277,8 @@ public class PlayerAuth { /** * Method getWorld. - * @return String - */ + + * @return String */ public String getWorld() { return world; } @@ -293,8 +293,8 @@ public class PlayerAuth { /** * Method getIp. - * @return String - */ + + * @return String */ public String getIp() { return ip; } @@ -309,8 +309,8 @@ public class PlayerAuth { /** * Method getLastLogin. - * @return long - */ + + * @return long */ public long getLastLogin() { return lastLogin; } @@ -325,8 +325,8 @@ public class PlayerAuth { /** * Method getEmail. - * @return String - */ + + * @return String */ public String getEmail() { return email; } @@ -341,8 +341,8 @@ public class PlayerAuth { /** * Method getSalt. - * @return String - */ + + * @return String */ public String getSalt() { return this.salt; } @@ -357,8 +357,8 @@ public class PlayerAuth { /** * Method getHash. - * @return String - */ + + * @return String */ public String getHash() { if (Settings.getPasswordHash == HashAlgorithm.MD5VB) { if (salt != null && !salt.isEmpty() && Settings.getPasswordHash == HashAlgorithm.MD5VB) { @@ -371,8 +371,8 @@ public class PlayerAuth { /** * Method equals. * @param obj Object - * @return boolean - */ + + * @return boolean */ @Override public boolean equals(Object obj) { if (!(obj instanceof PlayerAuth)) { @@ -384,8 +384,8 @@ public class PlayerAuth { /** * Method hashCode. - * @return int - */ + + * @return int */ @Override public int hashCode() { int hashCode = 7; @@ -396,8 +396,8 @@ public class PlayerAuth { /** * Method toString. - * @return String - */ + + * @return String */ @Override public String toString() { return ("Player : " + nickname + " | " + realName diff --git a/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java b/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java index d4df6e065..e72fcd685 100644 --- a/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java +++ b/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java @@ -41,8 +41,8 @@ public class PlayerCache { /** * Method isAuthenticated. * @param user String - * @return boolean - */ + + * @return boolean */ public boolean isAuthenticated(String user) { return cache.containsKey(user.toLowerCase()); } @@ -50,16 +50,16 @@ public class PlayerCache { /** * Method getAuth. * @param user String - * @return PlayerAuth - */ + + * @return PlayerAuth */ public PlayerAuth getAuth(String user) { return cache.get(user.toLowerCase()); } /** * Method getInstance. - * @return PlayerCache - */ + + * @return PlayerCache */ public static PlayerCache getInstance() { if (singleton == null) { singleton = new PlayerCache(); @@ -69,16 +69,16 @@ public class PlayerCache { /** * Method getLogged. - * @return int - */ + + * @return int */ public int getLogged() { return cache.size(); } /** * Method getCache. - * @return ConcurrentHashMap - */ + + * @return ConcurrentHashMap */ public ConcurrentHashMap getCache() { return this.cache; } diff --git a/src/main/java/fr/xephi/authme/cache/backup/DataFileCache.java b/src/main/java/fr/xephi/authme/cache/backup/DataFileCache.java index 07534751e..01751d789 100644 --- a/src/main/java/fr/xephi/authme/cache/backup/DataFileCache.java +++ b/src/main/java/fr/xephi/authme/cache/backup/DataFileCache.java @@ -22,24 +22,24 @@ public class DataFileCache { /** * Method getGroup. - * @return String - */ + + * @return String */ public String getGroup() { return group; } /** * Method getOperator. - * @return boolean - */ + + * @return boolean */ public boolean getOperator() { return operator; } /** * Method isFlying. - * @return boolean - */ + + * @return boolean */ public boolean isFlying() { return flying; } diff --git a/src/main/java/fr/xephi/authme/cache/backup/JsonCache.java b/src/main/java/fr/xephi/authme/cache/backup/JsonCache.java index d39134712..70d6614c8 100644 --- a/src/main/java/fr/xephi/authme/cache/backup/JsonCache.java +++ b/src/main/java/fr/xephi/authme/cache/backup/JsonCache.java @@ -78,8 +78,8 @@ public class JsonCache { /** * Method readCache. * @param player Player - * @return DataFileCache - */ + + * @return DataFileCache */ public DataFileCache readCache(Player player) { String path; try { @@ -110,8 +110,8 @@ public class JsonCache { * @param dataFileCache DataFileCache * @param type Type * @param jsonSerializationContext JsonSerializationContext - * @return JsonElement - */ + + * @return JsonElement */ @Override public JsonElement serialize(DataFileCache dataFileCache, Type type, JsonSerializationContext jsonSerializationContext) { JsonObject jsonObject = new JsonObject(); @@ -131,10 +131,10 @@ public class JsonCache { * @param jsonElement JsonElement * @param type Type * @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 public DataFileCache deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { JsonObject jsonObject = jsonElement.getAsJsonObject(); @@ -183,8 +183,8 @@ public class JsonCache { /** * Method doesCacheExist. * @param player Player - * @return boolean - */ + + * @return boolean */ public boolean doesCacheExist(Player player) { String path; try { diff --git a/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java b/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java index 1bfe81640..7205c7081 100644 --- a/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java +++ b/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java @@ -105,8 +105,8 @@ public class LimboCache { /** * Method getLimboPlayer. * @param name String - * @return LimboPlayer - */ + + * @return LimboPlayer */ public LimboPlayer getLimboPlayer(String name) { return cache.get(name); } @@ -114,16 +114,16 @@ public class LimboCache { /** * Method hasLimboPlayer. * @param name String - * @return boolean - */ + + * @return boolean */ public boolean hasLimboPlayer(String name) { return cache.containsKey(name); } /** * Method getInstance. - * @return LimboCache - */ + + * @return LimboCache */ public static LimboCache getInstance() { if (singleton == null) { singleton = new LimboCache(AuthMe.getInstance()); diff --git a/src/main/java/fr/xephi/authme/cache/limbo/LimboPlayer.java b/src/main/java/fr/xephi/authme/cache/limbo/LimboPlayer.java index 3d2dc3047..d6f7b02b2 100644 --- a/src/main/java/fr/xephi/authme/cache/limbo/LimboPlayer.java +++ b/src/main/java/fr/xephi/authme/cache/limbo/LimboPlayer.java @@ -48,40 +48,40 @@ public class LimboPlayer { /** * Method getName. - * @return String - */ + + * @return String */ public String getName() { return name; } /** * Method getLoc. - * @return Location - */ + + * @return Location */ public Location getLoc() { return loc; } /** * Method getGameMode. - * @return GameMode - */ + + * @return GameMode */ public GameMode getGameMode() { return gameMode; } /** * Method getOperator. - * @return boolean - */ + + * @return boolean */ public boolean getOperator() { return operator; } /** * Method getGroup. - * @return String - */ + + * @return String */ public String getGroup() { return group; } @@ -98,8 +98,8 @@ public class LimboPlayer { /** * Method getTimeoutTaskId. - * @return BukkitTask - */ + + * @return BukkitTask */ public BukkitTask getTimeoutTaskId() { return timeoutTaskId; } @@ -116,16 +116,16 @@ public class LimboPlayer { /** * Method getMessageTaskId. - * @return BukkitTask - */ + + * @return BukkitTask */ public BukkitTask getMessageTaskId() { return messageTaskId; } /** * Method isFlying. - * @return boolean - */ + + * @return boolean */ public boolean isFlying() { return flying; } diff --git a/src/main/java/fr/xephi/authme/command/CommandDescription.java b/src/main/java/fr/xephi/authme/command/CommandDescription.java index 2b02eed01..51ce67b0b 100644 --- a/src/main/java/fr/xephi/authme/command/CommandDescription.java +++ b/src/main/java/fr/xephi/authme/command/CommandDescription.java @@ -307,8 +307,8 @@ public class CommandDescription { /** * Get the absolute command label, without a slash. - * @return String - */ + + * @return String */ public String getAbsoluteLabel() { return getAbsoluteLabel(false); } diff --git a/src/main/java/fr/xephi/authme/command/executable/converter/ConverterCommand.java b/src/main/java/fr/xephi/authme/command/executable/converter/ConverterCommand.java index ba71ad1cc..d18c4065c 100644 --- a/src/main/java/fr/xephi/authme/command/executable/converter/ConverterCommand.java +++ b/src/main/java/fr/xephi/authme/command/executable/converter/ConverterCommand.java @@ -111,8 +111,8 @@ public class ConverterCommand extends ExecutableCommand { /** * Method getName. - * @return String - */ + + * @return String */ String getName() { return this.name; } @@ -120,8 +120,8 @@ public class ConverterCommand extends ExecutableCommand { /** * Method fromName. * @param name String - * @return ConvertType - */ + + * @return ConvertType */ public static ConvertType fromName(String name) { for (ConvertType type : ConvertType.values()) { if (type.getName().equalsIgnoreCase(name)) diff --git a/src/main/java/fr/xephi/authme/converter/CrazyLoginConverter.java b/src/main/java/fr/xephi/authme/converter/CrazyLoginConverter.java index 5b2e1ada4..e7d7e3631 100644 --- a/src/main/java/fr/xephi/authme/converter/CrazyLoginConverter.java +++ b/src/main/java/fr/xephi/authme/converter/CrazyLoginConverter.java @@ -36,8 +36,8 @@ public class CrazyLoginConverter implements Converter { /** * Method getInstance. - * @return CrazyLoginConverter - */ + + * @return CrazyLoginConverter */ public CrazyLoginConverter getInstance() { return this; } diff --git a/src/main/java/fr/xephi/authme/converter/FlatToSqlite.java b/src/main/java/fr/xephi/authme/converter/FlatToSqlite.java index 6ace0fff0..f137f5f40 100644 --- a/src/main/java/fr/xephi/authme/converter/FlatToSqlite.java +++ b/src/main/java/fr/xephi/authme/converter/FlatToSqlite.java @@ -121,9 +121,9 @@ public class FlatToSqlite implements Converter { /** * Method connect. - * @throws ClassNotFoundException - * @throws SQLException - */ + + + * @throws ClassNotFoundException * @throws SQLException */ private synchronized void connect() throws ClassNotFoundException, SQLException { Class.forName("org.sqlite.JDBC"); con = DriverManager.getConnection("jdbc:sqlite:plugins/AuthMe/" + database + ".db"); @@ -131,8 +131,8 @@ public class FlatToSqlite implements Converter { /** * Method setup. - * @throws SQLException - */ + + * @throws SQLException */ private synchronized void setup() throws SQLException { Statement st = null; ResultSet rs = null; @@ -179,8 +179,8 @@ public class FlatToSqlite implements Converter { /** * Method saveAuth. * @param s String - * @return boolean - */ + + * @return boolean */ private synchronized boolean saveAuth(String s) { PreparedStatement pst = null; try { diff --git a/src/main/java/fr/xephi/authme/converter/RakamakConverter.java b/src/main/java/fr/xephi/authme/converter/RakamakConverter.java index 7a34fa89e..383adb409 100644 --- a/src/main/java/fr/xephi/authme/converter/RakamakConverter.java +++ b/src/main/java/fr/xephi/authme/converter/RakamakConverter.java @@ -41,8 +41,8 @@ public class RakamakConverter implements Converter { /** * Method getInstance. - * @return RakamakConverter - */ + + * @return RakamakConverter */ public RakamakConverter getInstance() { return this; } diff --git a/src/main/java/fr/xephi/authme/converter/RoyalAuthYamlReader.java b/src/main/java/fr/xephi/authme/converter/RoyalAuthYamlReader.java index bf1d3e736..75757bc96 100644 --- a/src/main/java/fr/xephi/authme/converter/RoyalAuthYamlReader.java +++ b/src/main/java/fr/xephi/authme/converter/RoyalAuthYamlReader.java @@ -20,16 +20,16 @@ public class RoyalAuthYamlReader extends CustomConfiguration { /** * Method getLastLogin. - * @return long - */ + + * @return long */ public long getLastLogin() { return getLong("timestamps.quit"); } /** * Method getHash. - * @return String - */ + + * @return String */ public String getHash() { return getString("login.password"); } diff --git a/src/main/java/fr/xephi/authme/converter/vAuthFileReader.java b/src/main/java/fr/xephi/authme/converter/vAuthFileReader.java index b0d3874b5..8a899acdf 100644 --- a/src/main/java/fr/xephi/authme/converter/vAuthFileReader.java +++ b/src/main/java/fr/xephi/authme/converter/vAuthFileReader.java @@ -35,8 +35,8 @@ public class vAuthFileReader { /** * Method convert. - * @throws IOException - */ + + * @throws IOException */ public void convert() throws IOException { final File file = new File(plugin.getDataFolder().getParent() + "" + File.separator + "vAuth" + File.separator + "passwords.yml"); Scanner scanner; @@ -71,8 +71,8 @@ public class vAuthFileReader { /** * Method isUUIDinstance. * @param s String - * @return boolean - */ + + * @return boolean */ private boolean isUUIDinstance(String s) { if (String.valueOf(s.charAt(8)).equalsIgnoreCase("-")) return true; @@ -82,8 +82,8 @@ public class vAuthFileReader { /** * Method getName. * @param uuid UUID - * @return String - */ + + * @return String */ private String getName(UUID uuid) { try { for (OfflinePlayer op : Bukkit.getOfflinePlayers()) { diff --git a/src/main/java/fr/xephi/authme/converter/xAuthToFlat.java b/src/main/java/fr/xephi/authme/converter/xAuthToFlat.java index 9430e4d13..86c88f73b 100644 --- a/src/main/java/fr/xephi/authme/converter/xAuthToFlat.java +++ b/src/main/java/fr/xephi/authme/converter/xAuthToFlat.java @@ -38,8 +38,8 @@ public class xAuthToFlat { /** * Method convert. - * @return boolean - */ + + * @return boolean */ public boolean convert() { if (instance.getServer().getPluginManager().getPlugin("xAuth") == null) { sender.sendMessage("[AuthMe] xAuth plugin not found"); @@ -73,8 +73,8 @@ public class xAuthToFlat { /** * Method getIdPlayer. * @param id int - * @return String - */ + + * @return String */ public String getIdPlayer(int id) { String realPass = ""; Connection conn = xAuth.getPlugin().getDatabaseController().getConnection(); @@ -99,8 +99,8 @@ public class xAuthToFlat { /** * Method getXAuthPlayers. - * @return List - */ + + * @return List */ public List getXAuthPlayers() { List xP = new ArrayList<>(); Connection conn = xAuth.getPlugin().getDatabaseController().getConnection(); @@ -125,8 +125,8 @@ public class xAuthToFlat { /** * Method getPassword. * @param accountId int - * @return String - */ + + * @return String */ public String getPassword(int accountId) { String realPass = ""; Connection conn = xAuth.getPlugin().getDatabaseController().getConnection(); diff --git a/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java b/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java index f497d3901..b88d48539 100644 --- a/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java +++ b/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java @@ -52,9 +52,9 @@ public class CacheDataSource implements DataSource { /** * Method isAuthAvailable. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */ @Override public synchronized boolean isAuthAvailable(String user) { return cache.containsKey(user.toLowerCase()); @@ -63,9 +63,9 @@ public class CacheDataSource implements DataSource { /** * Method getAuth. * @param user String - * @return PlayerAuth - * @see fr.xephi.authme.datasource.DataSource#getAuth(String) - */ + + + * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */ @Override public synchronized PlayerAuth getAuth(String user) { user = user.toLowerCase(); @@ -78,9 +78,9 @@ public class CacheDataSource implements DataSource { /** * Method saveAuth. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */ @Override public synchronized boolean saveAuth(final PlayerAuth auth) { cache.put(auth.getNickname(), auth); @@ -98,9 +98,9 @@ public class CacheDataSource implements DataSource { /** * Method updatePassword. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */ @Override public synchronized boolean updatePassword(final PlayerAuth auth) { if (!cache.containsKey(auth.getNickname())) { @@ -124,9 +124,9 @@ public class CacheDataSource implements DataSource { /** * Method updateSession. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */ @Override public boolean updateSession(final PlayerAuth auth) { if (!cache.containsKey(auth.getNickname())) { @@ -159,9 +159,9 @@ public class CacheDataSource implements DataSource { /** * Method updateQuitLoc. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */ @Override public boolean updateQuitLoc(final PlayerAuth auth) { if (!cache.containsKey(auth.getNickname())) { @@ -197,9 +197,9 @@ public class CacheDataSource implements DataSource { /** * Method getIps. * @param ip String - * @return int - * @see fr.xephi.authme.datasource.DataSource#getIps(String) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */ @Override public int getIps(String ip) { int count = 0; @@ -214,9 +214,9 @@ public class CacheDataSource implements DataSource { /** * Method purgeDatabase. * @param until long - * @return int - * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */ @Override public int purgeDatabase(long until) { int cleared = source.purgeDatabase(until); @@ -233,9 +233,9 @@ public class CacheDataSource implements DataSource { /** * Method autoPurgeDatabase. * @param until long - * @return List - * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */ @Override public List autoPurgeDatabase(long until) { List cleared = source.autoPurgeDatabase(until); @@ -252,9 +252,9 @@ public class CacheDataSource implements DataSource { /** * Method removeAuth. * @param username String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */ @Override public synchronized boolean removeAuth(String username) { final String user = username.toLowerCase(); @@ -306,9 +306,9 @@ public class CacheDataSource implements DataSource { /** * Method updateEmail. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */ @Override public synchronized boolean updateEmail(final PlayerAuth auth) { try { @@ -325,9 +325,9 @@ public class CacheDataSource implements DataSource { /** * Method updateSalt. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */ @Override public synchronized boolean updateSalt(final PlayerAuth auth) { if (!cache.containsKey(auth.getNickname())) { @@ -352,9 +352,9 @@ public class CacheDataSource implements DataSource { /** * Method getAllAuthsByName. * @param auth PlayerAuth - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */ @Override public synchronized List getAllAuthsByName(PlayerAuth auth) { List result = new ArrayList<>(); @@ -369,10 +369,10 @@ public class CacheDataSource implements DataSource { /** * Method getAllAuthsByIp. * @param ip String - * @return List - * @throws Exception - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) - */ + + + + * @return List * @throws Exception * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */ @Override public synchronized List getAllAuthsByIp(final String ip) throws Exception { return exec.submit(new Callable>() { @@ -385,10 +385,10 @@ public class CacheDataSource implements DataSource { /** * Method getAllAuthsByEmail. * @param email String - * @return List - * @throws Exception - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) - */ + + + + * @return List * @throws Exception * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */ @Override public synchronized List getAllAuthsByEmail(final String email) throws Exception { return exec.submit(new Callable>() { @@ -401,8 +401,8 @@ public class CacheDataSource implements DataSource { /** * Method purgeBanned. * @param banned List - * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) - */ + + * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) */ @Override public synchronized void purgeBanned(final List banned) { exec.execute(new Runnable() { @@ -420,9 +420,9 @@ public class CacheDataSource implements DataSource { /** * Method getType. - * @return DataSourceType - * @see fr.xephi.authme.datasource.DataSource#getType() - */ + + + * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */ @Override public DataSourceType getType() { return source.getType(); @@ -431,9 +431,9 @@ public class CacheDataSource implements DataSource { /** * Method isLogged. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isLogged(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */ @Override public boolean isLogged(String user) { user = user.toLowerCase(); @@ -443,8 +443,8 @@ public class CacheDataSource implements DataSource { /** * Method setLogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setLogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */ @Override public void setLogged(final String user) { exec.execute(new Runnable() { @@ -458,8 +458,8 @@ public class CacheDataSource implements DataSource { /** * Method setUnlogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */ @Override public void setUnlogged(final String user) { exec.execute(new Runnable() { @@ -486,9 +486,9 @@ public class CacheDataSource implements DataSource { /** * Method getAccountsRegistered. - * @return int - * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */ @Override public int getAccountsRegistered() { return cache.size(); @@ -498,8 +498,8 @@ public class CacheDataSource implements DataSource { * Method updateName. * @param oldone String * @param newone String - * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) - */ + + * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */ @Override public void updateName(final String oldone, final String newone) { if (cache.containsKey(oldone)) { @@ -516,9 +516,9 @@ public class CacheDataSource implements DataSource { /** * Method getAllAuths. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuths() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */ @Override public List getAllAuths() { return new ArrayList<>(cache.values()); @@ -526,9 +526,9 @@ public class CacheDataSource implements DataSource { /** * Method getLoggedPlayers. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */ @Override public List getLoggedPlayers() { return new ArrayList<>(PlayerCache.getInstance().getCache().values()); diff --git a/src/main/java/fr/xephi/authme/datasource/DataSource.java b/src/main/java/fr/xephi/authme/datasource/DataSource.java index 26745d861..83288751e 100644 --- a/src/main/java/fr/xephi/authme/datasource/DataSource.java +++ b/src/main/java/fr/xephi/authme/datasource/DataSource.java @@ -19,108 +19,108 @@ public interface DataSource { /** * Method isAuthAvailable. * @param user String - * @return boolean - */ + + * @return boolean */ boolean isAuthAvailable(String user); /** * Method getAuth. * @param user String - * @return PlayerAuth - */ + + * @return PlayerAuth */ PlayerAuth getAuth(String user); /** * Method saveAuth. * @param auth PlayerAuth - * @return boolean - */ + + * @return boolean */ boolean saveAuth(PlayerAuth auth); /** * Method updateSession. * @param auth PlayerAuth - * @return boolean - */ + + * @return boolean */ boolean updateSession(PlayerAuth auth); /** * Method updatePassword. * @param auth PlayerAuth - * @return boolean - */ + + * @return boolean */ boolean updatePassword(PlayerAuth auth); /** * Method purgeDatabase. * @param until long - * @return int - */ + + * @return int */ int purgeDatabase(long until); /** * Method autoPurgeDatabase. * @param until long - * @return List - */ + + * @return List */ List autoPurgeDatabase(long until); /** * Method removeAuth. * @param user String - * @return boolean - */ + + * @return boolean */ boolean removeAuth(String user); /** * Method updateQuitLoc. * @param auth PlayerAuth - * @return boolean - */ + + * @return boolean */ boolean updateQuitLoc(PlayerAuth auth); /** * Method getIps. * @param ip String - * @return int - */ + + * @return int */ int getIps(String ip); /** * Method getAllAuthsByName. * @param auth PlayerAuth - * @return List - */ + + * @return List */ List getAllAuthsByName(PlayerAuth auth); /** * Method getAllAuthsByIp. * @param ip String - * @return List - * @throws Exception - */ + + + * @return List * @throws Exception */ List getAllAuthsByIp(String ip) throws Exception; /** * Method getAllAuthsByEmail. * @param email String - * @return List - * @throws Exception - */ + + + * @return List * @throws Exception */ List getAllAuthsByEmail(String email) throws Exception; /** * Method updateEmail. * @param auth PlayerAuth - * @return boolean - */ + + * @return boolean */ boolean updateEmail(PlayerAuth auth); /** * Method updateSalt. * @param auth PlayerAuth - * @return boolean - */ + + * @return boolean */ boolean updateSalt(PlayerAuth auth); void close(); @@ -135,15 +135,15 @@ public interface DataSource { /** * Method getType. - * @return DataSourceType - */ + + * @return DataSourceType */ DataSourceType getType(); /** * Method isLogged. * @param user String - * @return boolean - */ + + * @return boolean */ boolean isLogged(String user); /** @@ -162,8 +162,8 @@ public interface DataSource { /** * Method getAccountsRegistered. - * @return int - */ + + * @return int */ int getAccountsRegistered(); /** @@ -175,14 +175,14 @@ public interface DataSource { /** * Method getAllAuths. - * @return List - */ + + * @return List */ List getAllAuths(); /** * Method getLoggedPlayers. - * @return List - */ + + * @return List */ List getLoggedPlayers(); } diff --git a/src/main/java/fr/xephi/authme/datasource/DatabaseCalls.java b/src/main/java/fr/xephi/authme/datasource/DatabaseCalls.java index 316311ae6..1e405aaea 100644 --- a/src/main/java/fr/xephi/authme/datasource/DatabaseCalls.java +++ b/src/main/java/fr/xephi/authme/datasource/DatabaseCalls.java @@ -27,9 +27,9 @@ public class DatabaseCalls implements DataSource { /** * Method isAuthAvailable. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */ @Override public synchronized boolean isAuthAvailable(final String user) { try { @@ -46,9 +46,9 @@ public class DatabaseCalls implements DataSource { /** * Method getAuth. * @param user String - * @return PlayerAuth - * @see fr.xephi.authme.datasource.DataSource#getAuth(String) - */ + + + * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */ @Override public synchronized PlayerAuth getAuth(final String user) { try { @@ -65,9 +65,9 @@ public class DatabaseCalls implements DataSource { /** * Method saveAuth. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */ @Override public synchronized boolean saveAuth(final PlayerAuth auth) { try { @@ -84,9 +84,9 @@ public class DatabaseCalls implements DataSource { /** * Method updateSession. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */ @Override public synchronized boolean updateSession(final PlayerAuth auth) { try { @@ -103,9 +103,9 @@ public class DatabaseCalls implements DataSource { /** * Method updatePassword. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */ @Override public synchronized boolean updatePassword(final PlayerAuth auth) { try { @@ -122,9 +122,9 @@ public class DatabaseCalls implements DataSource { /** * Method purgeDatabase. * @param until long - * @return int - * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */ @Override public synchronized int purgeDatabase(final long until) { try { @@ -141,9 +141,9 @@ public class DatabaseCalls implements DataSource { /** * Method autoPurgeDatabase. * @param until long - * @return List - * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */ @Override public synchronized List autoPurgeDatabase(final long until) { try { @@ -160,9 +160,9 @@ public class DatabaseCalls implements DataSource { /** * Method removeAuth. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */ @Override public synchronized boolean removeAuth(final String user) { try { @@ -179,9 +179,9 @@ public class DatabaseCalls implements DataSource { /** * Method updateQuitLoc. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */ @Override public synchronized boolean updateQuitLoc(final PlayerAuth auth) { try { @@ -198,9 +198,9 @@ public class DatabaseCalls implements DataSource { /** * Method getIps. * @param ip String - * @return int - * @see fr.xephi.authme.datasource.DataSource#getIps(String) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */ @Override public synchronized int getIps(final String ip) { try { @@ -218,9 +218,9 @@ public class DatabaseCalls implements DataSource { /** * Method getAllAuthsByName. * @param auth PlayerAuth - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */ @Override public synchronized List getAllAuthsByName(final PlayerAuth auth) { try { @@ -237,9 +237,9 @@ public class DatabaseCalls implements DataSource { /** * Method getAllAuthsByIp. * @param ip String - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */ @Override public synchronized List getAllAuthsByIp(final String ip) { try { @@ -256,9 +256,9 @@ public class DatabaseCalls implements DataSource { /** * Method getAllAuthsByEmail. * @param email String - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */ @Override public synchronized List getAllAuthsByEmail(final String email) { try { @@ -275,9 +275,9 @@ public class DatabaseCalls implements DataSource { /** * Method updateEmail. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */ @Override public synchronized boolean updateEmail(final PlayerAuth auth) { try { @@ -294,9 +294,9 @@ public class DatabaseCalls implements DataSource { /** * Method updateSalt. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */ @Override public synchronized boolean updateSalt(final PlayerAuth auth) { try { @@ -332,8 +332,8 @@ public class DatabaseCalls implements DataSource { /** * Method purgeBanned. * @param banned List - * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) - */ + + * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) */ @Override public synchronized void purgeBanned(final List banned) { new Thread(new Runnable() { @@ -345,9 +345,9 @@ public class DatabaseCalls implements DataSource { /** * Method getType. - * @return DataSourceType - * @see fr.xephi.authme.datasource.DataSource#getType() - */ + + + * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */ @Override public synchronized DataSourceType getType() { return database.getType(); @@ -356,9 +356,9 @@ public class DatabaseCalls implements DataSource { /** * Method isLogged. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isLogged(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */ @Override public synchronized boolean isLogged(final String user) { try { @@ -375,8 +375,8 @@ public class DatabaseCalls implements DataSource { /** * Method setLogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setLogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */ @Override public synchronized void setLogged(final String user) { exec.execute(new Runnable() { @@ -389,8 +389,8 @@ public class DatabaseCalls implements DataSource { /** * Method setUnlogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */ @Override public synchronized void setUnlogged(final String user) { exec.execute(new Runnable() { @@ -415,9 +415,9 @@ public class DatabaseCalls implements DataSource { /** * Method getAccountsRegistered. - * @return int - * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */ @Override public synchronized int getAccountsRegistered() { try { @@ -435,8 +435,8 @@ public class DatabaseCalls implements DataSource { * Method updateName. * @param oldone String * @param newone String - * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) - */ + + * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */ @Override public synchronized void updateName(final String oldone, final String newone) { exec.execute(new Runnable() { @@ -448,9 +448,9 @@ public class DatabaseCalls implements DataSource { /** * Method getAllAuths. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuths() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */ @Override public synchronized List getAllAuths() { try { @@ -466,9 +466,9 @@ public class DatabaseCalls implements DataSource { /** * Method getLoggedPlayers. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */ @Override public List getLoggedPlayers() { try { diff --git a/src/main/java/fr/xephi/authme/datasource/FlatFile.java b/src/main/java/fr/xephi/authme/datasource/FlatFile.java index 3d9486b70..b13be8fca 100644 --- a/src/main/java/fr/xephi/authme/datasource/FlatFile.java +++ b/src/main/java/fr/xephi/authme/datasource/FlatFile.java @@ -53,9 +53,9 @@ public class FlatFile implements DataSource { /** * Method isAuthAvailable. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */ @Override public synchronized boolean isAuthAvailable(String user) { BufferedReader br = null; @@ -88,9 +88,9 @@ public class FlatFile implements DataSource { /** * Method saveAuth. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */ @Override public synchronized boolean saveAuth(PlayerAuth auth) { if (isAuthAvailable(auth.getNickname())) { @@ -117,9 +117,9 @@ public class FlatFile implements DataSource { /** * Method updatePassword. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */ @Override public synchronized boolean updatePassword(PlayerAuth auth) { if (!isAuthAvailable(auth.getNickname())) { @@ -182,9 +182,9 @@ public class FlatFile implements DataSource { /** * Method updateSession. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */ @Override public boolean updateSession(PlayerAuth auth) { if (!isAuthAvailable(auth.getNickname())) { @@ -247,9 +247,9 @@ public class FlatFile implements DataSource { /** * Method updateQuitLoc. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */ @Override public boolean updateQuitLoc(PlayerAuth auth) { if (!isAuthAvailable(auth.getNickname())) { @@ -291,9 +291,9 @@ public class FlatFile implements DataSource { /** * Method getIps. * @param ip String - * @return int - * @see fr.xephi.authme.datasource.DataSource#getIps(String) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */ @Override public int getIps(String ip) { BufferedReader br = null; @@ -327,9 +327,9 @@ public class FlatFile implements DataSource { /** * Method purgeDatabase. * @param until long - * @return int - * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */ @Override public int purgeDatabase(long until) { BufferedReader br = null; @@ -379,9 +379,9 @@ public class FlatFile implements DataSource { /** * Method autoPurgeDatabase. * @param until long - * @return List - * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */ @Override public List autoPurgeDatabase(long until) { BufferedReader br = null; @@ -431,9 +431,9 @@ public class FlatFile implements DataSource { /** * Method removeAuth. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */ @Override public synchronized boolean removeAuth(String user) { if (!isAuthAvailable(user)) { @@ -481,9 +481,9 @@ public class FlatFile implements DataSource { /** * Method getAuth. * @param user String - * @return PlayerAuth - * @see fr.xephi.authme.datasource.DataSource#getAuth(String) - */ + + + * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */ @Override public synchronized PlayerAuth getAuth(String user) { BufferedReader br = null; @@ -545,9 +545,9 @@ public class FlatFile implements DataSource { /** * Method updateEmail. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */ @Override public boolean updateEmail(PlayerAuth auth) { if (!isAuthAvailable(auth.getNickname())) { @@ -589,9 +589,9 @@ public class FlatFile implements DataSource { /** * Method updateSalt. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */ @Override public boolean updateSalt(PlayerAuth auth) { return false; @@ -600,9 +600,9 @@ public class FlatFile implements DataSource { /** * Method getAllAuthsByName. * @param auth PlayerAuth - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */ @Override public List getAllAuthsByName(PlayerAuth auth) { BufferedReader br = null; @@ -636,9 +636,9 @@ public class FlatFile implements DataSource { /** * Method getAllAuthsByIp. * @param ip String - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */ @Override public List getAllAuthsByIp(String ip) { BufferedReader br = null; @@ -672,9 +672,9 @@ public class FlatFile implements DataSource { /** * Method getAllAuthsByEmail. * @param email String - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */ @Override public List getAllAuthsByEmail(String email) { BufferedReader br = null; @@ -708,8 +708,8 @@ public class FlatFile implements DataSource { /** * Method purgeBanned. * @param banned List - * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) - */ + + * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) */ @Override public void purgeBanned(List banned) { BufferedReader br = null; @@ -756,9 +756,9 @@ public class FlatFile implements DataSource { /** * Method getType. - * @return DataSourceType - * @see fr.xephi.authme.datasource.DataSource#getType() - */ + + + * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */ @Override public DataSourceType getType() { return DataSourceType.FILE; @@ -767,9 +767,9 @@ public class FlatFile implements DataSource { /** * Method isLogged. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isLogged(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */ @Override public boolean isLogged(String user) { return PlayerCache.getInstance().isAuthenticated(user); @@ -778,8 +778,8 @@ public class FlatFile implements DataSource { /** * Method setLogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setLogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */ @Override public void setLogged(String user) { } @@ -787,8 +787,8 @@ public class FlatFile implements DataSource { /** * Method setUnlogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */ @Override public void setUnlogged(String user) { } @@ -803,9 +803,9 @@ public class FlatFile implements DataSource { /** * Method getAccountsRegistered. - * @return int - * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */ @Override public int getAccountsRegistered() { BufferedReader br = null; @@ -833,8 +833,8 @@ public class FlatFile implements DataSource { * Method updateName. * @param oldone String * @param newone String - * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) - */ + + * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */ @Override public void updateName(String oldone, String newone) { PlayerAuth auth = this.getAuth(oldone); @@ -845,9 +845,9 @@ public class FlatFile implements DataSource { /** * Method getAllAuths. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuths() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */ @Override public List getAllAuths() { BufferedReader br = null; @@ -897,9 +897,9 @@ public class FlatFile implements DataSource { /** * Method getLoggedPlayers. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */ @Override public List getLoggedPlayers() { return new ArrayList<>(); diff --git a/src/main/java/fr/xephi/authme/datasource/MySQL.java b/src/main/java/fr/xephi/authme/datasource/MySQL.java index 4cd9b3f67..e90ff2a97 100644 --- a/src/main/java/fr/xephi/authme/datasource/MySQL.java +++ b/src/main/java/fr/xephi/authme/datasource/MySQL.java @@ -49,10 +49,10 @@ public class MySQL implements DataSource { /** * Constructor for MySQL. - * @throws ClassNotFoundException - * @throws SQLException - * @throws PoolInitializationException - */ + + + + * @throws ClassNotFoundException * @throws SQLException * @throws PoolInitializationException */ public MySQL() throws ClassNotFoundException, SQLException, PoolInitializationException { this.host = Settings.getMySQLHost; this.port = Settings.getMySQLPort; @@ -108,9 +108,9 @@ public class MySQL implements DataSource { /** * Method setConnectionArguments. - * @throws ClassNotFoundException - * @throws IllegalArgumentException - */ + + + * @throws ClassNotFoundException * @throws IllegalArgumentException */ private synchronized void setConnectionArguments() throws ClassNotFoundException, IllegalArgumentException { HikariConfig config = new HikariConfig(); @@ -132,9 +132,9 @@ public class MySQL implements DataSource { /** * Method reloadArguments. - * @throws ClassNotFoundException - * @throws IllegalArgumentException - */ + + + * @throws ClassNotFoundException * @throws IllegalArgumentException */ private synchronized void reloadArguments() throws ClassNotFoundException, IllegalArgumentException { if (ds != null) { @@ -146,17 +146,17 @@ public class MySQL implements DataSource { /** * Method getConnection. - * @return Connection - * @throws SQLException - */ + + + * @return Connection * @throws SQLException */ private synchronized Connection getConnection() throws SQLException { return ds.getConnection(); } /** * Method setupConnection. - * @throws SQLException - */ + + * @throws SQLException */ private synchronized void setupConnection() throws SQLException { Connection con = null; Statement st = null; @@ -223,9 +223,9 @@ public class MySQL implements DataSource { /** * Method isAuthAvailable. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */ @Override public synchronized boolean isAuthAvailable(String user) { Connection con = null; @@ -251,9 +251,9 @@ public class MySQL implements DataSource { /** * Method getAuth. * @param user String - * @return PlayerAuth - * @see fr.xephi.authme.datasource.DataSource#getAuth(String) - */ + + + * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */ @Override public synchronized PlayerAuth getAuth(String user) { Connection con = null; @@ -310,9 +310,9 @@ public class MySQL implements DataSource { /** * Method saveAuth. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */ @Override public synchronized boolean saveAuth(PlayerAuth auth) { Connection con = null; @@ -523,9 +523,9 @@ public class MySQL implements DataSource { /** * Method updatePassword. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */ @Override public synchronized boolean updatePassword(PlayerAuth auth) { Connection con = null; @@ -574,9 +574,9 @@ public class MySQL implements DataSource { /** * Method updateSession. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */ @Override public synchronized boolean updateSession(PlayerAuth auth) { Connection con = null; @@ -603,9 +603,9 @@ public class MySQL implements DataSource { /** * Method purgeDatabase. * @param until long - * @return int - * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */ @Override public synchronized int purgeDatabase(long until) { Connection con = null; @@ -628,9 +628,9 @@ public class MySQL implements DataSource { /** * Method autoPurgeDatabase. * @param until long - * @return List - * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */ @Override public synchronized List autoPurgeDatabase(long until) { Connection con = null; @@ -664,9 +664,9 @@ public class MySQL implements DataSource { /** * Method removeAuth. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */ @Override public synchronized boolean removeAuth(String user) { Connection con = null; @@ -707,9 +707,9 @@ public class MySQL implements DataSource { /** * Method updateQuitLoc. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */ @Override public synchronized boolean updateQuitLoc(PlayerAuth auth) { Connection con = null; @@ -737,9 +737,9 @@ public class MySQL implements DataSource { /** * Method getIps. * @param ip String - * @return int - * @see fr.xephi.authme.datasource.DataSource#getIps(String) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */ @Override public synchronized int getIps(String ip) { Connection con = null; @@ -769,9 +769,9 @@ public class MySQL implements DataSource { /** * Method updateEmail. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */ @Override public synchronized boolean updateEmail(PlayerAuth auth) { Connection con = null; @@ -797,9 +797,9 @@ public class MySQL implements DataSource { /** * Method updateSalt. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */ @Override public synchronized boolean updateSalt(PlayerAuth auth) { if (columnSalt.isEmpty()) { @@ -871,9 +871,9 @@ public class MySQL implements DataSource { /** * Method getAllAuthsByName. * @param auth PlayerAuth - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */ @Override public synchronized List getAllAuthsByName(PlayerAuth auth) { Connection con = null; @@ -903,9 +903,9 @@ public class MySQL implements DataSource { /** * Method getAllAuthsByIp. * @param ip String - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */ @Override public synchronized List getAllAuthsByIp(String ip) { Connection con = null; @@ -935,10 +935,10 @@ public class MySQL implements DataSource { /** * Method getAllAuthsByEmail. * @param email String - * @return List - * @throws SQLException - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) - */ + + + + * @return List * @throws SQLException * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */ @Override public synchronized List getAllAuthsByEmail(String email) throws SQLException { final Connection con = getConnection(); @@ -964,8 +964,8 @@ public class MySQL implements DataSource { /** * Method purgeBanned. * @param banned List - * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) - */ + + * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) */ @Override public synchronized void purgeBanned(List banned) { Connection con = null; @@ -988,9 +988,9 @@ public class MySQL implements DataSource { /** * Method getType. - * @return DataSourceType - * @see fr.xephi.authme.datasource.DataSource#getType() - */ + + + * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */ @Override public DataSourceType getType() { return DataSourceType.MYSQL; @@ -999,9 +999,9 @@ public class MySQL implements DataSource { /** * Method isLogged. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isLogged(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */ @Override public boolean isLogged(String user) { Connection con = null; @@ -1029,8 +1029,8 @@ public class MySQL implements DataSource { /** * Method setLogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setLogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */ @Override public void setLogged(String user) { Connection con = null; @@ -1053,8 +1053,8 @@ public class MySQL implements DataSource { /** * Method setUnlogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */ @Override public void setUnlogged(String user) { Connection con = null; @@ -1100,9 +1100,9 @@ public class MySQL implements DataSource { /** * Method getAccountsRegistered. - * @return int - * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */ @Override public int getAccountsRegistered() { int result = 0; @@ -1131,8 +1131,8 @@ public class MySQL implements DataSource { * Method updateName. * @param oldone String * @param newone String - * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) - */ + + * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */ @Override public void updateName(String oldone, String newone) { Connection con = null; @@ -1154,9 +1154,9 @@ public class MySQL implements DataSource { /** * Method getAllAuths. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuths() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */ @Override public List getAllAuths() { List auths = new ArrayList<>(); @@ -1210,9 +1210,9 @@ public class MySQL implements DataSource { /** * Method getLoggedPlayers. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */ @Override public List getLoggedPlayers() { List auths = new ArrayList<>(); diff --git a/src/main/java/fr/xephi/authme/datasource/SQLite.java b/src/main/java/fr/xephi/authme/datasource/SQLite.java index 6b5cae2be..5b102bdf9 100644 --- a/src/main/java/fr/xephi/authme/datasource/SQLite.java +++ b/src/main/java/fr/xephi/authme/datasource/SQLite.java @@ -37,9 +37,9 @@ public class SQLite implements DataSource { /** * Constructor for SQLite. - * @throws ClassNotFoundException - * @throws SQLException - */ + + + * @throws ClassNotFoundException * @throws SQLException */ public SQLite() throws ClassNotFoundException, SQLException { this.database = Settings.getMySQLDatabase; this.tableName = Settings.getMySQLTablename; @@ -69,9 +69,9 @@ public class SQLite implements DataSource { /** * Method connect. - * @throws ClassNotFoundException - * @throws SQLException - */ + + + * @throws ClassNotFoundException * @throws SQLException */ private synchronized void connect() throws ClassNotFoundException, SQLException { Class.forName("org.sqlite.JDBC"); ConsoleLogger.info("SQLite driver loaded"); @@ -81,8 +81,8 @@ public class SQLite implements DataSource { /** * Method setup. - * @throws SQLException - */ + + * @throws SQLException */ private synchronized void setup() throws SQLException { Statement st = null; ResultSet rs = null; @@ -140,9 +140,9 @@ public class SQLite implements DataSource { /** * Method isAuthAvailable. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */ @Override public synchronized boolean isAuthAvailable(String user) { PreparedStatement pst = null; @@ -164,9 +164,9 @@ public class SQLite implements DataSource { /** * Method getAuth. * @param user String - * @return PlayerAuth - * @see fr.xephi.authme.datasource.DataSource#getAuth(String) - */ + + + * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */ @Override public synchronized PlayerAuth getAuth(String user) { PreparedStatement pst = null; @@ -200,9 +200,9 @@ public class SQLite implements DataSource { /** * Method saveAuth. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */ @Override public synchronized boolean saveAuth(PlayerAuth auth) { PreparedStatement pst = null; @@ -237,9 +237,9 @@ public class SQLite implements DataSource { /** * Method updatePassword. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */ @Override public synchronized boolean updatePassword(PlayerAuth auth) { PreparedStatement pst = null; @@ -260,9 +260,9 @@ public class SQLite implements DataSource { /** * Method updateSession. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */ @Override public boolean updateSession(PlayerAuth auth) { PreparedStatement pst = null; @@ -285,9 +285,9 @@ public class SQLite implements DataSource { /** * Method purgeDatabase. * @param until long - * @return int - * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */ @Override public int purgeDatabase(long until) { PreparedStatement pst = null; @@ -307,9 +307,9 @@ public class SQLite implements DataSource { /** * Method autoPurgeDatabase. * @param until long - * @return List - * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */ @Override public List autoPurgeDatabase(long until) { PreparedStatement pst = null; @@ -335,9 +335,9 @@ public class SQLite implements DataSource { /** * Method removeAuth. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */ @Override public synchronized boolean removeAuth(String user) { PreparedStatement pst = null; @@ -357,9 +357,9 @@ public class SQLite implements DataSource { /** * Method updateQuitLoc. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */ @Override public boolean updateQuitLoc(PlayerAuth auth) { PreparedStatement pst = null; @@ -383,9 +383,9 @@ public class SQLite implements DataSource { /** * Method getIps. * @param ip String - * @return int - * @see fr.xephi.authme.datasource.DataSource#getIps(String) - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */ @Override public int getIps(String ip) { PreparedStatement pst = null; @@ -411,9 +411,9 @@ public class SQLite implements DataSource { /** * Method updateEmail. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */ @Override public boolean updateEmail(PlayerAuth auth) { PreparedStatement pst = null; @@ -434,9 +434,9 @@ public class SQLite implements DataSource { /** * Method updateSalt. * @param auth PlayerAuth - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */ @Override public boolean updateSalt(PlayerAuth auth) { if (columnSalt.isEmpty()) { @@ -509,9 +509,9 @@ public class SQLite implements DataSource { /** * Method getAllAuthsByName. * @param auth PlayerAuth - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */ @Override public List getAllAuthsByName(PlayerAuth auth) { PreparedStatement pst = null; @@ -539,9 +539,9 @@ public class SQLite implements DataSource { /** * Method getAllAuthsByIp. * @param ip String - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */ @Override public List getAllAuthsByIp(String ip) { PreparedStatement pst = null; @@ -569,9 +569,9 @@ public class SQLite implements DataSource { /** * Method getAllAuthsByEmail. * @param email String - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */ @Override public List getAllAuthsByEmail(String email) { PreparedStatement pst = null; @@ -599,8 +599,8 @@ public class SQLite implements DataSource { /** * Method purgeBanned. * @param banned List - * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) - */ + + * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List) */ @Override public void purgeBanned(List banned) { PreparedStatement pst = null; @@ -619,9 +619,9 @@ public class SQLite implements DataSource { /** * Method getType. - * @return DataSourceType - * @see fr.xephi.authme.datasource.DataSource#getType() - */ + + + * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */ @Override public DataSourceType getType() { return DataSourceType.SQLITE; @@ -630,9 +630,9 @@ public class SQLite implements DataSource { /** * Method isLogged. * @param user String - * @return boolean - * @see fr.xephi.authme.datasource.DataSource#isLogged(String) - */ + + + * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */ @Override public boolean isLogged(String user) { PreparedStatement pst = null; @@ -656,8 +656,8 @@ public class SQLite implements DataSource { /** * Method setLogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setLogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */ @Override public void setLogged(String user) { PreparedStatement pst = null; @@ -676,8 +676,8 @@ public class SQLite implements DataSource { /** * Method setUnlogged. * @param user String - * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) - */ + + * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */ @Override public void setUnlogged(String user) { PreparedStatement pst = null; @@ -715,9 +715,9 @@ public class SQLite implements DataSource { /** * Method getAccountsRegistered. - * @return int - * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() - */ + + + * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */ @Override public int getAccountsRegistered() { int result = 0; @@ -742,8 +742,8 @@ public class SQLite implements DataSource { * Method updateName. * @param oldone String * @param newone String - * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) - */ + + * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */ @Override public void updateName(String oldone, String newone) { PreparedStatement pst = null; @@ -761,9 +761,9 @@ public class SQLite implements DataSource { /** * Method getAllAuths. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getAllAuths() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */ @Override public List getAllAuths() { List auths = new ArrayList<>(); @@ -796,9 +796,9 @@ public class SQLite implements DataSource { /** * Method getLoggedPlayers. - * @return List - * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() - */ + + + * @return List * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */ @Override public List getLoggedPlayers() { List auths = new ArrayList<>(); diff --git a/src/main/java/fr/xephi/authme/events/AuthMeAsyncPreLoginEvent.java b/src/main/java/fr/xephi/authme/events/AuthMeAsyncPreLoginEvent.java index 13258bae5..a0c5cb0bb 100644 --- a/src/main/java/fr/xephi/authme/events/AuthMeAsyncPreLoginEvent.java +++ b/src/main/java/fr/xephi/authme/events/AuthMeAsyncPreLoginEvent.java @@ -28,16 +28,16 @@ public class AuthMeAsyncPreLoginEvent extends Event { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return player; } /** * Method canLogin. - * @return boolean - */ + + * @return boolean */ public boolean canLogin() { return canLogin; } @@ -52,8 +52,8 @@ public class AuthMeAsyncPreLoginEvent extends Event { /** * Method getHandlers. - * @return HandlerList - */ + + * @return HandlerList */ @Override public HandlerList getHandlers() { return handlers; diff --git a/src/main/java/fr/xephi/authme/events/AuthMeTeleportEvent.java b/src/main/java/fr/xephi/authme/events/AuthMeTeleportEvent.java index a5d21368f..9bd901c08 100644 --- a/src/main/java/fr/xephi/authme/events/AuthMeTeleportEvent.java +++ b/src/main/java/fr/xephi/authme/events/AuthMeTeleportEvent.java @@ -29,8 +29,8 @@ public class AuthMeTeleportEvent extends CustomEvent { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return player; } @@ -45,16 +45,16 @@ public class AuthMeTeleportEvent extends CustomEvent { /** * Method getTo. - * @return Location - */ + + * @return Location */ public Location getTo() { return to; } /** * Method getFrom. - * @return Location - */ + + * @return Location */ public Location getFrom() { return from; } diff --git a/src/main/java/fr/xephi/authme/events/CustomEvent.java b/src/main/java/fr/xephi/authme/events/CustomEvent.java index bdd4daf55..221bba63b 100644 --- a/src/main/java/fr/xephi/authme/events/CustomEvent.java +++ b/src/main/java/fr/xephi/authme/events/CustomEvent.java @@ -28,25 +28,25 @@ public class CustomEvent extends Event implements Cancellable { /** * Method getHandlers. - * @return HandlerList - */ + + * @return HandlerList */ public HandlerList getHandlers() { return handlers; } /** * Method getHandlerList. - * @return HandlerList - */ + + * @return HandlerList */ public static HandlerList getHandlerList() { return handlers; } /** * Method isCancelled. - * @return boolean - * @see org.bukkit.event.Cancellable#isCancelled() - */ + + + * @return boolean * @see org.bukkit.event.Cancellable#isCancelled() */ public boolean isCancelled() { return this.isCancelled; } @@ -54,8 +54,8 @@ public class CustomEvent extends Event implements Cancellable { /** * Method setCancelled. * @param cancelled boolean - * @see org.bukkit.event.Cancellable#setCancelled(boolean) - */ + + * @see org.bukkit.event.Cancellable#setCancelled(boolean) */ public void setCancelled(boolean cancelled) { this.isCancelled = cancelled; } diff --git a/src/main/java/fr/xephi/authme/events/FirstSpawnTeleportEvent.java b/src/main/java/fr/xephi/authme/events/FirstSpawnTeleportEvent.java index f89ca9d94..29e24e345 100644 --- a/src/main/java/fr/xephi/authme/events/FirstSpawnTeleportEvent.java +++ b/src/main/java/fr/xephi/authme/events/FirstSpawnTeleportEvent.java @@ -31,8 +31,8 @@ public class FirstSpawnTeleportEvent extends CustomEvent { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return player; } @@ -47,16 +47,16 @@ public class FirstSpawnTeleportEvent extends CustomEvent { /** * Method getTo. - * @return Location - */ + + * @return Location */ public Location getTo() { return to; } /** * Method getFrom. - * @return Location - */ + + * @return Location */ public Location getFrom() { return from; } diff --git a/src/main/java/fr/xephi/authme/events/LoginEvent.java b/src/main/java/fr/xephi/authme/events/LoginEvent.java index 89126b91f..9c661d204 100644 --- a/src/main/java/fr/xephi/authme/events/LoginEvent.java +++ b/src/main/java/fr/xephi/authme/events/LoginEvent.java @@ -30,8 +30,8 @@ public class LoginEvent extends Event { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return this.player; } @@ -55,16 +55,16 @@ public class LoginEvent extends Event { /** * Method isLogin. - * @return boolean - */ + + * @return boolean */ public boolean isLogin() { return isLogin; } /** * Method getHandlers. - * @return HandlerList - */ + + * @return HandlerList */ @Override public HandlerList getHandlers() { return handlers; @@ -72,8 +72,8 @@ public class LoginEvent extends Event { /** * Method getHandlerList. - * @return HandlerList - */ + + * @return HandlerList */ public static HandlerList getHandlerList() { return handlers; } diff --git a/src/main/java/fr/xephi/authme/events/LogoutEvent.java b/src/main/java/fr/xephi/authme/events/LogoutEvent.java index d57620062..4c4254dda 100644 --- a/src/main/java/fr/xephi/authme/events/LogoutEvent.java +++ b/src/main/java/fr/xephi/authme/events/LogoutEvent.java @@ -26,8 +26,8 @@ public class LogoutEvent extends Event { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return this.player; } @@ -42,8 +42,8 @@ public class LogoutEvent extends Event { /** * Method getHandlers. - * @return HandlerList - */ + + * @return HandlerList */ @Override public HandlerList getHandlers() { return handlers; @@ -51,8 +51,8 @@ public class LogoutEvent extends Event { /** * Method getHandlerList. - * @return HandlerList - */ + + * @return HandlerList */ public static HandlerList getHandlerList() { return handlers; } diff --git a/src/main/java/fr/xephi/authme/events/PasswordEncryptionEvent.java b/src/main/java/fr/xephi/authme/events/PasswordEncryptionEvent.java index d4838cb28..a2c2a3066 100644 --- a/src/main/java/fr/xephi/authme/events/PasswordEncryptionEvent.java +++ b/src/main/java/fr/xephi/authme/events/PasswordEncryptionEvent.java @@ -35,8 +35,8 @@ public class PasswordEncryptionEvent extends Event { /** * Method getHandlers. - * @return HandlerList - */ + + * @return HandlerList */ @Override public HandlerList getHandlers() { return handlers; @@ -52,24 +52,24 @@ public class PasswordEncryptionEvent extends Event { /** * Method getMethod. - * @return EncryptionMethod - */ + + * @return EncryptionMethod */ public EncryptionMethod getMethod() { return method; } /** * Method getPlayerName. - * @return String - */ + + * @return String */ public String getPlayerName() { return playerName; } /** * Method getHandlerList. - * @return HandlerList - */ + + * @return HandlerList */ public static HandlerList getHandlerList() { return handlers; } diff --git a/src/main/java/fr/xephi/authme/events/ProtectInventoryEvent.java b/src/main/java/fr/xephi/authme/events/ProtectInventoryEvent.java index 461155a79..937c3f75f 100644 --- a/src/main/java/fr/xephi/authme/events/ProtectInventoryEvent.java +++ b/src/main/java/fr/xephi/authme/events/ProtectInventoryEvent.java @@ -34,24 +34,24 @@ public class ProtectInventoryEvent extends CustomEvent { /** * Method getStoredInventory. - * @return ItemStack[] - */ + + * @return ItemStack[] */ public ItemStack[] getStoredInventory() { return this.storedinventory; } /** * Method getStoredArmor. - * @return ItemStack[] - */ + + * @return ItemStack[] */ public ItemStack[] getStoredArmor() { return this.storedarmor; } /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return this.player; } @@ -66,8 +66,8 @@ public class ProtectInventoryEvent extends CustomEvent { /** * Method getEmptyInventory. - * @return ItemStack[] - */ + + * @return ItemStack[] */ public ItemStack[] getEmptyInventory() { return this.emptyInventory; } @@ -82,8 +82,8 @@ public class ProtectInventoryEvent extends CustomEvent { /** * Method getEmptyArmor. - * @return ItemStack[] - */ + + * @return ItemStack[] */ public ItemStack[] getEmptyArmor() { return this.emptyArmor; } diff --git a/src/main/java/fr/xephi/authme/events/RegisterTeleportEvent.java b/src/main/java/fr/xephi/authme/events/RegisterTeleportEvent.java index d5dea8fff..c7678e40b 100644 --- a/src/main/java/fr/xephi/authme/events/RegisterTeleportEvent.java +++ b/src/main/java/fr/xephi/authme/events/RegisterTeleportEvent.java @@ -30,8 +30,8 @@ public class RegisterTeleportEvent extends CustomEvent { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return player; } @@ -46,16 +46,16 @@ public class RegisterTeleportEvent extends CustomEvent { /** * Method getTo. - * @return Location - */ + + * @return Location */ public Location getTo() { return to; } /** * Method getFrom. - * @return Location - */ + + * @return Location */ public Location getFrom() { return from; } diff --git a/src/main/java/fr/xephi/authme/events/ResetInventoryEvent.java b/src/main/java/fr/xephi/authme/events/ResetInventoryEvent.java index 736fbe663..af5c1ce0b 100644 --- a/src/main/java/fr/xephi/authme/events/ResetInventoryEvent.java +++ b/src/main/java/fr/xephi/authme/events/ResetInventoryEvent.java @@ -24,8 +24,8 @@ public class ResetInventoryEvent extends CustomEvent { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return this.player; } diff --git a/src/main/java/fr/xephi/authme/events/RestoreInventoryEvent.java b/src/main/java/fr/xephi/authme/events/RestoreInventoryEvent.java index fb3f05a5f..de2dcb174 100644 --- a/src/main/java/fr/xephi/authme/events/RestoreInventoryEvent.java +++ b/src/main/java/fr/xephi/authme/events/RestoreInventoryEvent.java @@ -32,8 +32,8 @@ public class RestoreInventoryEvent extends CustomEvent { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return this.player; } diff --git a/src/main/java/fr/xephi/authme/events/SpawnTeleportEvent.java b/src/main/java/fr/xephi/authme/events/SpawnTeleportEvent.java index 1aafdd650..d23796481 100644 --- a/src/main/java/fr/xephi/authme/events/SpawnTeleportEvent.java +++ b/src/main/java/fr/xephi/authme/events/SpawnTeleportEvent.java @@ -34,8 +34,8 @@ public class SpawnTeleportEvent extends CustomEvent { /** * Method getPlayer. - * @return Player - */ + + * @return Player */ public Player getPlayer() { return player; } @@ -50,24 +50,24 @@ public class SpawnTeleportEvent extends CustomEvent { /** * Method getTo. - * @return Location - */ + + * @return Location */ public Location getTo() { return to; } /** * Method getFrom. - * @return Location - */ + + * @return Location */ public Location getFrom() { return from; } /** * Method isAuthenticated. - * @return boolean - */ + + * @return boolean */ public boolean isAuthenticated() { return isAuthenticated; } diff --git a/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java b/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java index 337e5b97b..635f02774 100644 --- a/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java +++ b/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java @@ -27,8 +27,8 @@ public class BungeeCordMessage implements PluginMessageListener { * @param channel String * @param player Player * @param message byte[] - * @see org.bukkit.plugin.messaging.PluginMessageListener#onPluginMessageReceived(String, Player, byte[]) - */ + + * @see org.bukkit.plugin.messaging.PluginMessageListener#onPluginMessageReceived(String, Player, byte[]) */ @Override public void onPluginMessageReceived(String channel, Player player, byte[] message) { diff --git a/src/main/java/fr/xephi/authme/hooks/EssSpawn.java b/src/main/java/fr/xephi/authme/hooks/EssSpawn.java index 5e37b5eb8..b13d8050f 100644 --- a/src/main/java/fr/xephi/authme/hooks/EssSpawn.java +++ b/src/main/java/fr/xephi/authme/hooks/EssSpawn.java @@ -21,8 +21,8 @@ public class EssSpawn extends CustomConfiguration { /** * Method getInstance. - * @return EssSpawn - */ + + * @return EssSpawn */ public static EssSpawn getInstance() { if (spawn == null) { spawn = new EssSpawn(); @@ -32,8 +32,8 @@ public class EssSpawn extends CustomConfiguration { /** * Method getLocation. - * @return Location - */ + + * @return Location */ public Location getLocation() { try { if (!this.contains("spawns.default.world")) diff --git a/src/main/java/fr/xephi/authme/listener/AuthMeInventoryPacketAdapter.java b/src/main/java/fr/xephi/authme/listener/AuthMeInventoryPacketAdapter.java index b11501f37..affc050d2 100644 --- a/src/main/java/fr/xephi/authme/listener/AuthMeInventoryPacketAdapter.java +++ b/src/main/java/fr/xephi/authme/listener/AuthMeInventoryPacketAdapter.java @@ -57,8 +57,8 @@ public class AuthMeInventoryPacketAdapter extends PacketAdapter { /** * Method onPacketSending. * @param packetEvent PacketEvent - * @see com.comphenix.protocol.events.PacketListener#onPacketSending(PacketEvent) - */ + + * @see com.comphenix.protocol.events.PacketListener#onPacketSending(PacketEvent) */ @Override public void onPacketSending(PacketEvent packetEvent) { Player player = packetEvent.getPlayer(); diff --git a/src/main/java/fr/xephi/authme/modules/Module.java b/src/main/java/fr/xephi/authme/modules/Module.java index 59a2bc4cc..f6263ad23 100644 --- a/src/main/java/fr/xephi/authme/modules/Module.java +++ b/src/main/java/fr/xephi/authme/modules/Module.java @@ -18,14 +18,14 @@ public abstract class Module { /** * Method getName. - * @return String - */ + + * @return String */ public abstract String getName(); /** * Method getType. - * @return ModuleType - */ + + * @return ModuleType */ public abstract ModuleType getType(); public void load() { diff --git a/src/main/java/fr/xephi/authme/modules/ModuleManager.java b/src/main/java/fr/xephi/authme/modules/ModuleManager.java index 38e6c1298..e83710f84 100644 --- a/src/main/java/fr/xephi/authme/modules/ModuleManager.java +++ b/src/main/java/fr/xephi/authme/modules/ModuleManager.java @@ -31,8 +31,8 @@ public class ModuleManager { /** * Method isModuleEnabled. * @param name String - * @return boolean - */ + + * @return boolean */ public boolean isModuleEnabled(String name) { for (Module m : modules) { if (m.getName().equalsIgnoreCase(name)) @@ -44,8 +44,8 @@ public class ModuleManager { /** * Method isModuleEnabled. * @param type Module.ModuleType - * @return boolean - */ + + * @return boolean */ public boolean isModuleEnabled(Module.ModuleType type) { for (Module m : modules) { if (m.getType() == type) @@ -57,8 +57,8 @@ public class ModuleManager { /** * Method getModule. * @param name String - * @return Module - */ + + * @return Module */ public Module getModule(String name) { for (Module m : modules) { if (m.getName().equalsIgnoreCase(name)) @@ -70,8 +70,8 @@ public class ModuleManager { /** * Method getModule. * @param type Module.ModuleType - * @return Module - */ + + * @return Module */ public Module getModule(Module.ModuleType type) { for (Module m : modules) { if (m.getType() == type) @@ -82,8 +82,8 @@ public class ModuleManager { /** * Method loadModules. - * @return int - */ + + * @return int */ public int loadModules() { File dir = Settings.MODULE_FOLDER; int count = 0; diff --git a/src/main/java/fr/xephi/authme/permission/PermissionsManager.java b/src/main/java/fr/xephi/authme/permission/PermissionsManager.java index 908f48233..7f1b4f9c7 100644 --- a/src/main/java/fr/xephi/authme/permission/PermissionsManager.java +++ b/src/main/java/fr/xephi/authme/permission/PermissionsManager.java @@ -91,7 +91,7 @@ public class PermissionsManager { * Check if the permissions manager is currently hooked into any of the supported permissions systems. * d. - * @return False if there isn't any permissions system used. */ + * @return False if there isn't any permissions system used. */ public boolean isEnabled() { return !permsType.equals(PermissionsSystemType.NONE); } @@ -100,7 +100,7 @@ public class PermissionsManager { * Return the permissions system where the permissions manager is currently hooked into. * e. - * @return Permissions system type. */ + * @return Permissions system type. */ public PermissionsSystemType getUsedPermissionsSystemType() { return this.permsType; } @@ -109,7 +109,7 @@ public class PermissionsManager { * Setup and hook into the permissions systems. * m. - * @return The detected permissions system. */ + * @return The detected permissions system. */ public PermissionsSystemType setup() { // Define the plugin manager final PluginManager pm = this.server.getPluginManager(); @@ -246,7 +246,7 @@ public class PermissionsManager { * Reload the permissions manager, and re-hook all permission plugins. * e. - * @return True on success, false on failure. */ + * @return True on success, false on failure. */ public boolean reload() { // Unhook all permission plugins unhook(); @@ -300,7 +300,7 @@ public class PermissionsManager { * Get the logger instance. * e. - * @return Logger instance. */ + * @return Logger instance. */ public Logger getLogger() { return this.log; } @@ -321,7 +321,7 @@ public class PermissionsManager { * @param permsNode Permissions node. * n. - * @return True if the player has permission. */ + * @return True if the player has permission. */ public boolean hasPermission(Player player, String permsNode) { return hasPermission(player, permsNode, player.isOp()); } @@ -334,7 +334,7 @@ public class PermissionsManager { * @param def Default returned if no permissions system is used. * n. - * @return True if the player has permission. */ + * @return True if the player has permission. */ public boolean hasPermission(Player player, String permsNode, boolean def) { if(!isEnabled()) // No permissions system is used, return default @@ -389,8 +389,8 @@ public class PermissionsManager { /** * Method getGroups. * @param player Player - * @return List - */ + g> + * @return List */ @SuppressWarnings({"unchecked", "rawtypes", "deprecation"}) public List getGroups(Player player) { if(!isEnabled()) @@ -461,8 +461,8 @@ public class PermissionsManager { /** * Method getName. - * @return String - */ + ng + * @return String */ public String getName() { return this.name; } diff --git a/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java b/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java index aeae0f143..87faa3d22 100644 --- a/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java +++ b/src/main/java/fr/xephi/authme/process/join/AsyncronousJoin.java @@ -255,8 +255,8 @@ public class AsyncronousJoin { /** * Method needFirstSpawn. - * @return boolean - */ + + * @return boolean */ private boolean needFirstSpawn() { if (player.hasPlayedBefore()) return false; diff --git a/src/main/java/fr/xephi/authme/process/login/AsyncronousLogin.java b/src/main/java/fr/xephi/authme/process/login/AsyncronousLogin.java index 2181a3819..e6439d79b 100644 --- a/src/main/java/fr/xephi/authme/process/login/AsyncronousLogin.java +++ b/src/main/java/fr/xephi/authme/process/login/AsyncronousLogin.java @@ -57,16 +57,16 @@ public class AsyncronousLogin { /** * Method getIP. - * @return String - */ + + * @return String */ protected String getIP() { return plugin.getIP(player); } /** * Method needsCaptcha. - * @return boolean - */ + + * @return boolean */ protected boolean needsCaptcha() { if (Settings.useCaptcha) { if (!plugin.captcha.containsKey(name)) { @@ -93,8 +93,8 @@ public class AsyncronousLogin { /** * Checks the precondition for authentication (like user known) and returns * the playerAuth-State - * @return PlayerAuth - */ + + * @return PlayerAuth */ protected PlayerAuth preAuth() { if (PlayerCache.getInstance().isAuthenticated(name)) { m.send(player, "logged_in"); diff --git a/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java b/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java index 953459c2c..2b63d4ffc 100644 --- a/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java +++ b/src/main/java/fr/xephi/authme/process/login/ProcessSyncronousPlayerLogin.java @@ -54,8 +54,8 @@ public class ProcessSyncronousPlayerLogin implements Runnable { /** * Method getLimbo. - * @return LimboPlayer - */ + + * @return LimboPlayer */ public LimboPlayer getLimbo() { return limbo; } diff --git a/src/main/java/fr/xephi/authme/process/register/AsyncRegister.java b/src/main/java/fr/xephi/authme/process/register/AsyncRegister.java index 12b263278..15574f6c6 100644 --- a/src/main/java/fr/xephi/authme/process/register/AsyncRegister.java +++ b/src/main/java/fr/xephi/authme/process/register/AsyncRegister.java @@ -46,17 +46,17 @@ public class AsyncRegister { /** * Method getIp. - * @return String - */ + + * @return String */ protected String getIp() { return plugin.getIP(player); } /** * Method preRegisterCheck. - * @return boolean - * @throws Exception - */ + + + * @return boolean * @throws Exception */ protected boolean preRegisterCheck() throws Exception { String lowpass = password.toLowerCase(); if (PlayerCache.getInstance().isAuthenticated(name)) { @@ -113,8 +113,8 @@ public class AsyncRegister { /** * Method emailRegister. - * @throws Exception - */ + + * @throws Exception */ protected void emailRegister() throws Exception { if (Settings.getmaxRegPerEmail > 0) { if (!plugin.getPermissionsManager().hasPermission(player, "authme.allow2accounts") && database.getAllAuthsByEmail(email).size() >= Settings.getmaxRegPerEmail) { diff --git a/src/main/java/fr/xephi/authme/process/unregister/AsyncronousUnregister.java b/src/main/java/fr/xephi/authme/process/unregister/AsyncronousUnregister.java index 0b9f3a481..80c34835c 100644 --- a/src/main/java/fr/xephi/authme/process/unregister/AsyncronousUnregister.java +++ b/src/main/java/fr/xephi/authme/process/unregister/AsyncronousUnregister.java @@ -52,8 +52,8 @@ public class AsyncronousUnregister { /** * Method getIp. - * @return String - */ + + * @return String */ protected String getIp() { return plugin.getIP(player); } diff --git a/src/main/java/fr/xephi/authme/security/HashAlgorithm.java b/src/main/java/fr/xephi/authme/security/HashAlgorithm.java index 5ce863598..db3fb202f 100644 --- a/src/main/java/fr/xephi/authme/security/HashAlgorithm.java +++ b/src/main/java/fr/xephi/authme/security/HashAlgorithm.java @@ -47,8 +47,8 @@ public enum HashAlgorithm { /** * Method getclasse. - * @return Class - */ + + * @return Class */ public Class getclasse() { return classe; } diff --git a/src/main/java/fr/xephi/authme/security/PasswordSecurity.java b/src/main/java/fr/xephi/authme/security/PasswordSecurity.java index 1a0013d04..1bca5e18f 100644 --- a/src/main/java/fr/xephi/authme/security/PasswordSecurity.java +++ b/src/main/java/fr/xephi/authme/security/PasswordSecurity.java @@ -25,9 +25,9 @@ public class PasswordSecurity { /** * Method createSalt. * @param length int - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ public static String createSalt(int length) throws NoSuchAlgorithmException { byte[] msg = new byte[40]; @@ -43,9 +43,9 @@ public class PasswordSecurity { * @param alg HashAlgorithm * @param password String * @param playerName String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ public static String getHash(HashAlgorithm alg, String password, String playerName) throws NoSuchAlgorithmException { EncryptionMethod method; @@ -146,9 +146,9 @@ public class PasswordSecurity { * @param password String * @param hash String * @param playerName String - * @return boolean - * @throws NoSuchAlgorithmException - */ + + + * @return boolean * @throws NoSuchAlgorithmException */ public static boolean comparePasswordWithHash(String password, String hash, String playerName) throws NoSuchAlgorithmException { HashAlgorithm algo = Settings.getPasswordHash; @@ -184,9 +184,9 @@ public class PasswordSecurity { * @param password String * @param hash String * @param playerName String - * @return boolean - * @throws NoSuchAlgorithmException - */ + + + * @return boolean * @throws NoSuchAlgorithmException */ private static boolean compareWithAllEncryptionMethod(String password, String hash, String playerName) throws NoSuchAlgorithmException { for (HashAlgorithm algo : HashAlgorithm.values()) { diff --git a/src/main/java/fr/xephi/authme/security/RandomString.java b/src/main/java/fr/xephi/authme/security/RandomString.java index 86b7683ac..fec71b719 100644 --- a/src/main/java/fr/xephi/authme/security/RandomString.java +++ b/src/main/java/fr/xephi/authme/security/RandomString.java @@ -36,8 +36,8 @@ public class RandomString { /** * Method nextString. - * @return String - */ + + * @return String */ public String nextString() { for (int idx = 0; idx < buf.length; ++idx) buf[idx] = chars[random.nextInt(chars.length)]; diff --git a/src/main/java/fr/xephi/authme/security/crypts/BCRYPT.java b/src/main/java/fr/xephi/authme/security/crypts/BCRYPT.java index 7e7a2f772..0eb79b332 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/BCRYPT.java +++ b/src/main/java/fr/xephi/authme/security/crypts/BCRYPT.java @@ -94,7 +94,8 @@ public class BCRYPT implements EncryptionMethod { * @param len the number of bytes to encode - * @return base64-encoded string * @throws IllegalArgumentException if the length is invalid */ + * @return base64-encoded string * @throws IllegalArgumentException if the length is invalid * @throws IllegalArgumentException + */ private static String encode_base64(byte d[], int len) throws IllegalArgumentException { int off = 0; @@ -150,7 +151,8 @@ public class BCRYPT implements EncryptionMethod { * @param maxolen the maximum number of bytes to decode - * @return an array containing the decoded bytes * @throws IllegalArgumentException if maxolen is invalid */ + * @return an array containing the decoded bytes * @throws IllegalArgumentException if maxolen is invalid * @throws IllegalArgumentException + */ private static byte[] decode_base64(String s, int maxolen) throws IllegalArgumentException { StringBuffer rs = new StringBuffer(); @@ -474,8 +476,8 @@ public class BCRYPT implements EncryptionMethod { * @param hashed the previously-hashed password * @param rounds number of rounds to hash the password - * @return boolean - */ + + * @return boolean */ public static boolean checkpw(String text, String hashed, int rounds) { boolean matched = false; @@ -499,10 +501,10 @@ public class BCRYPT implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -514,10 +516,10 @@ public class BCRYPT implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -528,8 +530,8 @@ public class BCRYPT implements EncryptionMethod { * Method getDoubleHash. * @param text String * @param salt String - * @return String - */ + + * @return String */ public static String getDoubleHash(String text, String salt) { String hash = hashpw(text, salt); return hashpw(text, hash); diff --git a/src/main/java/fr/xephi/authme/security/crypts/BCRYPT2Y.java b/src/main/java/fr/xephi/authme/security/crypts/BCRYPT2Y.java index 9cbe12fb5..ddee2cd80 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/BCRYPT2Y.java +++ b/src/main/java/fr/xephi/authme/security/crypts/BCRYPT2Y.java @@ -11,10 +11,10 @@ public class BCRYPT2Y implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class BCRYPT2Y implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/CRAZYCRYPT1.java b/src/main/java/fr/xephi/authme/security/crypts/CRAZYCRYPT1.java index 174531a8b..86e640c6f 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/CRAZYCRYPT1.java +++ b/src/main/java/fr/xephi/authme/security/crypts/CRAZYCRYPT1.java @@ -16,10 +16,10 @@ public class CRAZYCRYPT1 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -36,10 +36,7 @@ public class CRAZYCRYPT1 implements EncryptionMethod { * Method comparePassword. * @param hash String * @param password String - * @param playerName String - * @return boolean - * @throws NoSuchAlgorithmException - * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) + * @param playerName Stringooleaneptiontring) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */ @Override @@ -49,8 +46,7 @@ public class CRAZYCRYPT1 implements EncryptionMethod { } /** * Method byteArrayToHexString. - * @param args byte[] - * @return String + * @param args byte[]String * @return String */ public static String byteArrayToHexString(final byte... args) { diff --git a/src/main/java/fr/xephi/authme/security/crypts/CryptPBKDF2.java b/src/main/java/fr/xephi/authme/security/crypts/CryptPBKDF2.java index c687dff33..9b1bc7795 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/CryptPBKDF2.java +++ b/src/main/java/fr/xephi/authme/security/crypts/CryptPBKDF2.java @@ -14,10 +14,10 @@ public class CryptPBKDF2 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -33,10 +33,10 @@ public class CryptPBKDF2 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/CryptPBKDF2Django.java b/src/main/java/fr/xephi/authme/security/crypts/CryptPBKDF2Django.java index 6d160c53a..7c70909de 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/CryptPBKDF2Django.java +++ b/src/main/java/fr/xephi/authme/security/crypts/CryptPBKDF2Django.java @@ -16,10 +16,10 @@ public class CryptPBKDF2Django implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -35,10 +35,10 @@ public class CryptPBKDF2Django implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/DOUBLEMD5.java b/src/main/java/fr/xephi/authme/security/crypts/DOUBLEMD5.java index 7baf131e3..7f089be84 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/DOUBLEMD5.java +++ b/src/main/java/fr/xephi/authme/security/crypts/DOUBLEMD5.java @@ -13,10 +13,10 @@ public class DOUBLEMD5 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class DOUBLEMD5 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -41,9 +41,9 @@ public class DOUBLEMD5 implements EncryptionMethod { /** * Method getMD5. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getMD5(String message) throws NoSuchAlgorithmException { MessageDigest md5 = MessageDigest.getInstance("MD5"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/EncryptionMethod.java b/src/main/java/fr/xephi/authme/security/crypts/EncryptionMethod.java index d3084562c..829c786e8 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/EncryptionMethod.java +++ b/src/main/java/fr/xephi/authme/security/crypts/EncryptionMethod.java @@ -26,7 +26,8 @@ public interface EncryptionMethod { * @param name String - * @return Hashing password * @throws NoSuchAlgorithmException */ + * @return Hashing password * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException + */ String getHash(String password, String salt, String name) throws NoSuchAlgorithmException; @@ -36,7 +37,8 @@ public interface EncryptionMethod { * @param playerName - * @return true if password match, false else * @throws NoSuchAlgorithmException */ + * @return true if password match, false else * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException + */ boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException; diff --git a/src/main/java/fr/xephi/authme/security/crypts/IPB3.java b/src/main/java/fr/xephi/authme/security/crypts/IPB3.java index 6d2029b72..7d8ca944f 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/IPB3.java +++ b/src/main/java/fr/xephi/authme/security/crypts/IPB3.java @@ -15,10 +15,10 @@ public class IPB3 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -30,10 +30,10 @@ public class IPB3 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -44,9 +44,9 @@ public class IPB3 implements EncryptionMethod { /** * Method getMD5. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getMD5(String message) throws NoSuchAlgorithmException { MessageDigest md5 = MessageDigest.getInstance("MD5"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/JOOMLA.java b/src/main/java/fr/xephi/authme/security/crypts/JOOMLA.java index 4720213ef..f43d15f24 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/JOOMLA.java +++ b/src/main/java/fr/xephi/authme/security/crypts/JOOMLA.java @@ -13,10 +13,10 @@ public class JOOMLA implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class JOOMLA implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -42,9 +42,9 @@ public class JOOMLA implements EncryptionMethod { /** * Method getMD5. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getMD5(String message) throws NoSuchAlgorithmException { MessageDigest md5 = MessageDigest.getInstance("MD5"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/MD5.java b/src/main/java/fr/xephi/authme/security/crypts/MD5.java index 543e8a71d..7caf5ba3d 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/MD5.java +++ b/src/main/java/fr/xephi/authme/security/crypts/MD5.java @@ -13,10 +13,10 @@ public class MD5 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class MD5 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -41,9 +41,9 @@ public class MD5 implements EncryptionMethod { /** * Method getMD5. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getMD5(String message) throws NoSuchAlgorithmException { MessageDigest md5 = MessageDigest.getInstance("MD5"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/MD5VB.java b/src/main/java/fr/xephi/authme/security/crypts/MD5VB.java index 4c5df2040..ecb8a78c8 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/MD5VB.java +++ b/src/main/java/fr/xephi/authme/security/crypts/MD5VB.java @@ -13,10 +13,10 @@ public class MD5VB implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class MD5VB implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -42,9 +42,9 @@ public class MD5VB implements EncryptionMethod { /** * Method getMD5. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getMD5(String message) throws NoSuchAlgorithmException { MessageDigest md5 = MessageDigest.getInstance("MD5"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/MYBB.java b/src/main/java/fr/xephi/authme/security/crypts/MYBB.java index 0988683d7..02a362c3e 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/MYBB.java +++ b/src/main/java/fr/xephi/authme/security/crypts/MYBB.java @@ -15,10 +15,10 @@ public class MYBB implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -30,10 +30,10 @@ public class MYBB implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -44,9 +44,9 @@ public class MYBB implements EncryptionMethod { /** * Method getMD5. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getMD5(String message) throws NoSuchAlgorithmException { MessageDigest md5 = MessageDigest.getInstance("MD5"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/PHPBB.java b/src/main/java/fr/xephi/authme/security/crypts/PHPBB.java index c2860caf8..ac06e32ea 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/PHPBB.java +++ b/src/main/java/fr/xephi/authme/security/crypts/PHPBB.java @@ -21,8 +21,8 @@ public class PHPBB implements EncryptionMethod { * Method phpbb_hash. * @param password String * @param salt String - * @return String - */ + + * @return String */ public String phpbb_hash(String password, String salt) { String random_state = salt; StringBuilder random = new StringBuilder(); @@ -42,8 +42,8 @@ public class PHPBB implements EncryptionMethod { * Method _hash_gensalt_private. * @param input String * @param itoa64 String - * @return String - */ + + * @return String */ private String _hash_gensalt_private(String input, String itoa64) { return _hash_gensalt_private(input, itoa64, 6); } @@ -53,8 +53,8 @@ public class PHPBB implements EncryptionMethod { * @param input String * @param itoa64 String * @param iteration_count_log2 int - * @return String - */ + + * @return String */ private String _hash_gensalt_private(String input, String itoa64, int iteration_count_log2) { if (iteration_count_log2 < 4 || iteration_count_log2 > 31) { @@ -70,8 +70,8 @@ public class PHPBB implements EncryptionMethod { * Encode hash * @param input String * @param count int - * @return String - */ + + * @return String */ private String _hash_encode64(String input, int count) { StringBuilder output = new StringBuilder(); int i = 0; @@ -97,8 +97,8 @@ public class PHPBB implements EncryptionMethod { * Method _hash_crypt_private. * @param password String * @param setting String - * @return String - */ + + * @return String */ String _hash_crypt_private(String password, String setting) { String output = "*"; if (!setting.substring(0, 3).equals("$H$")) @@ -124,8 +124,8 @@ public class PHPBB implements EncryptionMethod { * Method phpbb_check_hash. * @param password String * @param hash String - * @return boolean - */ + + * @return boolean */ public boolean phpbb_check_hash(String password, String hash) { if (hash.length() == 34) return _hash_crypt_private(password, hash).equals(hash); @@ -135,8 +135,8 @@ public class PHPBB implements EncryptionMethod { /** * Method md5. * @param data String - * @return String - */ + + * @return String */ public static String md5(String data) { try { byte[] bytes = data.getBytes("ISO-8859-1"); @@ -151,8 +151,8 @@ public class PHPBB implements EncryptionMethod { /** * Method hexToInt. * @param ch char - * @return int - */ + + * @return int */ static int hexToInt(char ch) { if (ch >= '0' && ch <= '9') return ch - '0'; @@ -165,8 +165,8 @@ public class PHPBB implements EncryptionMethod { /** * Method bytes2hex. * @param bytes byte[] - * @return String - */ + + * @return String */ private static String bytes2hex(byte[] bytes) { StringBuilder r = new StringBuilder(32); for (byte b : bytes) { @@ -181,8 +181,8 @@ public class PHPBB implements EncryptionMethod { /** * Method pack. * @param hex String - * @return String - */ + + * @return String */ static String pack(String hex) { StringBuilder buf = new StringBuilder(); for (int i = 0; i < hex.length(); i += 2) { @@ -199,10 +199,10 @@ public class PHPBB implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -214,10 +214,10 @@ public class PHPBB implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/PHPFUSION.java b/src/main/java/fr/xephi/authme/security/crypts/PHPFUSION.java index 4e9099b25..b9d938a8f 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/PHPFUSION.java +++ b/src/main/java/fr/xephi/authme/security/crypts/PHPFUSION.java @@ -20,10 +20,10 @@ public class PHPFUSION implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -56,10 +56,10 @@ public class PHPFUSION implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -70,9 +70,9 @@ public class PHPFUSION implements EncryptionMethod { /** * Method getSHA1. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getSHA1(String message) throws NoSuchAlgorithmException { MessageDigest sha1 = MessageDigest.getInstance("SHA1"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/PLAINTEXT.java b/src/main/java/fr/xephi/authme/security/crypts/PLAINTEXT.java index e67fe9c69..94f4fe5fd 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/PLAINTEXT.java +++ b/src/main/java/fr/xephi/authme/security/crypts/PLAINTEXT.java @@ -11,10 +11,10 @@ public class PLAINTEXT implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -26,10 +26,10 @@ public class PLAINTEXT implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/ROYALAUTH.java b/src/main/java/fr/xephi/authme/security/crypts/ROYALAUTH.java index 8388de74f..e9b9e1e98 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/ROYALAUTH.java +++ b/src/main/java/fr/xephi/authme/security/crypts/ROYALAUTH.java @@ -12,10 +12,10 @@ public class ROYALAUTH implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,9 +28,9 @@ public class ROYALAUTH implements EncryptionMethod { * Method hash. * @param password String * @param salt String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ public String hash(String password, String salt) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("SHA-512"); @@ -47,10 +47,10 @@ public class ROYALAUTH implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/SALTED2MD5.java b/src/main/java/fr/xephi/authme/security/crypts/SALTED2MD5.java index 0daecc040..f90f6907b 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/SALTED2MD5.java +++ b/src/main/java/fr/xephi/authme/security/crypts/SALTED2MD5.java @@ -15,10 +15,10 @@ public class SALTED2MD5 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -30,10 +30,10 @@ public class SALTED2MD5 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -44,9 +44,9 @@ public class SALTED2MD5 implements EncryptionMethod { /** * Method getMD5. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getMD5(String message) throws NoSuchAlgorithmException { MessageDigest md5 = MessageDigest.getInstance("MD5"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/SALTEDSHA512.java b/src/main/java/fr/xephi/authme/security/crypts/SALTEDSHA512.java index 61eb9cd50..cd2b4aac4 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/SALTEDSHA512.java +++ b/src/main/java/fr/xephi/authme/security/crypts/SALTEDSHA512.java @@ -15,10 +15,10 @@ public class SALTEDSHA512 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -30,10 +30,10 @@ public class SALTEDSHA512 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -44,9 +44,9 @@ public class SALTEDSHA512 implements EncryptionMethod { /** * Method getSHA512. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getSHA512(String message) throws NoSuchAlgorithmException { MessageDigest sha512 = MessageDigest.getInstance("SHA-512"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/SHA1.java b/src/main/java/fr/xephi/authme/security/crypts/SHA1.java index 2e7968cc5..ae1fab0a4 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/SHA1.java +++ b/src/main/java/fr/xephi/authme/security/crypts/SHA1.java @@ -13,10 +13,10 @@ public class SHA1 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class SHA1 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -41,9 +41,9 @@ public class SHA1 implements EncryptionMethod { /** * Method getSHA1. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getSHA1(String message) throws NoSuchAlgorithmException { MessageDigest sha1 = MessageDigest.getInstance("SHA1"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/SHA256.java b/src/main/java/fr/xephi/authme/security/crypts/SHA256.java index d969427b5..11d53e168 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/SHA256.java +++ b/src/main/java/fr/xephi/authme/security/crypts/SHA256.java @@ -13,10 +13,10 @@ public class SHA256 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class SHA256 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -42,9 +42,9 @@ public class SHA256 implements EncryptionMethod { /** * Method getSHA256. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getSHA256(String message) throws NoSuchAlgorithmException { MessageDigest sha256 = MessageDigest.getInstance("SHA-256"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/SHA512.java b/src/main/java/fr/xephi/authme/security/crypts/SHA512.java index 29c80f17c..a44d9367b 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/SHA512.java +++ b/src/main/java/fr/xephi/authme/security/crypts/SHA512.java @@ -13,10 +13,10 @@ public class SHA512 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class SHA512 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -41,9 +41,9 @@ public class SHA512 implements EncryptionMethod { /** * Method getSHA512. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getSHA512(String message) throws NoSuchAlgorithmException { MessageDigest sha512 = MessageDigest.getInstance("SHA-512"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/SMF.java b/src/main/java/fr/xephi/authme/security/crypts/SMF.java index 2099a01d2..8ee0cbe08 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/SMF.java +++ b/src/main/java/fr/xephi/authme/security/crypts/SMF.java @@ -13,10 +13,10 @@ public class SMF implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class SMF implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -41,9 +41,9 @@ public class SMF implements EncryptionMethod { /** * Method getSHA1. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getSHA1(String message) throws NoSuchAlgorithmException { MessageDigest sha1 = MessageDigest.getInstance("SHA1"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/WBB3.java b/src/main/java/fr/xephi/authme/security/crypts/WBB3.java index 462b1cce9..4a5cdef20 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/WBB3.java +++ b/src/main/java/fr/xephi/authme/security/crypts/WBB3.java @@ -15,10 +15,10 @@ public class WBB3 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -30,10 +30,10 @@ public class WBB3 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -44,9 +44,9 @@ public class WBB3 implements EncryptionMethod { /** * Method getSHA1. * @param message String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ private static String getSHA1(String message) throws NoSuchAlgorithmException { MessageDigest sha1 = MessageDigest.getInstance("SHA1"); diff --git a/src/main/java/fr/xephi/authme/security/crypts/WBB4.java b/src/main/java/fr/xephi/authme/security/crypts/WBB4.java index 3072f1295..ab43c65ac 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/WBB4.java +++ b/src/main/java/fr/xephi/authme/security/crypts/WBB4.java @@ -11,10 +11,10 @@ public class WBB4 implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -26,10 +26,10 @@ public class WBB4 implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/WHIRLPOOL.java b/src/main/java/fr/xephi/authme/security/crypts/WHIRLPOOL.java index dac8d8ab7..f8cf09ee6 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/WHIRLPOOL.java +++ b/src/main/java/fr/xephi/authme/security/crypts/WHIRLPOOL.java @@ -379,8 +379,8 @@ public class WHIRLPOOL implements EncryptionMethod { /** * Method display. * @param array byte[] - * @return String - */ + + * @return String */ protected static String display(byte[] array) { char[] val = new char[2 * array.length]; String hex = "0123456789ABCDEF"; @@ -397,10 +397,10 @@ public class WHIRLPOOL implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -416,10 +416,10 @@ public class WHIRLPOOL implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/WORDPRESS.java b/src/main/java/fr/xephi/authme/security/crypts/WORDPRESS.java index 110abb578..6c74b0b93 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/WORDPRESS.java +++ b/src/main/java/fr/xephi/authme/security/crypts/WORDPRESS.java @@ -17,8 +17,8 @@ public class WORDPRESS implements EncryptionMethod { * Method encode64. * @param src byte[] * @param count int - * @return String - */ + + * @return String */ private String encode64(byte[] src, int count) { int i, value; StringBuilder output = new StringBuilder(); @@ -57,8 +57,8 @@ public class WORDPRESS implements EncryptionMethod { * Method crypt. * @param password String * @param setting String - * @return String - */ + + * @return String */ private String crypt(String password, String setting) { String output = "*0"; if (((setting.length() < 2) ? setting : setting.substring(0, 2)).equalsIgnoreCase(output)) { @@ -100,8 +100,8 @@ public class WORDPRESS implements EncryptionMethod { /** * Method gensaltPrivate. * @param input byte[] - * @return String - */ + + * @return String */ private String gensaltPrivate(byte[] input) { String output = "$P$"; int iterationCountLog2 = 8; @@ -113,8 +113,8 @@ public class WORDPRESS implements EncryptionMethod { /** * Method stringToUtf8. * @param string String - * @return byte[] - */ + + * @return byte[] */ private byte[] stringToUtf8(String string) { try { return string.getBytes("UTF-8"); @@ -128,10 +128,10 @@ public class WORDPRESS implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -145,10 +145,10 @@ public class WORDPRESS implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { diff --git a/src/main/java/fr/xephi/authme/security/crypts/XAUTH.java b/src/main/java/fr/xephi/authme/security/crypts/XAUTH.java index 650c1644a..2254700f8 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/XAUTH.java +++ b/src/main/java/fr/xephi/authme/security/crypts/XAUTH.java @@ -11,10 +11,10 @@ public class XAUTH implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -28,10 +28,10 @@ public class XAUTH implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -43,8 +43,8 @@ public class XAUTH implements EncryptionMethod { /** * Method getWhirlpool. * @param message String - * @return String - */ + + * @return String */ public static String getWhirlpool(String message) { WHIRLPOOL w = new WHIRLPOOL(); byte[] digest = new byte[WHIRLPOOL.DIGESTBYTES]; diff --git a/src/main/java/fr/xephi/authme/security/crypts/XF.java b/src/main/java/fr/xephi/authme/security/crypts/XF.java index dcd88686b..c8f778db4 100644 --- a/src/main/java/fr/xephi/authme/security/crypts/XF.java +++ b/src/main/java/fr/xephi/authme/security/crypts/XF.java @@ -18,10 +18,10 @@ public class XF implements EncryptionMethod { * @param password String * @param salt 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 public String getHash(String password, String salt, String name) throws NoSuchAlgorithmException { @@ -33,10 +33,10 @@ public class XF implements EncryptionMethod { * @param hash String * @param password 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 public boolean comparePassword(String hash, String password, String playerName) throws NoSuchAlgorithmException { @@ -47,9 +47,9 @@ public class XF implements EncryptionMethod { /** * Method getSHA256. * @param password String - * @return String - * @throws NoSuchAlgorithmException - */ + + + * @return String * @throws NoSuchAlgorithmException */ public String getSHA256(String password) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("SHA-256"); md.update(password.getBytes()); @@ -73,8 +73,8 @@ public class XF implements EncryptionMethod { * Method regmatch. * @param pattern String * @param line String - * @return String - */ + + * @return String */ public String regmatch(String pattern, String line) { List allMatches = new ArrayList<>(); Matcher m = Pattern.compile(pattern).matcher(line); diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/MacBasedPRF.java b/src/main/java/fr/xephi/authme/security/pbkdf2/MacBasedPRF.java index e244b7481..9a7cc0bcd 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/MacBasedPRF.java +++ b/src/main/java/fr/xephi/authme/security/pbkdf2/MacBasedPRF.java @@ -83,9 +83,9 @@ public class MacBasedPRF implements PRF { /** * Method doFinal. * @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) { byte[] r = mac.doFinal(M); return r; @@ -93,9 +93,9 @@ public class MacBasedPRF implements PRF { /** * Method getHLen. - * @return int - * @see fr.xephi.authme.security.pbkdf2.PRF#getHLen() - */ + + + * @return int * @see fr.xephi.authme.security.pbkdf2.PRF#getHLen() */ public int getHLen() { return hLen; } @@ -103,8 +103,8 @@ public class MacBasedPRF implements PRF { /** * Method init. * @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) { try { mac.init(new SecretKeySpec(P, macAlgorithm)); diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Engine.java b/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Engine.java index ae077dbf6..3e124da1b 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Engine.java +++ b/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Engine.java @@ -115,9 +115,9 @@ public class PBKDF2Engine implements PBKDF2 { /** * Method deriveKey. * @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) { return deriveKey(inputPassword, 0); } @@ -126,9 +126,9 @@ public class PBKDF2Engine implements PBKDF2 { * Method deriveKey. * @param inputPassword String * @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) { byte[] r = null; byte P[] = null; @@ -156,9 +156,9 @@ public class PBKDF2Engine implements PBKDF2 { /** * Method verifyKey. * @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) { byte[] referenceKey = getParameters().getDerivedKey(); if (referenceKey == null || referenceKey.length == 0) { @@ -193,9 +193,9 @@ public class PBKDF2Engine implements PBKDF2 { /** * Method getPseudoRandomFunction. - * @return PRF - * @see fr.xephi.authme.security.pbkdf2.PBKDF2#getPseudoRandomFunction() - */ + + + * @return PRF * @see fr.xephi.authme.security.pbkdf2.PBKDF2#getPseudoRandomFunction() */ public PRF getPseudoRandomFunction() { return prf; } @@ -318,9 +318,9 @@ public class PBKDF2Engine implements PBKDF2 { /** * Method getParameters. - * @return PBKDF2Parameters - * @see fr.xephi.authme.security.pbkdf2.PBKDF2#getParameters() - */ + + + * @return PBKDF2Parameters * @see fr.xephi.authme.security.pbkdf2.PBKDF2#getParameters() */ public PBKDF2Parameters getParameters() { return parameters; } @@ -328,8 +328,8 @@ public class PBKDF2Engine implements PBKDF2 { /** * Method setParameters. * @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) { this.parameters = parameters; } @@ -337,8 +337,8 @@ public class PBKDF2Engine implements PBKDF2 { /** * Method setPseudoRandomFunction. * @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) { this.prf = prf; } @@ -357,7 +357,8 @@ public class PBKDF2Engine implements PBKDF2 { * Supply the password as argument. - * @throws IOException * @throws NoSuchAlgorithmException */ + * @throws IOException * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException + */ public static void main(String[] args) throws IOException, NoSuchAlgorithmException { String password = "password"; diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2HexFormatter.java b/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2HexFormatter.java index 8130c7e92..8ae057fd7 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2HexFormatter.java +++ b/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2HexFormatter.java @@ -37,9 +37,9 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter { * Method fromString. * @param p PBKDF2Parameters * @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) { if (p == null || s == null) { return true; @@ -63,9 +63,9 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter { /** * Method toString. * @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) { String s = BinTools.bin2hex(p.getSalt()) + ":" + String.valueOf(p.getIterationCount()) + ":" + BinTools.bin2hex(p.getDerivedKey()); return s; diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.java b/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.java index 5f11cf1bc..5dde7a998 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.java +++ b/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.java @@ -111,8 +111,8 @@ public class PBKDF2Parameters { /** * Method getIterationCount. - * @return int - */ + + * @return int */ public int getIterationCount() { return iterationCount; } @@ -127,8 +127,8 @@ public class PBKDF2Parameters { /** * Method getSalt. - * @return byte[] - */ + + * @return byte[] */ public byte[] getSalt() { return salt; } @@ -143,8 +143,8 @@ public class PBKDF2Parameters { /** * Method getDerivedKey. - * @return byte[] - */ + + * @return byte[] */ public byte[] getDerivedKey() { return derivedKey; } @@ -159,8 +159,8 @@ public class PBKDF2Parameters { /** * Method getHashAlgorithm. - * @return String - */ + + * @return String */ public String getHashAlgorithm() { return hashAlgorithm; } @@ -175,8 +175,8 @@ public class PBKDF2Parameters { /** * Method getHashCharset. - * @return String - */ + + * @return String */ public String getHashCharset() { return hashCharset; } diff --git a/src/main/java/fr/xephi/authme/settings/CustomConfiguration.java b/src/main/java/fr/xephi/authme/settings/CustomConfiguration.java index 0381e7e78..bb4703591 100644 --- a/src/main/java/fr/xephi/authme/settings/CustomConfiguration.java +++ b/src/main/java/fr/xephi/authme/settings/CustomConfiguration.java @@ -43,8 +43,8 @@ public class CustomConfiguration extends YamlConfiguration { /** * Method reLoad. - * @return boolean - */ + + * @return boolean */ public boolean reLoad() { boolean out = true; if (!configFile.exists()) { @@ -65,8 +65,8 @@ public class CustomConfiguration extends YamlConfiguration { /** * Method getConfigFile. - * @return File - */ + + * @return File */ public File getConfigFile() { return configFile; } @@ -74,8 +74,8 @@ public class CustomConfiguration extends YamlConfiguration { /** * Method loadResource. * @param file File - * @return boolean - */ + + * @return boolean */ public boolean loadResource(File file) { if (!file.exists()) { try { diff --git a/src/main/java/fr/xephi/authme/settings/Messages.java b/src/main/java/fr/xephi/authme/settings/Messages.java index d76633cb0..46957da61 100644 --- a/src/main/java/fr/xephi/authme/settings/Messages.java +++ b/src/main/java/fr/xephi/authme/settings/Messages.java @@ -46,8 +46,8 @@ public class Messages extends CustomConfiguration { /** * Method send. * @param msg String - * @return String[] - */ + + * @return String[] */ public String[] send(String msg) { if (!Settings.messagesLanguage.equalsIgnoreCase(singleton.lang)) { singleton.reloadMessages(); @@ -73,8 +73,8 @@ public class Messages extends CustomConfiguration { /** * Method getInstance. - * @return Messages - */ + + * @return Messages */ public static Messages getInstance() { if (singleton == null) { singleton = new Messages(Settings.messageFile, Settings.messagesLanguage); diff --git a/src/main/java/fr/xephi/authme/settings/OtherAccounts.java b/src/main/java/fr/xephi/authme/settings/OtherAccounts.java index 29ae1e9c7..dcaf3c00e 100644 --- a/src/main/java/fr/xephi/authme/settings/OtherAccounts.java +++ b/src/main/java/fr/xephi/authme/settings/OtherAccounts.java @@ -35,8 +35,8 @@ public class OtherAccounts extends CustomConfiguration { /** * Method getInstance. - * @return OtherAccounts - */ + + * @return OtherAccounts */ public static OtherAccounts getInstance() { if (others == null) { others = new OtherAccounts(); @@ -83,8 +83,8 @@ public class OtherAccounts extends CustomConfiguration { /** * Method getAllPlayersByUUID. * @param uuid UUID - * @return List - */ + + * @return List */ public List getAllPlayersByUUID(UUID uuid) { return this.getStringList(uuid.toString()); } diff --git a/src/main/java/fr/xephi/authme/settings/Settings.java b/src/main/java/fr/xephi/authme/settings/Settings.java index 0e384df31..a8da9f5ec 100644 --- a/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/src/main/java/fr/xephi/authme/settings/Settings.java @@ -118,8 +118,8 @@ public final class Settings extends YamlConfiguration { /** * Method reload. - * @throws Exception - */ + + * @throws Exception */ public static void reload() throws Exception { plugin.getLogger().info("Loading Configuration File..."); boolean exist = SETTINGS_FILE.exists(); @@ -524,8 +524,8 @@ public final class Settings extends YamlConfiguration { /** * Method getPasswordHash. - * @return HashAlgorithm - */ + + * @return HashAlgorithm */ private static HashAlgorithm getPasswordHash() { String key = "settings.security.passwordHash"; try { @@ -538,8 +538,8 @@ public final class Settings extends YamlConfiguration { /** * Method getDataSource. - * @return DataSourceType - */ + + * @return DataSourceType */ private static DataSourceType getDataSource() { String key = "DataSource.backend"; try { @@ -556,8 +556,8 @@ public final class Settings extends YamlConfiguration { * server, so player has a restricted access * @param name String * @param ip String - * @return boolean - */ + + * @return boolean */ public static boolean getRestrictedIp(String name, String ip) { Iterator iter = getRestrictedIp.iterator(); @@ -610,8 +610,8 @@ public final class Settings extends YamlConfiguration { /** * Method checkLang. * @param lang String - * @return String - */ + + * @return String */ public static String checkLang(String lang) { if (new File(PLUGIN_FOLDER, "messages" + File.separator + "messages_" + lang + ".yml").exists()) { ConsoleLogger.info("Set Language to: " + lang); @@ -673,8 +673,8 @@ public final class Settings extends YamlConfiguration { /** * Method isEmailCorrect. * @param email String - * @return boolean - */ + + * @return boolean */ public static boolean isEmailCorrect(String email) { if (!email.contains("@")) return false; diff --git a/src/main/java/fr/xephi/authme/settings/Spawn.java b/src/main/java/fr/xephi/authme/settings/Spawn.java index fe53bc2d1..0671ceb48 100644 --- a/src/main/java/fr/xephi/authme/settings/Spawn.java +++ b/src/main/java/fr/xephi/authme/settings/Spawn.java @@ -45,8 +45,8 @@ public class Spawn extends CustomConfiguration { /** * Method getInstance. - * @return Spawn - */ + + * @return Spawn */ public static Spawn getInstance() { if (spawn == null) { spawn = new Spawn(); @@ -57,8 +57,8 @@ public class Spawn extends CustomConfiguration { /** * Method setSpawn. * @param location Location - * @return boolean - */ + + * @return boolean */ public boolean setSpawn(Location location) { try { set("spawn.world", location.getWorld().getName()); @@ -77,8 +77,8 @@ public class Spawn extends CustomConfiguration { /** * Method setFirstSpawn. * @param location Location - * @return boolean - */ + + * @return boolean */ public boolean setFirstSpawn(Location location) { try { set("firstspawn.world", location.getWorld().getName()); @@ -96,8 +96,8 @@ public class Spawn extends CustomConfiguration { /** * Method getLocation. - * @return Location - */ + + * @return Location */ @Deprecated public Location getLocation() { return getSpawn(); @@ -105,8 +105,8 @@ public class Spawn extends CustomConfiguration { /** * Method getSpawn. - * @return Location - */ + + * @return Location */ public Location getSpawn() { try { if (this.getString("spawn.world").isEmpty() || this.getString("spawn.world").equals("")) @@ -120,8 +120,8 @@ public class Spawn extends CustomConfiguration { /** * Method getFirstSpawn. - * @return Location - */ + + * @return Location */ public Location getFirstSpawn() { try { if (this.getString("firstspawn.world").isEmpty() || this.getString("firstspawn.world").equals("")) diff --git a/src/main/java/fr/xephi/authme/task/TimeoutTask.java b/src/main/java/fr/xephi/authme/task/TimeoutTask.java index c055c0d4c..4fed35837 100644 --- a/src/main/java/fr/xephi/authme/task/TimeoutTask.java +++ b/src/main/java/fr/xephi/authme/task/TimeoutTask.java @@ -30,8 +30,8 @@ public class TimeoutTask implements Runnable { /** * Method getName. - * @return String - */ + + * @return String */ public String getName() { return name; } diff --git a/src/main/java/fr/xephi/authme/util/StringUtils.java b/src/main/java/fr/xephi/authme/util/StringUtils.java index 202b32ce4..c84fc74a5 100644 --- a/src/main/java/fr/xephi/authme/util/StringUtils.java +++ b/src/main/java/fr/xephi/authme/util/StringUtils.java @@ -32,8 +32,8 @@ public class StringUtils { * Method containsAny. * @param str String * @param pieces String[] - * @return boolean - */ + + * @return boolean */ public static boolean containsAny(String str, String... pieces) { if (str == null) { return false; diff --git a/src/main/java/fr/xephi/authme/util/Utils.java b/src/main/java/fr/xephi/authme/util/Utils.java index f18a40475..330e8d8e7 100644 --- a/src/main/java/fr/xephi/authme/util/Utils.java +++ b/src/main/java/fr/xephi/authme/util/Utils.java @@ -47,8 +47,8 @@ public class Utils { // Check and Download GeoIP data if not exist /** * Method checkGeoIP. - * @return boolean - */ + + * @return boolean */ public static boolean checkGeoIP() { if (lookupService != null) { return true; @@ -98,8 +98,8 @@ public class Utils { /** * Method getCountryCode. * @param ip String - * @return String - */ + + * @return String */ public static String getCountryCode(String ip) { if (checkGeoIP()) { return lookupService.getCountry(ip).getCode(); @@ -110,8 +110,8 @@ public class Utils { /** * Method getCountryName. * @param ip String - * @return String - */ + + * @return String */ public static String getCountryName(String ip) { if (checkGeoIP()) { return lookupService.getCountry(ip).getName(); @@ -173,8 +173,8 @@ public class Utils { * Method addNormal. * @param player Player * @param group String - * @return boolean - */ + + * @return boolean */ public static boolean addNormal(Player player, String group) { if (!useGroupSystem()) { return false; @@ -197,8 +197,8 @@ public class Utils { /** * Method checkAuth. * @param player Player - * @return boolean - */ + + * @return boolean */ public static boolean checkAuth(Player player) { if (player == null || Utils.isUnrestricted(player)) { return true; @@ -221,8 +221,8 @@ public class Utils { /** * Method isUnrestricted. * @param player Player - * @return boolean - */ + + * @return boolean */ public static boolean isUnrestricted(Player player) { return Settings.isAllowRestrictedIp && !Settings.getUnrestrictedName.isEmpty() && (Settings.getUnrestrictedName.contains(player.getName())); @@ -230,8 +230,8 @@ public class Utils { /** * Method useGroupSystem. - * @return boolean - */ + + * @return boolean */ private static boolean useGroupSystem() { return Settings.isPermissionCheckEnabled && !Settings.getUnloggedinGroup.isEmpty(); } @@ -315,8 +315,8 @@ public class Utils { /** * Method getOnlinePlayers. - * @return Collection - */ + + * @return Collection */ @SuppressWarnings("unchecked") public static Collection getOnlinePlayers() { if (getOnlinePlayersIsCollection) { @@ -339,8 +339,8 @@ public class Utils { /** * Method getPlayer. * @param name String - * @return Player - */ + + * @return Player */ @SuppressWarnings("deprecation") public static Player getPlayer(String name) { name = name.toLowerCase(); @@ -350,8 +350,8 @@ public class Utils { /** * Method isNPC. * @param player Entity - * @return boolean - */ + + * @return boolean */ public static boolean isNPC(final Entity player) { try { if (player.hasMetadata("NPC")) {