standard javadoc

This commit is contained in:
Gabriele C 2015-11-21 01:31:18 +01:00
parent 118c79401a
commit bd1f868c6d
94 changed files with 1176 additions and 1174 deletions

View File

@ -115,8 +115,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method canConnect. * Method canConnect.
* @return boolean
*/ * @return boolean */
public boolean canConnect() { public boolean canConnect() {
return canConnect; return canConnect;
} }
@ -131,16 +131,16 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getInstance. * Method getInstance.
* @return AuthMe
*/ * @return AuthMe */
public static AuthMe getInstance() { public static AuthMe getInstance() {
return plugin; return plugin;
} }
/** /**
* Method getSettings. * Method getSettings.
* @return Settings
*/ * @return Settings */
public Settings getSettings() { public Settings getSettings() {
return settings; return settings;
} }
@ -155,8 +155,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getMessages. * Method getMessages.
* @return Messages
*/ * @return Messages */
public Messages getMessages() { public Messages getMessages() {
return m; return m;
} }
@ -450,8 +450,8 @@ public class AuthMe extends JavaPlugin {
// Initialize and setup the database // Initialize and setup the database
/** /**
* Method setupDatabase. * Method setupDatabase.
* @throws Exception
*/ * @throws Exception */
public void setupDatabase() throws Exception { public void setupDatabase() throws Exception {
if (database != null) if (database != null)
database.close(); database.close();
@ -614,8 +614,8 @@ public class AuthMe extends JavaPlugin {
* @param player * @param player
* @param perm * @param perm
* @return boolean
*/ * @return boolean */
public boolean authmePermissible(Player player, String perm) { public boolean authmePermissible(Player player, String perm) {
// New code: // New code:
return getPermissionsManager().hasPermission(player, perm); return getPermissionsManager().hasPermission(player, perm);
@ -635,8 +635,8 @@ public class AuthMe extends JavaPlugin {
* @param sender * @param sender
* @param perm * @param perm
* @return boolean
*/ * @return boolean */
public boolean authmePermissible(CommandSender sender, String perm) { public boolean authmePermissible(CommandSender sender, String perm) {
// Handle players with the permissions manager // Handle players with the permissions manager
if(sender instanceof Player) { if(sender instanceof Player) {
@ -685,8 +685,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method generateKickPlayer. * Method generateKickPlayer.
* @param collection Collection<? extends Player> * @param collection Collection<? extends Player>
* @return Player
*/ * @return Player */
public Player generateKickPlayer(Collection<? extends Player> collection) { public Player generateKickPlayer(Collection<? extends Player> collection) {
Player player = null; Player player = null;
for (Player p : collection) { for (Player p : collection) {
@ -734,8 +734,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getSpawnLocation. * Method getSpawnLocation.
* @param player Player * @param player Player
* @return Location
*/ * @return Location */
public Location getSpawnLocation(Player player) { public Location getSpawnLocation(Player player) {
World world = player.getWorld(); World world = player.getWorld();
String[] spawnPriority = Settings.spawnPriority.split(","); String[] spawnPriority = Settings.spawnPriority.split(",");
@ -761,8 +761,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getDefaultSpawn. * Method getDefaultSpawn.
* @param world World * @param world World
* @return Location
*/ * @return Location */
private Location getDefaultSpawn(World world) { private Location getDefaultSpawn(World world) {
return world.getSpawnLocation(); return world.getSpawnLocation();
} }
@ -771,8 +771,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getMultiverseSpawn. * Method getMultiverseSpawn.
* @param world World * @param world World
* @return Location
*/ * @return Location */
private Location getMultiverseSpawn(World world) { private Location getMultiverseSpawn(World world) {
if (multiverse != null && Settings.multiverse) { if (multiverse != null && Settings.multiverse) {
try { try {
@ -787,8 +787,8 @@ public class AuthMe extends JavaPlugin {
// Return the essentials spawnpoint // Return the essentials spawnpoint
/** /**
* Method getEssentialsSpawn. * Method getEssentialsSpawn.
* @return Location
*/ * @return Location */
private Location getEssentialsSpawn() { private Location getEssentialsSpawn() {
if (essentialsSpawn != null) { if (essentialsSpawn != null) {
return essentialsSpawn; return essentialsSpawn;
@ -800,8 +800,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getAuthMeSpawn. * Method getAuthMeSpawn.
* @param player Player * @param player Player
* @return Location
*/ * @return Location */
private Location getAuthMeSpawn(Player player) { private Location getAuthMeSpawn(Player player) {
if ((!database.isAuthAvailable(player.getName().toLowerCase()) || !player.hasPlayedBefore()) && (Spawn.getInstance().getFirstSpawn() != null)) { if ((!database.isAuthAvailable(player.getName().toLowerCase()) || !player.hasPlayedBefore()) && (Spawn.getInstance().getFirstSpawn() != null)) {
return Spawn.getInstance().getFirstSpawn(); return Spawn.getInstance().getFirstSpawn();
@ -823,8 +823,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getAntiBotModMode. * Method getAntiBotModMode.
* @return boolean
*/ * @return boolean */
public boolean getAntiBotModMode() { public boolean getAntiBotModMode() {
return this.antibotMod; return this.antibotMod;
} }
@ -855,8 +855,8 @@ public class AuthMe extends JavaPlugin {
* Method replaceAllInfos. * Method replaceAllInfos.
* @param message String * @param message String
* @param player Player * @param player Player
* @return String
*/ * @return String */
public String replaceAllInfos(String message, Player player) { public String replaceAllInfos(String message, Player player) {
int playersOnline = Utils.getOnlinePlayers().size(); int playersOnline = Utils.getOnlinePlayers().size();
message = message.replace("&", "\u00a7"); message = message.replace("&", "\u00a7");
@ -875,8 +875,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getIP. * Method getIP.
* @param player Player * @param player Player
* @return String
*/ * @return String */
public String getIP(Player player) { public String getIP(Player player) {
String name = player.getName().toLowerCase(); String name = player.getName().toLowerCase();
String ip = player.getAddress().getAddress().getHostAddress(); String ip = player.getAddress().getAddress().getHostAddress();
@ -894,8 +894,8 @@ public class AuthMe extends JavaPlugin {
* Method isLoggedIp. * Method isLoggedIp.
* @param name String * @param name String
* @param ip String * @param ip String
* @return boolean
*/ * @return boolean */
public boolean isLoggedIp(String name, String ip) { public boolean isLoggedIp(String name, String ip) {
int count = 0; int count = 0;
for (Player player : Utils.getOnlinePlayers()) { for (Player player : Utils.getOnlinePlayers()) {
@ -909,8 +909,8 @@ public class AuthMe extends JavaPlugin {
* Method hasJoinedIp. * Method hasJoinedIp.
* @param name String * @param name String
* @param ip String * @param ip String
* @return boolean
*/ * @return boolean */
public boolean hasJoinedIp(String name, String ip) { public boolean hasJoinedIp(String name, String ip) {
int count = 0; int count = 0;
for (Player player : Utils.getOnlinePlayers()) { for (Player player : Utils.getOnlinePlayers()) {
@ -922,8 +922,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getModuleManager. * Method getModuleManager.
* @return ModuleManager
*/ * @return ModuleManager */
public ModuleManager getModuleManager() { public ModuleManager getModuleManager() {
return moduleManager; return moduleManager;
} }
@ -933,8 +933,8 @@ public class AuthMe extends JavaPlugin {
* *
* @param player * @param player
* player * player
* @return String
*/ * @return String */
@Deprecated @Deprecated
public String getVeryGamesIP(Player player) { public String getVeryGamesIP(Player player) {
String realIP = player.getAddress().getAddress().getHostAddress(); String realIP = player.getAddress().getAddress().getHostAddress();
@ -956,8 +956,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getCountryCode. * Method getCountryCode.
* @param ip String * @param ip String
* @return String
*/ * @return String */
@Deprecated @Deprecated
public String getCountryCode(String ip) { public String getCountryCode(String ip) {
return Utils.getCountryCode(ip); return Utils.getCountryCode(ip);
@ -966,8 +966,8 @@ public class AuthMe extends JavaPlugin {
/** /**
* Method getCountryName. * Method getCountryName.
* @param ip String * @param ip String
* @return String
*/ * @return String */
@Deprecated @Deprecated
public String getCountryName(String ip) { public String getCountryName(String ip) {
return Utils.getCountryName(ip); return Utils.getCountryName(ip);
@ -995,7 +995,8 @@ public class AuthMe extends JavaPlugin {
* The command arguments (Bukkit). * 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 @Override
public boolean onCommand(CommandSender sender, Command cmd, public boolean onCommand(CommandSender sender, Command cmd,

View File

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

View File

@ -35,8 +35,8 @@ public class DataManager {
/** /**
* Method getOfflinePlayer. * Method getOfflinePlayer.
* @param name String * @param name String
* @return OfflinePlayer
*/ * @return OfflinePlayer */
public synchronized OfflinePlayer getOfflinePlayer(final String name) { public synchronized OfflinePlayer getOfflinePlayer(final String name) {
ExecutorService executor = Executors.newSingleThreadExecutor(); ExecutorService executor = Executors.newSingleThreadExecutor();
Future<OfflinePlayer> result = executor.submit(new Callable<OfflinePlayer>() { Future<OfflinePlayer> result = executor.submit(new Callable<OfflinePlayer>() {
@ -197,8 +197,8 @@ public class DataManager {
* Method isOnline. * Method isOnline.
* @param player Player * @param player Player
* @param name String * @param name String
* @return boolean
*/ * @return boolean */
public boolean isOnline(Player player, final String name) { public boolean isOnline(Player player, final String name) {
if (player.isOnline()) if (player.isOnline())
return true; return true;
@ -226,8 +226,8 @@ public class DataManager {
/** /**
* Method getOnlinePlayerLower. * Method getOnlinePlayerLower.
* @param name String * @param name String
* @return Player
*/ * @return Player */
public Player getOnlinePlayerLower(String name) { public Player getOnlinePlayerLower(String name) {
name = name.toLowerCase(); name = name.toLowerCase();
for (Player player : Utils.getOnlinePlayers()) { for (Player player : Utils.getOnlinePlayers()) {

View File

@ -21,8 +21,8 @@ public class ImageGenerator {
/** /**
* Method generateImage. * Method generateImage.
* @return BufferedImage
*/ * @return BufferedImage */
public BufferedImage generateImage() { public BufferedImage generateImage() {
BufferedImage image = new BufferedImage(200, 60, BufferedImage.TYPE_BYTE_INDEXED); BufferedImage image = new BufferedImage(200, 60, BufferedImage.TYPE_BYTE_INDEXED);
Graphics2D graphics = image.createGraphics(); Graphics2D graphics = image.createGraphics();

View File

@ -27,9 +27,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
/** /**
* Method filter. * Method filter.
* @param record LogEvent * @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 @Override
public Result filter(LogEvent record) { public Result filter(LogEvent record) {
if (record == null) { if (record == null) {
@ -45,9 +45,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
* @param arg2 Marker * @param arg2 Marker
* @param message String * @param message String
* @param arg4 Object[] * @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 @Override
public Result filter(Logger arg0, Level arg1, Marker arg2, String message, public Result filter(Logger arg0, Level arg1, Marker arg2, String message,
Object... arg4) { Object... arg4) {
@ -61,9 +61,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
* @param arg2 Marker * @param arg2 Marker
* @param message Object * @param message Object
* @param arg4 Throwable * @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 @Override
public Result filter(Logger arg0, Level arg1, Marker arg2, Object message, public Result filter(Logger arg0, Level arg1, Marker arg2, Object message,
Throwable arg4) { Throwable arg4) {
@ -80,9 +80,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
* @param arg2 Marker * @param arg2 Marker
* @param message Message * @param message Message
* @param arg4 Throwable * @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 @Override
public Result filter(Logger arg0, Level arg1, Marker arg2, Message message, public Result filter(Logger arg0, Level arg1, Marker arg2, Message message,
Throwable arg4) { Throwable arg4) {
@ -91,9 +91,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
/** /**
* Method getOnMatch. * Method getOnMatch.
* @return Result
* @see org.apache.logging.log4j.core.Filter#getOnMatch()
*/ * @return Result * @see org.apache.logging.log4j.core.Filter#getOnMatch() */
@Override @Override
public Result getOnMatch() { public Result getOnMatch() {
return Result.NEUTRAL; return Result.NEUTRAL;
@ -101,9 +101,9 @@ public class Log4JFilter implements org.apache.logging.log4j.core.Filter {
/** /**
* Method getOnMismatch. * Method getOnMismatch.
* @return Result
* @see org.apache.logging.log4j.core.Filter#getOnMismatch()
*/ * @return Result * @see org.apache.logging.log4j.core.Filter#getOnMismatch() */
@Override @Override
public Result getOnMismatch() { public Result getOnMismatch() {
return Result.NEUTRAL; return Result.NEUTRAL;

View File

@ -37,8 +37,8 @@ public class PerformBackup {
/** /**
* Method doBackup. * Method doBackup.
* @return boolean
*/ * @return boolean */
public boolean doBackup() { public boolean doBackup() {
switch (Settings.getDataSource) { switch (Settings.getDataSource) {
@ -55,8 +55,8 @@ public class PerformBackup {
/** /**
* Method MySqlBackup. * Method MySqlBackup.
* @return boolean
*/ * @return boolean */
private boolean MySqlBackup() { private boolean MySqlBackup() {
File dirBackup = new File(AuthMe.getInstance().getDataFolder() + "/backups"); File dirBackup = new File(AuthMe.getInstance().getDataFolder() + "/backups");
@ -99,8 +99,8 @@ public class PerformBackup {
/** /**
* Method FileBackup. * Method FileBackup.
* @param backend String * @param backend String
* @return boolean
*/ * @return boolean */
private boolean FileBackup(String backend) { private boolean FileBackup(String backend) {
File dirBackup = new File(AuthMe.getInstance().getDataFolder() + "/backups"); File dirBackup = new File(AuthMe.getInstance().getDataFolder() + "/backups");
@ -124,8 +124,8 @@ public class PerformBackup {
/** /**
* Method checkWindows. * Method checkWindows.
* @param windowsPath String * @param windowsPath String
* @return boolean
*/ * @return boolean */
private boolean checkWindows(String windowsPath) { private boolean checkWindows(String windowsPath) {
String isWin = System.getProperty("os.name").toLowerCase(); String isWin = System.getProperty("os.name").toLowerCase();
if (isWin.indexOf("win") >= 0) { if (isWin.indexOf("win") >= 0) {
@ -145,8 +145,8 @@ public class PerformBackup {
* Method copy. * Method copy.
* @param src File * @param src File
* @param dst File * @param dst File
* @throws IOException
*/ * @throws IOException */
void copy(File src, File dst) throws IOException { void copy(File src, File dst) throws IOException {
InputStream in = new FileInputStream(src); InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dst); OutputStream out = new FileOutputStream(dst);
@ -171,8 +171,8 @@ public class PerformBackup {
/** /**
* Method getInstance. * Method getInstance.
* @return AuthMe
*/ * @return AuthMe */
public AuthMe getInstance() { public AuthMe getInstance() {
return instance; return instance;
} }

View File

@ -50,8 +50,8 @@ public class API {
/** /**
* Method getPlugin. * Method getPlugin.
* @return AuthMe
*/ * @return AuthMe */
@Deprecated @Deprecated
public AuthMe getPlugin() { public AuthMe getPlugin() {
return instance; return instance;
@ -100,8 +100,8 @@ public class API {
/** /**
* Method getLastLocation. * Method getLastLocation.
* @param player Player * @param player Player
* @return Location
*/ * @return Location */
@Deprecated @Deprecated
public static Location getLastLocation(Player player) { public static Location getLastLocation(Player player) {
try { try {

View File

@ -58,8 +58,8 @@ public class NewAPI {
/** /**
* Method getPlugin. * Method getPlugin.
* @return AuthMe
*/ * @return AuthMe */
public AuthMe getPlugin() { public AuthMe getPlugin() {
return plugin; return plugin;
} }
@ -94,8 +94,8 @@ public class NewAPI {
/** /**
* Method getLastLocation. * Method getLastLocation.
* @param player Player * @param player Player
* @return Location
*/ * @return Location */
public Location getLastLocation(Player player) { public Location getLastLocation(Player player) {
try { try {
PlayerAuth auth = PlayerCache.getInstance().getAuth(player.getName().toLowerCase()); PlayerAuth auth = PlayerCache.getInstance().getAuth(player.getName().toLowerCase());

View File

@ -189,16 +189,16 @@ public class PlayerAuth {
/** /**
* Method getNickname. * Method getNickname.
* @return String
*/ * @return String */
public String getNickname() { public String getNickname() {
return nickname; return nickname;
} }
/** /**
* Method getRealName. * Method getRealName.
* @return String
*/ * @return String */
public String getRealName() { public String getRealName() {
return realName; return realName;
} }
@ -213,8 +213,8 @@ public class PlayerAuth {
/** /**
* Method getGroupId. * Method getGroupId.
* @return int
*/ * @return int */
public int getGroupId() { public int getGroupId() {
return groupId; return groupId;
} }
@ -229,8 +229,8 @@ public class PlayerAuth {
/** /**
* Method getQuitLocX. * Method getQuitLocX.
* @return double
*/ * @return double */
public double getQuitLocX() { public double getQuitLocX() {
return x; return x;
} }
@ -245,8 +245,8 @@ public class PlayerAuth {
/** /**
* Method getQuitLocY. * Method getQuitLocY.
* @return double
*/ * @return double */
public double getQuitLocY() { public double getQuitLocY() {
return y; return y;
} }
@ -261,8 +261,8 @@ public class PlayerAuth {
/** /**
* Method getQuitLocZ. * Method getQuitLocZ.
* @return double
*/ * @return double */
public double getQuitLocZ() { public double getQuitLocZ() {
return z; return z;
} }
@ -277,8 +277,8 @@ public class PlayerAuth {
/** /**
* Method getWorld. * Method getWorld.
* @return String
*/ * @return String */
public String getWorld() { public String getWorld() {
return world; return world;
} }
@ -293,8 +293,8 @@ public class PlayerAuth {
/** /**
* Method getIp. * Method getIp.
* @return String
*/ * @return String */
public String getIp() { public String getIp() {
return ip; return ip;
} }
@ -309,8 +309,8 @@ public class PlayerAuth {
/** /**
* Method getLastLogin. * Method getLastLogin.
* @return long
*/ * @return long */
public long getLastLogin() { public long getLastLogin() {
return lastLogin; return lastLogin;
} }
@ -325,8 +325,8 @@ public class PlayerAuth {
/** /**
* Method getEmail. * Method getEmail.
* @return String
*/ * @return String */
public String getEmail() { public String getEmail() {
return email; return email;
} }
@ -341,8 +341,8 @@ public class PlayerAuth {
/** /**
* Method getSalt. * Method getSalt.
* @return String
*/ * @return String */
public String getSalt() { public String getSalt() {
return this.salt; return this.salt;
} }
@ -357,8 +357,8 @@ public class PlayerAuth {
/** /**
* Method getHash. * Method getHash.
* @return String
*/ * @return String */
public String getHash() { public String getHash() {
if (Settings.getPasswordHash == HashAlgorithm.MD5VB) { if (Settings.getPasswordHash == HashAlgorithm.MD5VB) {
if (salt != null && !salt.isEmpty() && Settings.getPasswordHash == HashAlgorithm.MD5VB) { if (salt != null && !salt.isEmpty() && Settings.getPasswordHash == HashAlgorithm.MD5VB) {
@ -371,8 +371,8 @@ public class PlayerAuth {
/** /**
* Method equals. * Method equals.
* @param obj Object * @param obj Object
* @return boolean
*/ * @return boolean */
@Override @Override
public boolean equals(Object obj) { public boolean equals(Object obj) {
if (!(obj instanceof PlayerAuth)) { if (!(obj instanceof PlayerAuth)) {
@ -384,8 +384,8 @@ public class PlayerAuth {
/** /**
* Method hashCode. * Method hashCode.
* @return int
*/ * @return int */
@Override @Override
public int hashCode() { public int hashCode() {
int hashCode = 7; int hashCode = 7;
@ -396,8 +396,8 @@ public class PlayerAuth {
/** /**
* Method toString. * Method toString.
* @return String
*/ * @return String */
@Override @Override
public String toString() { public String toString() {
return ("Player : " + nickname + " | " + realName return ("Player : " + nickname + " | " + realName

View File

@ -41,8 +41,8 @@ public class PlayerCache {
/** /**
* Method isAuthenticated. * Method isAuthenticated.
* @param user String * @param user String
* @return boolean
*/ * @return boolean */
public boolean isAuthenticated(String user) { public boolean isAuthenticated(String user) {
return cache.containsKey(user.toLowerCase()); return cache.containsKey(user.toLowerCase());
} }
@ -50,16 +50,16 @@ public class PlayerCache {
/** /**
* Method getAuth. * Method getAuth.
* @param user String * @param user String
* @return PlayerAuth
*/ * @return PlayerAuth */
public PlayerAuth getAuth(String user) { public PlayerAuth getAuth(String user) {
return cache.get(user.toLowerCase()); return cache.get(user.toLowerCase());
} }
/** /**
* Method getInstance. * Method getInstance.
* @return PlayerCache
*/ * @return PlayerCache */
public static PlayerCache getInstance() { public static PlayerCache getInstance() {
if (singleton == null) { if (singleton == null) {
singleton = new PlayerCache(); singleton = new PlayerCache();
@ -69,16 +69,16 @@ public class PlayerCache {
/** /**
* Method getLogged. * Method getLogged.
* @return int
*/ * @return int */
public int getLogged() { public int getLogged() {
return cache.size(); return cache.size();
} }
/** /**
* Method getCache. * Method getCache.
* @return ConcurrentHashMap<String,PlayerAuth>
*/ * @return ConcurrentHashMap<String,PlayerAuth> */
public ConcurrentHashMap<String, PlayerAuth> getCache() { public ConcurrentHashMap<String, PlayerAuth> getCache() {
return this.cache; return this.cache;
} }

View File

@ -22,24 +22,24 @@ public class DataFileCache {
/** /**
* Method getGroup. * Method getGroup.
* @return String
*/ * @return String */
public String getGroup() { public String getGroup() {
return group; return group;
} }
/** /**
* Method getOperator. * Method getOperator.
* @return boolean
*/ * @return boolean */
public boolean getOperator() { public boolean getOperator() {
return operator; return operator;
} }
/** /**
* Method isFlying. * Method isFlying.
* @return boolean
*/ * @return boolean */
public boolean isFlying() { public boolean isFlying() {
return flying; return flying;
} }

View File

@ -78,8 +78,8 @@ public class JsonCache {
/** /**
* Method readCache. * Method readCache.
* @param player Player * @param player Player
* @return DataFileCache
*/ * @return DataFileCache */
public DataFileCache readCache(Player player) { public DataFileCache readCache(Player player) {
String path; String path;
try { try {
@ -110,8 +110,8 @@ public class JsonCache {
* @param dataFileCache DataFileCache * @param dataFileCache DataFileCache
* @param type Type * @param type Type
* @param jsonSerializationContext JsonSerializationContext * @param jsonSerializationContext JsonSerializationContext
* @return JsonElement
*/ * @return JsonElement */
@Override @Override
public JsonElement serialize(DataFileCache dataFileCache, Type type, JsonSerializationContext jsonSerializationContext) { public JsonElement serialize(DataFileCache dataFileCache, Type type, JsonSerializationContext jsonSerializationContext) {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
@ -131,10 +131,10 @@ public class JsonCache {
* @param jsonElement JsonElement * @param jsonElement JsonElement
* @param type Type * @param type Type
* @param jsonDeserializationContext JsonDeserializationContext * @param jsonDeserializationContext JsonDeserializationContext
* @return DataFileCache
* @throws JsonParseException
* @see com.google.gson.JsonDeserializer#deserialize(JsonElement, Type, JsonDeserializationContext)
*/ * @return DataFileCache * @throws JsonParseException * @see com.google.gson.JsonDeserializer#deserialize(JsonElement, Type, JsonDeserializationContext) */
@Override @Override
public DataFileCache deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException { public DataFileCache deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext jsonDeserializationContext) throws JsonParseException {
JsonObject jsonObject = jsonElement.getAsJsonObject(); JsonObject jsonObject = jsonElement.getAsJsonObject();
@ -183,8 +183,8 @@ public class JsonCache {
/** /**
* Method doesCacheExist. * Method doesCacheExist.
* @param player Player * @param player Player
* @return boolean
*/ * @return boolean */
public boolean doesCacheExist(Player player) { public boolean doesCacheExist(Player player) {
String path; String path;
try { try {

View File

@ -105,8 +105,8 @@ public class LimboCache {
/** /**
* Method getLimboPlayer. * Method getLimboPlayer.
* @param name String * @param name String
* @return LimboPlayer
*/ * @return LimboPlayer */
public LimboPlayer getLimboPlayer(String name) { public LimboPlayer getLimboPlayer(String name) {
return cache.get(name); return cache.get(name);
} }
@ -114,16 +114,16 @@ public class LimboCache {
/** /**
* Method hasLimboPlayer. * Method hasLimboPlayer.
* @param name String * @param name String
* @return boolean
*/ * @return boolean */
public boolean hasLimboPlayer(String name) { public boolean hasLimboPlayer(String name) {
return cache.containsKey(name); return cache.containsKey(name);
} }
/** /**
* Method getInstance. * Method getInstance.
* @return LimboCache
*/ * @return LimboCache */
public static LimboCache getInstance() { public static LimboCache getInstance() {
if (singleton == null) { if (singleton == null) {
singleton = new LimboCache(AuthMe.getInstance()); singleton = new LimboCache(AuthMe.getInstance());

View File

@ -48,40 +48,40 @@ public class LimboPlayer {
/** /**
* Method getName. * Method getName.
* @return String
*/ * @return String */
public String getName() { public String getName() {
return name; return name;
} }
/** /**
* Method getLoc. * Method getLoc.
* @return Location
*/ * @return Location */
public Location getLoc() { public Location getLoc() {
return loc; return loc;
} }
/** /**
* Method getGameMode. * Method getGameMode.
* @return GameMode
*/ * @return GameMode */
public GameMode getGameMode() { public GameMode getGameMode() {
return gameMode; return gameMode;
} }
/** /**
* Method getOperator. * Method getOperator.
* @return boolean
*/ * @return boolean */
public boolean getOperator() { public boolean getOperator() {
return operator; return operator;
} }
/** /**
* Method getGroup. * Method getGroup.
* @return String
*/ * @return String */
public String getGroup() { public String getGroup() {
return group; return group;
} }
@ -98,8 +98,8 @@ public class LimboPlayer {
/** /**
* Method getTimeoutTaskId. * Method getTimeoutTaskId.
* @return BukkitTask
*/ * @return BukkitTask */
public BukkitTask getTimeoutTaskId() { public BukkitTask getTimeoutTaskId() {
return timeoutTaskId; return timeoutTaskId;
} }
@ -116,16 +116,16 @@ public class LimboPlayer {
/** /**
* Method getMessageTaskId. * Method getMessageTaskId.
* @return BukkitTask
*/ * @return BukkitTask */
public BukkitTask getMessageTaskId() { public BukkitTask getMessageTaskId() {
return messageTaskId; return messageTaskId;
} }
/** /**
* Method isFlying. * Method isFlying.
* @return boolean
*/ * @return boolean */
public boolean isFlying() { public boolean isFlying() {
return flying; return flying;
} }

View File

@ -307,8 +307,8 @@ public class CommandDescription {
/** /**
* Get the absolute command label, without a slash. * Get the absolute command label, without a slash.
* @return String
*/ * @return String */
public String getAbsoluteLabel() { public String getAbsoluteLabel() {
return getAbsoluteLabel(false); return getAbsoluteLabel(false);
} }

View File

@ -111,8 +111,8 @@ public class ConverterCommand extends ExecutableCommand {
/** /**
* Method getName. * Method getName.
* @return String
*/ * @return String */
String getName() { String getName() {
return this.name; return this.name;
} }
@ -120,8 +120,8 @@ public class ConverterCommand extends ExecutableCommand {
/** /**
* Method fromName. * Method fromName.
* @param name String * @param name String
* @return ConvertType
*/ * @return ConvertType */
public static ConvertType fromName(String name) { public static ConvertType fromName(String name) {
for (ConvertType type : ConvertType.values()) { for (ConvertType type : ConvertType.values()) {
if (type.getName().equalsIgnoreCase(name)) if (type.getName().equalsIgnoreCase(name))

View File

@ -36,8 +36,8 @@ public class CrazyLoginConverter implements Converter {
/** /**
* Method getInstance. * Method getInstance.
* @return CrazyLoginConverter
*/ * @return CrazyLoginConverter */
public CrazyLoginConverter getInstance() { public CrazyLoginConverter getInstance() {
return this; return this;
} }

View File

@ -121,9 +121,9 @@ public class FlatToSqlite implements Converter {
/** /**
* Method connect. * Method connect.
* @throws ClassNotFoundException
* @throws SQLException
*/ * @throws ClassNotFoundException * @throws SQLException */
private synchronized void connect() throws ClassNotFoundException, SQLException { private synchronized void connect() throws ClassNotFoundException, SQLException {
Class.forName("org.sqlite.JDBC"); Class.forName("org.sqlite.JDBC");
con = DriverManager.getConnection("jdbc:sqlite:plugins/AuthMe/" + database + ".db"); con = DriverManager.getConnection("jdbc:sqlite:plugins/AuthMe/" + database + ".db");
@ -131,8 +131,8 @@ public class FlatToSqlite implements Converter {
/** /**
* Method setup. * Method setup.
* @throws SQLException
*/ * @throws SQLException */
private synchronized void setup() throws SQLException { private synchronized void setup() throws SQLException {
Statement st = null; Statement st = null;
ResultSet rs = null; ResultSet rs = null;
@ -179,8 +179,8 @@ public class FlatToSqlite implements Converter {
/** /**
* Method saveAuth. * Method saveAuth.
* @param s String * @param s String
* @return boolean
*/ * @return boolean */
private synchronized boolean saveAuth(String s) { private synchronized boolean saveAuth(String s) {
PreparedStatement pst = null; PreparedStatement pst = null;
try { try {

View File

@ -41,8 +41,8 @@ public class RakamakConverter implements Converter {
/** /**
* Method getInstance. * Method getInstance.
* @return RakamakConverter
*/ * @return RakamakConverter */
public RakamakConverter getInstance() { public RakamakConverter getInstance() {
return this; return this;
} }

View File

@ -20,16 +20,16 @@ public class RoyalAuthYamlReader extends CustomConfiguration {
/** /**
* Method getLastLogin. * Method getLastLogin.
* @return long
*/ * @return long */
public long getLastLogin() { public long getLastLogin() {
return getLong("timestamps.quit"); return getLong("timestamps.quit");
} }
/** /**
* Method getHash. * Method getHash.
* @return String
*/ * @return String */
public String getHash() { public String getHash() {
return getString("login.password"); return getString("login.password");
} }

View File

@ -35,8 +35,8 @@ public class vAuthFileReader {
/** /**
* Method convert. * Method convert.
* @throws IOException
*/ * @throws IOException */
public void convert() throws IOException { public void convert() throws IOException {
final File file = new File(plugin.getDataFolder().getParent() + "" + File.separator + "vAuth" + File.separator + "passwords.yml"); final File file = new File(plugin.getDataFolder().getParent() + "" + File.separator + "vAuth" + File.separator + "passwords.yml");
Scanner scanner; Scanner scanner;
@ -71,8 +71,8 @@ public class vAuthFileReader {
/** /**
* Method isUUIDinstance. * Method isUUIDinstance.
* @param s String * @param s String
* @return boolean
*/ * @return boolean */
private boolean isUUIDinstance(String s) { private boolean isUUIDinstance(String s) {
if (String.valueOf(s.charAt(8)).equalsIgnoreCase("-")) if (String.valueOf(s.charAt(8)).equalsIgnoreCase("-"))
return true; return true;
@ -82,8 +82,8 @@ public class vAuthFileReader {
/** /**
* Method getName. * Method getName.
* @param uuid UUID * @param uuid UUID
* @return String
*/ * @return String */
private String getName(UUID uuid) { private String getName(UUID uuid) {
try { try {
for (OfflinePlayer op : Bukkit.getOfflinePlayers()) { for (OfflinePlayer op : Bukkit.getOfflinePlayers()) {

View File

@ -38,8 +38,8 @@ public class xAuthToFlat {
/** /**
* Method convert. * Method convert.
* @return boolean
*/ * @return boolean */
public boolean convert() { public boolean convert() {
if (instance.getServer().getPluginManager().getPlugin("xAuth") == null) { if (instance.getServer().getPluginManager().getPlugin("xAuth") == null) {
sender.sendMessage("[AuthMe] xAuth plugin not found"); sender.sendMessage("[AuthMe] xAuth plugin not found");
@ -73,8 +73,8 @@ public class xAuthToFlat {
/** /**
* Method getIdPlayer. * Method getIdPlayer.
* @param id int * @param id int
* @return String
*/ * @return String */
public String getIdPlayer(int id) { public String getIdPlayer(int id) {
String realPass = ""; String realPass = "";
Connection conn = xAuth.getPlugin().getDatabaseController().getConnection(); Connection conn = xAuth.getPlugin().getDatabaseController().getConnection();
@ -99,8 +99,8 @@ public class xAuthToFlat {
/** /**
* Method getXAuthPlayers. * Method getXAuthPlayers.
* @return List<Integer>
*/ * @return List<Integer> */
public List<Integer> getXAuthPlayers() { public List<Integer> getXAuthPlayers() {
List<Integer> xP = new ArrayList<>(); List<Integer> xP = new ArrayList<>();
Connection conn = xAuth.getPlugin().getDatabaseController().getConnection(); Connection conn = xAuth.getPlugin().getDatabaseController().getConnection();
@ -125,8 +125,8 @@ public class xAuthToFlat {
/** /**
* Method getPassword. * Method getPassword.
* @param accountId int * @param accountId int
* @return String
*/ * @return String */
public String getPassword(int accountId) { public String getPassword(int accountId) {
String realPass = ""; String realPass = "";
Connection conn = xAuth.getPlugin().getDatabaseController().getConnection(); Connection conn = xAuth.getPlugin().getDatabaseController().getConnection();

View File

@ -52,9 +52,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method isAuthAvailable. * Method isAuthAvailable.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */
@Override @Override
public synchronized boolean isAuthAvailable(String user) { public synchronized boolean isAuthAvailable(String user) {
return cache.containsKey(user.toLowerCase()); return cache.containsKey(user.toLowerCase());
@ -63,9 +63,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getAuth. * Method getAuth.
* @param user String * @param user String
* @return PlayerAuth
* @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */
@Override @Override
public synchronized PlayerAuth getAuth(String user) { public synchronized PlayerAuth getAuth(String user) {
user = user.toLowerCase(); user = user.toLowerCase();
@ -78,9 +78,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method saveAuth. * Method saveAuth.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */
@Override @Override
public synchronized boolean saveAuth(final PlayerAuth auth) { public synchronized boolean saveAuth(final PlayerAuth auth) {
cache.put(auth.getNickname(), auth); cache.put(auth.getNickname(), auth);
@ -98,9 +98,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method updatePassword. * Method updatePassword.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */
@Override @Override
public synchronized boolean updatePassword(final PlayerAuth auth) { public synchronized boolean updatePassword(final PlayerAuth auth) {
if (!cache.containsKey(auth.getNickname())) { if (!cache.containsKey(auth.getNickname())) {
@ -124,9 +124,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method updateSession. * Method updateSession.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */
@Override @Override
public boolean updateSession(final PlayerAuth auth) { public boolean updateSession(final PlayerAuth auth) {
if (!cache.containsKey(auth.getNickname())) { if (!cache.containsKey(auth.getNickname())) {
@ -159,9 +159,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method updateQuitLoc. * Method updateQuitLoc.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */
@Override @Override
public boolean updateQuitLoc(final PlayerAuth auth) { public boolean updateQuitLoc(final PlayerAuth auth) {
if (!cache.containsKey(auth.getNickname())) { if (!cache.containsKey(auth.getNickname())) {
@ -197,9 +197,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getIps. * Method getIps.
* @param ip String * @param ip String
* @return int
* @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */
@Override @Override
public int getIps(String ip) { public int getIps(String ip) {
int count = 0; int count = 0;
@ -214,9 +214,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method purgeDatabase. * Method purgeDatabase.
* @param until long * @param until long
* @return int
* @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */
@Override @Override
public int purgeDatabase(long until) { public int purgeDatabase(long until) {
int cleared = source.purgeDatabase(until); int cleared = source.purgeDatabase(until);
@ -233,9 +233,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* @param until long * @param until long
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */
@Override @Override
public List<String> autoPurgeDatabase(long until) { public List<String> autoPurgeDatabase(long until) {
List<String> cleared = source.autoPurgeDatabase(until); List<String> cleared = source.autoPurgeDatabase(until);
@ -252,9 +252,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method removeAuth. * Method removeAuth.
* @param username String * @param username String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */
@Override @Override
public synchronized boolean removeAuth(String username) { public synchronized boolean removeAuth(String username) {
final String user = username.toLowerCase(); final String user = username.toLowerCase();
@ -306,9 +306,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method updateEmail. * Method updateEmail.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */
@Override @Override
public synchronized boolean updateEmail(final PlayerAuth auth) { public synchronized boolean updateEmail(final PlayerAuth auth) {
try { try {
@ -325,9 +325,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method updateSalt. * Method updateSalt.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */
@Override @Override
public synchronized boolean updateSalt(final PlayerAuth auth) { public synchronized boolean updateSalt(final PlayerAuth auth) {
if (!cache.containsKey(auth.getNickname())) { if (!cache.containsKey(auth.getNickname())) {
@ -352,9 +352,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getAllAuthsByName. * Method getAllAuthsByName.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */
@Override @Override
public synchronized List<String> getAllAuthsByName(PlayerAuth auth) { public synchronized List<String> getAllAuthsByName(PlayerAuth auth) {
List<String> result = new ArrayList<>(); List<String> result = new ArrayList<>();
@ -369,10 +369,10 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* @param ip String * @param ip String
* @return List<String>
* @throws Exception
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ * @return List<String> * @throws Exception * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */
@Override @Override
public synchronized List<String> getAllAuthsByIp(final String ip) throws Exception { public synchronized List<String> getAllAuthsByIp(final String ip) throws Exception {
return exec.submit(new Callable<List<String>>() { return exec.submit(new Callable<List<String>>() {
@ -385,10 +385,10 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* @param email String * @param email String
* @return List<String>
* @throws Exception
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ * @return List<String> * @throws Exception * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */
@Override @Override
public synchronized List<String> getAllAuthsByEmail(final String email) throws Exception { public synchronized List<String> getAllAuthsByEmail(final String email) throws Exception {
return exec.submit(new Callable<List<String>>() { return exec.submit(new Callable<List<String>>() {
@ -401,8 +401,8 @@ public class CacheDataSource implements DataSource {
/** /**
* Method purgeBanned. * Method purgeBanned.
* @param banned List<String> * @param banned List<String>
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) */
@Override @Override
public synchronized void purgeBanned(final List<String> banned) { public synchronized void purgeBanned(final List<String> banned) {
exec.execute(new Runnable() { exec.execute(new Runnable() {
@ -420,9 +420,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getType. * Method getType.
* @return DataSourceType
* @see fr.xephi.authme.datasource.DataSource#getType()
*/ * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */
@Override @Override
public DataSourceType getType() { public DataSourceType getType() {
return source.getType(); return source.getType();
@ -431,9 +431,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method isLogged. * Method isLogged.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */
@Override @Override
public boolean isLogged(String user) { public boolean isLogged(String user) {
user = user.toLowerCase(); user = user.toLowerCase();
@ -443,8 +443,8 @@ public class CacheDataSource implements DataSource {
/** /**
* Method setLogged. * Method setLogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */
@Override @Override
public void setLogged(final String user) { public void setLogged(final String user) {
exec.execute(new Runnable() { exec.execute(new Runnable() {
@ -458,8 +458,8 @@ public class CacheDataSource implements DataSource {
/** /**
* Method setUnlogged. * Method setUnlogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */
@Override @Override
public void setUnlogged(final String user) { public void setUnlogged(final String user) {
exec.execute(new Runnable() { exec.execute(new Runnable() {
@ -486,9 +486,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getAccountsRegistered. * Method getAccountsRegistered.
* @return int
* @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered()
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */
@Override @Override
public int getAccountsRegistered() { public int getAccountsRegistered() {
return cache.size(); return cache.size();
@ -498,8 +498,8 @@ public class CacheDataSource implements DataSource {
* Method updateName. * Method updateName.
* @param oldone String * @param oldone String
* @param newone String * @param newone String
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */
@Override @Override
public void updateName(final String oldone, final String newone) { public void updateName(final String oldone, final String newone) {
if (cache.containsKey(oldone)) { if (cache.containsKey(oldone)) {
@ -516,9 +516,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getAllAuths. * Method getAllAuths.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getAllAuths()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */
@Override @Override
public List<PlayerAuth> getAllAuths() { public List<PlayerAuth> getAllAuths() {
return new ArrayList<>(cache.values()); return new ArrayList<>(cache.values());
@ -526,9 +526,9 @@ public class CacheDataSource implements DataSource {
/** /**
* Method getLoggedPlayers. * Method getLoggedPlayers.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */
@Override @Override
public List<PlayerAuth> getLoggedPlayers() { public List<PlayerAuth> getLoggedPlayers() {
return new ArrayList<>(PlayerCache.getInstance().getCache().values()); return new ArrayList<>(PlayerCache.getInstance().getCache().values());

View File

@ -19,108 +19,108 @@ public interface DataSource {
/** /**
* Method isAuthAvailable. * Method isAuthAvailable.
* @param user String * @param user String
* @return boolean
*/ * @return boolean */
boolean isAuthAvailable(String user); boolean isAuthAvailable(String user);
/** /**
* Method getAuth. * Method getAuth.
* @param user String * @param user String
* @return PlayerAuth
*/ * @return PlayerAuth */
PlayerAuth getAuth(String user); PlayerAuth getAuth(String user);
/** /**
* Method saveAuth. * Method saveAuth.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
*/ * @return boolean */
boolean saveAuth(PlayerAuth auth); boolean saveAuth(PlayerAuth auth);
/** /**
* Method updateSession. * Method updateSession.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
*/ * @return boolean */
boolean updateSession(PlayerAuth auth); boolean updateSession(PlayerAuth auth);
/** /**
* Method updatePassword. * Method updatePassword.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
*/ * @return boolean */
boolean updatePassword(PlayerAuth auth); boolean updatePassword(PlayerAuth auth);
/** /**
* Method purgeDatabase. * Method purgeDatabase.
* @param until long * @param until long
* @return int
*/ * @return int */
int purgeDatabase(long until); int purgeDatabase(long until);
/** /**
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* @param until long * @param until long
* @return List<String>
*/ * @return List<String> */
List<String> autoPurgeDatabase(long until); List<String> autoPurgeDatabase(long until);
/** /**
* Method removeAuth. * Method removeAuth.
* @param user String * @param user String
* @return boolean
*/ * @return boolean */
boolean removeAuth(String user); boolean removeAuth(String user);
/** /**
* Method updateQuitLoc. * Method updateQuitLoc.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
*/ * @return boolean */
boolean updateQuitLoc(PlayerAuth auth); boolean updateQuitLoc(PlayerAuth auth);
/** /**
* Method getIps. * Method getIps.
* @param ip String * @param ip String
* @return int
*/ * @return int */
int getIps(String ip); int getIps(String ip);
/** /**
* Method getAllAuthsByName. * Method getAllAuthsByName.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return List<String>
*/ * @return List<String> */
List<String> getAllAuthsByName(PlayerAuth auth); List<String> getAllAuthsByName(PlayerAuth auth);
/** /**
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* @param ip String * @param ip String
* @return List<String>
* @throws Exception
*/ * @return List<String> * @throws Exception */
List<String> getAllAuthsByIp(String ip) throws Exception; List<String> getAllAuthsByIp(String ip) throws Exception;
/** /**
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* @param email String * @param email String
* @return List<String>
* @throws Exception
*/ * @return List<String> * @throws Exception */
List<String> getAllAuthsByEmail(String email) throws Exception; List<String> getAllAuthsByEmail(String email) throws Exception;
/** /**
* Method updateEmail. * Method updateEmail.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
*/ * @return boolean */
boolean updateEmail(PlayerAuth auth); boolean updateEmail(PlayerAuth auth);
/** /**
* Method updateSalt. * Method updateSalt.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
*/ * @return boolean */
boolean updateSalt(PlayerAuth auth); boolean updateSalt(PlayerAuth auth);
void close(); void close();
@ -135,15 +135,15 @@ public interface DataSource {
/** /**
* Method getType. * Method getType.
* @return DataSourceType
*/ * @return DataSourceType */
DataSourceType getType(); DataSourceType getType();
/** /**
* Method isLogged. * Method isLogged.
* @param user String * @param user String
* @return boolean
*/ * @return boolean */
boolean isLogged(String user); boolean isLogged(String user);
/** /**
@ -162,8 +162,8 @@ public interface DataSource {
/** /**
* Method getAccountsRegistered. * Method getAccountsRegistered.
* @return int
*/ * @return int */
int getAccountsRegistered(); int getAccountsRegistered();
/** /**
@ -175,14 +175,14 @@ public interface DataSource {
/** /**
* Method getAllAuths. * Method getAllAuths.
* @return List<PlayerAuth>
*/ * @return List<PlayerAuth> */
List<PlayerAuth> getAllAuths(); List<PlayerAuth> getAllAuths();
/** /**
* Method getLoggedPlayers. * Method getLoggedPlayers.
* @return List<PlayerAuth>
*/ * @return List<PlayerAuth> */
List<PlayerAuth> getLoggedPlayers(); List<PlayerAuth> getLoggedPlayers();
} }

View File

@ -27,9 +27,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method isAuthAvailable. * Method isAuthAvailable.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */
@Override @Override
public synchronized boolean isAuthAvailable(final String user) { public synchronized boolean isAuthAvailable(final String user) {
try { try {
@ -46,9 +46,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getAuth. * Method getAuth.
* @param user String * @param user String
* @return PlayerAuth
* @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */
@Override @Override
public synchronized PlayerAuth getAuth(final String user) { public synchronized PlayerAuth getAuth(final String user) {
try { try {
@ -65,9 +65,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method saveAuth. * Method saveAuth.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */
@Override @Override
public synchronized boolean saveAuth(final PlayerAuth auth) { public synchronized boolean saveAuth(final PlayerAuth auth) {
try { try {
@ -84,9 +84,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method updateSession. * Method updateSession.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */
@Override @Override
public synchronized boolean updateSession(final PlayerAuth auth) { public synchronized boolean updateSession(final PlayerAuth auth) {
try { try {
@ -103,9 +103,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method updatePassword. * Method updatePassword.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */
@Override @Override
public synchronized boolean updatePassword(final PlayerAuth auth) { public synchronized boolean updatePassword(final PlayerAuth auth) {
try { try {
@ -122,9 +122,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method purgeDatabase. * Method purgeDatabase.
* @param until long * @param until long
* @return int
* @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */
@Override @Override
public synchronized int purgeDatabase(final long until) { public synchronized int purgeDatabase(final long until) {
try { try {
@ -141,9 +141,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* @param until long * @param until long
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */
@Override @Override
public synchronized List<String> autoPurgeDatabase(final long until) { public synchronized List<String> autoPurgeDatabase(final long until) {
try { try {
@ -160,9 +160,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method removeAuth. * Method removeAuth.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */
@Override @Override
public synchronized boolean removeAuth(final String user) { public synchronized boolean removeAuth(final String user) {
try { try {
@ -179,9 +179,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method updateQuitLoc. * Method updateQuitLoc.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */
@Override @Override
public synchronized boolean updateQuitLoc(final PlayerAuth auth) { public synchronized boolean updateQuitLoc(final PlayerAuth auth) {
try { try {
@ -198,9 +198,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getIps. * Method getIps.
* @param ip String * @param ip String
* @return int
* @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */
@Override @Override
public synchronized int getIps(final String ip) { public synchronized int getIps(final String ip) {
try { try {
@ -218,9 +218,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getAllAuthsByName. * Method getAllAuthsByName.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */
@Override @Override
public synchronized List<String> getAllAuthsByName(final PlayerAuth auth) { public synchronized List<String> getAllAuthsByName(final PlayerAuth auth) {
try { try {
@ -237,9 +237,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* @param ip String * @param ip String
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */
@Override @Override
public synchronized List<String> getAllAuthsByIp(final String ip) { public synchronized List<String> getAllAuthsByIp(final String ip) {
try { try {
@ -256,9 +256,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* @param email String * @param email String
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */
@Override @Override
public synchronized List<String> getAllAuthsByEmail(final String email) { public synchronized List<String> getAllAuthsByEmail(final String email) {
try { try {
@ -275,9 +275,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method updateEmail. * Method updateEmail.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */
@Override @Override
public synchronized boolean updateEmail(final PlayerAuth auth) { public synchronized boolean updateEmail(final PlayerAuth auth) {
try { try {
@ -294,9 +294,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method updateSalt. * Method updateSalt.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */
@Override @Override
public synchronized boolean updateSalt(final PlayerAuth auth) { public synchronized boolean updateSalt(final PlayerAuth auth) {
try { try {
@ -332,8 +332,8 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method purgeBanned. * Method purgeBanned.
* @param banned List<String> * @param banned List<String>
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) */
@Override @Override
public synchronized void purgeBanned(final List<String> banned) { public synchronized void purgeBanned(final List<String> banned) {
new Thread(new Runnable() { new Thread(new Runnable() {
@ -345,9 +345,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getType. * Method getType.
* @return DataSourceType
* @see fr.xephi.authme.datasource.DataSource#getType()
*/ * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */
@Override @Override
public synchronized DataSourceType getType() { public synchronized DataSourceType getType() {
return database.getType(); return database.getType();
@ -356,9 +356,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method isLogged. * Method isLogged.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */
@Override @Override
public synchronized boolean isLogged(final String user) { public synchronized boolean isLogged(final String user) {
try { try {
@ -375,8 +375,8 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method setLogged. * Method setLogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */
@Override @Override
public synchronized void setLogged(final String user) { public synchronized void setLogged(final String user) {
exec.execute(new Runnable() { exec.execute(new Runnable() {
@ -389,8 +389,8 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method setUnlogged. * Method setUnlogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */
@Override @Override
public synchronized void setUnlogged(final String user) { public synchronized void setUnlogged(final String user) {
exec.execute(new Runnable() { exec.execute(new Runnable() {
@ -415,9 +415,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getAccountsRegistered. * Method getAccountsRegistered.
* @return int
* @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered()
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */
@Override @Override
public synchronized int getAccountsRegistered() { public synchronized int getAccountsRegistered() {
try { try {
@ -435,8 +435,8 @@ public class DatabaseCalls implements DataSource {
* Method updateName. * Method updateName.
* @param oldone String * @param oldone String
* @param newone String * @param newone String
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */
@Override @Override
public synchronized void updateName(final String oldone, final String newone) { public synchronized void updateName(final String oldone, final String newone) {
exec.execute(new Runnable() { exec.execute(new Runnable() {
@ -448,9 +448,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getAllAuths. * Method getAllAuths.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getAllAuths()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */
@Override @Override
public synchronized List<PlayerAuth> getAllAuths() { public synchronized List<PlayerAuth> getAllAuths() {
try { try {
@ -466,9 +466,9 @@ public class DatabaseCalls implements DataSource {
/** /**
* Method getLoggedPlayers. * Method getLoggedPlayers.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */
@Override @Override
public List<PlayerAuth> getLoggedPlayers() { public List<PlayerAuth> getLoggedPlayers() {
try { try {

View File

@ -53,9 +53,9 @@ public class FlatFile implements DataSource {
/** /**
* Method isAuthAvailable. * Method isAuthAvailable.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */
@Override @Override
public synchronized boolean isAuthAvailable(String user) { public synchronized boolean isAuthAvailable(String user) {
BufferedReader br = null; BufferedReader br = null;
@ -88,9 +88,9 @@ public class FlatFile implements DataSource {
/** /**
* Method saveAuth. * Method saveAuth.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */
@Override @Override
public synchronized boolean saveAuth(PlayerAuth auth) { public synchronized boolean saveAuth(PlayerAuth auth) {
if (isAuthAvailable(auth.getNickname())) { if (isAuthAvailable(auth.getNickname())) {
@ -117,9 +117,9 @@ public class FlatFile implements DataSource {
/** /**
* Method updatePassword. * Method updatePassword.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */
@Override @Override
public synchronized boolean updatePassword(PlayerAuth auth) { public synchronized boolean updatePassword(PlayerAuth auth) {
if (!isAuthAvailable(auth.getNickname())) { if (!isAuthAvailable(auth.getNickname())) {
@ -182,9 +182,9 @@ public class FlatFile implements DataSource {
/** /**
* Method updateSession. * Method updateSession.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */
@Override @Override
public boolean updateSession(PlayerAuth auth) { public boolean updateSession(PlayerAuth auth) {
if (!isAuthAvailable(auth.getNickname())) { if (!isAuthAvailable(auth.getNickname())) {
@ -247,9 +247,9 @@ public class FlatFile implements DataSource {
/** /**
* Method updateQuitLoc. * Method updateQuitLoc.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */
@Override @Override
public boolean updateQuitLoc(PlayerAuth auth) { public boolean updateQuitLoc(PlayerAuth auth) {
if (!isAuthAvailable(auth.getNickname())) { if (!isAuthAvailable(auth.getNickname())) {
@ -291,9 +291,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getIps. * Method getIps.
* @param ip String * @param ip String
* @return int
* @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */
@Override @Override
public int getIps(String ip) { public int getIps(String ip) {
BufferedReader br = null; BufferedReader br = null;
@ -327,9 +327,9 @@ public class FlatFile implements DataSource {
/** /**
* Method purgeDatabase. * Method purgeDatabase.
* @param until long * @param until long
* @return int
* @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */
@Override @Override
public int purgeDatabase(long until) { public int purgeDatabase(long until) {
BufferedReader br = null; BufferedReader br = null;
@ -379,9 +379,9 @@ public class FlatFile implements DataSource {
/** /**
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* @param until long * @param until long
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */
@Override @Override
public List<String> autoPurgeDatabase(long until) { public List<String> autoPurgeDatabase(long until) {
BufferedReader br = null; BufferedReader br = null;
@ -431,9 +431,9 @@ public class FlatFile implements DataSource {
/** /**
* Method removeAuth. * Method removeAuth.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */
@Override @Override
public synchronized boolean removeAuth(String user) { public synchronized boolean removeAuth(String user) {
if (!isAuthAvailable(user)) { if (!isAuthAvailable(user)) {
@ -481,9 +481,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getAuth. * Method getAuth.
* @param user String * @param user String
* @return PlayerAuth
* @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */
@Override @Override
public synchronized PlayerAuth getAuth(String user) { public synchronized PlayerAuth getAuth(String user) {
BufferedReader br = null; BufferedReader br = null;
@ -545,9 +545,9 @@ public class FlatFile implements DataSource {
/** /**
* Method updateEmail. * Method updateEmail.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */
@Override @Override
public boolean updateEmail(PlayerAuth auth) { public boolean updateEmail(PlayerAuth auth) {
if (!isAuthAvailable(auth.getNickname())) { if (!isAuthAvailable(auth.getNickname())) {
@ -589,9 +589,9 @@ public class FlatFile implements DataSource {
/** /**
* Method updateSalt. * Method updateSalt.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */
@Override @Override
public boolean updateSalt(PlayerAuth auth) { public boolean updateSalt(PlayerAuth auth) {
return false; return false;
@ -600,9 +600,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getAllAuthsByName. * Method getAllAuthsByName.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */
@Override @Override
public List<String> getAllAuthsByName(PlayerAuth auth) { public List<String> getAllAuthsByName(PlayerAuth auth) {
BufferedReader br = null; BufferedReader br = null;
@ -636,9 +636,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* @param ip String * @param ip String
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */
@Override @Override
public List<String> getAllAuthsByIp(String ip) { public List<String> getAllAuthsByIp(String ip) {
BufferedReader br = null; BufferedReader br = null;
@ -672,9 +672,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* @param email String * @param email String
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */
@Override @Override
public List<String> getAllAuthsByEmail(String email) { public List<String> getAllAuthsByEmail(String email) {
BufferedReader br = null; BufferedReader br = null;
@ -708,8 +708,8 @@ public class FlatFile implements DataSource {
/** /**
* Method purgeBanned. * Method purgeBanned.
* @param banned List<String> * @param banned List<String>
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) */
@Override @Override
public void purgeBanned(List<String> banned) { public void purgeBanned(List<String> banned) {
BufferedReader br = null; BufferedReader br = null;
@ -756,9 +756,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getType. * Method getType.
* @return DataSourceType
* @see fr.xephi.authme.datasource.DataSource#getType()
*/ * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */
@Override @Override
public DataSourceType getType() { public DataSourceType getType() {
return DataSourceType.FILE; return DataSourceType.FILE;
@ -767,9 +767,9 @@ public class FlatFile implements DataSource {
/** /**
* Method isLogged. * Method isLogged.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */
@Override @Override
public boolean isLogged(String user) { public boolean isLogged(String user) {
return PlayerCache.getInstance().isAuthenticated(user); return PlayerCache.getInstance().isAuthenticated(user);
@ -778,8 +778,8 @@ public class FlatFile implements DataSource {
/** /**
* Method setLogged. * Method setLogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */
@Override @Override
public void setLogged(String user) { public void setLogged(String user) {
} }
@ -787,8 +787,8 @@ public class FlatFile implements DataSource {
/** /**
* Method setUnlogged. * Method setUnlogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */
@Override @Override
public void setUnlogged(String user) { public void setUnlogged(String user) {
} }
@ -803,9 +803,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getAccountsRegistered. * Method getAccountsRegistered.
* @return int
* @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered()
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */
@Override @Override
public int getAccountsRegistered() { public int getAccountsRegistered() {
BufferedReader br = null; BufferedReader br = null;
@ -833,8 +833,8 @@ public class FlatFile implements DataSource {
* Method updateName. * Method updateName.
* @param oldone String * @param oldone String
* @param newone String * @param newone String
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */
@Override @Override
public void updateName(String oldone, String newone) { public void updateName(String oldone, String newone) {
PlayerAuth auth = this.getAuth(oldone); PlayerAuth auth = this.getAuth(oldone);
@ -845,9 +845,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getAllAuths. * Method getAllAuths.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getAllAuths()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */
@Override @Override
public List<PlayerAuth> getAllAuths() { public List<PlayerAuth> getAllAuths() {
BufferedReader br = null; BufferedReader br = null;
@ -897,9 +897,9 @@ public class FlatFile implements DataSource {
/** /**
* Method getLoggedPlayers. * Method getLoggedPlayers.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */
@Override @Override
public List<PlayerAuth> getLoggedPlayers() { public List<PlayerAuth> getLoggedPlayers() {
return new ArrayList<>(); return new ArrayList<>();

View File

@ -49,10 +49,10 @@ public class MySQL implements DataSource {
/** /**
* Constructor for MySQL. * Constructor for MySQL.
* @throws ClassNotFoundException
* @throws SQLException
* @throws PoolInitializationException
*/ * @throws ClassNotFoundException * @throws SQLException * @throws PoolInitializationException */
public MySQL() throws ClassNotFoundException, SQLException, PoolInitializationException { public MySQL() throws ClassNotFoundException, SQLException, PoolInitializationException {
this.host = Settings.getMySQLHost; this.host = Settings.getMySQLHost;
this.port = Settings.getMySQLPort; this.port = Settings.getMySQLPort;
@ -108,9 +108,9 @@ public class MySQL implements DataSource {
/** /**
* Method setConnectionArguments. * Method setConnectionArguments.
* @throws ClassNotFoundException
* @throws IllegalArgumentException
*/ * @throws ClassNotFoundException * @throws IllegalArgumentException */
private synchronized void setConnectionArguments() private synchronized void setConnectionArguments()
throws ClassNotFoundException, IllegalArgumentException { throws ClassNotFoundException, IllegalArgumentException {
HikariConfig config = new HikariConfig(); HikariConfig config = new HikariConfig();
@ -132,9 +132,9 @@ public class MySQL implements DataSource {
/** /**
* Method reloadArguments. * Method reloadArguments.
* @throws ClassNotFoundException
* @throws IllegalArgumentException
*/ * @throws ClassNotFoundException * @throws IllegalArgumentException */
private synchronized void reloadArguments() private synchronized void reloadArguments()
throws ClassNotFoundException, IllegalArgumentException { throws ClassNotFoundException, IllegalArgumentException {
if (ds != null) { if (ds != null) {
@ -146,17 +146,17 @@ public class MySQL implements DataSource {
/** /**
* Method getConnection. * Method getConnection.
* @return Connection
* @throws SQLException
*/ * @return Connection * @throws SQLException */
private synchronized Connection getConnection() throws SQLException { private synchronized Connection getConnection() throws SQLException {
return ds.getConnection(); return ds.getConnection();
} }
/** /**
* Method setupConnection. * Method setupConnection.
* @throws SQLException
*/ * @throws SQLException */
private synchronized void setupConnection() throws SQLException { private synchronized void setupConnection() throws SQLException {
Connection con = null; Connection con = null;
Statement st = null; Statement st = null;
@ -223,9 +223,9 @@ public class MySQL implements DataSource {
/** /**
* Method isAuthAvailable. * Method isAuthAvailable.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */
@Override @Override
public synchronized boolean isAuthAvailable(String user) { public synchronized boolean isAuthAvailable(String user) {
Connection con = null; Connection con = null;
@ -251,9 +251,9 @@ public class MySQL implements DataSource {
/** /**
* Method getAuth. * Method getAuth.
* @param user String * @param user String
* @return PlayerAuth
* @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */
@Override @Override
public synchronized PlayerAuth getAuth(String user) { public synchronized PlayerAuth getAuth(String user) {
Connection con = null; Connection con = null;
@ -310,9 +310,9 @@ public class MySQL implements DataSource {
/** /**
* Method saveAuth. * Method saveAuth.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */
@Override @Override
public synchronized boolean saveAuth(PlayerAuth auth) { public synchronized boolean saveAuth(PlayerAuth auth) {
Connection con = null; Connection con = null;
@ -523,9 +523,9 @@ public class MySQL implements DataSource {
/** /**
* Method updatePassword. * Method updatePassword.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */
@Override @Override
public synchronized boolean updatePassword(PlayerAuth auth) { public synchronized boolean updatePassword(PlayerAuth auth) {
Connection con = null; Connection con = null;
@ -574,9 +574,9 @@ public class MySQL implements DataSource {
/** /**
* Method updateSession. * Method updateSession.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */
@Override @Override
public synchronized boolean updateSession(PlayerAuth auth) { public synchronized boolean updateSession(PlayerAuth auth) {
Connection con = null; Connection con = null;
@ -603,9 +603,9 @@ public class MySQL implements DataSource {
/** /**
* Method purgeDatabase. * Method purgeDatabase.
* @param until long * @param until long
* @return int
* @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */
@Override @Override
public synchronized int purgeDatabase(long until) { public synchronized int purgeDatabase(long until) {
Connection con = null; Connection con = null;
@ -628,9 +628,9 @@ public class MySQL implements DataSource {
/** /**
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* @param until long * @param until long
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */
@Override @Override
public synchronized List<String> autoPurgeDatabase(long until) { public synchronized List<String> autoPurgeDatabase(long until) {
Connection con = null; Connection con = null;
@ -664,9 +664,9 @@ public class MySQL implements DataSource {
/** /**
* Method removeAuth. * Method removeAuth.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */
@Override @Override
public synchronized boolean removeAuth(String user) { public synchronized boolean removeAuth(String user) {
Connection con = null; Connection con = null;
@ -707,9 +707,9 @@ public class MySQL implements DataSource {
/** /**
* Method updateQuitLoc. * Method updateQuitLoc.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */
@Override @Override
public synchronized boolean updateQuitLoc(PlayerAuth auth) { public synchronized boolean updateQuitLoc(PlayerAuth auth) {
Connection con = null; Connection con = null;
@ -737,9 +737,9 @@ public class MySQL implements DataSource {
/** /**
* Method getIps. * Method getIps.
* @param ip String * @param ip String
* @return int
* @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */
@Override @Override
public synchronized int getIps(String ip) { public synchronized int getIps(String ip) {
Connection con = null; Connection con = null;
@ -769,9 +769,9 @@ public class MySQL implements DataSource {
/** /**
* Method updateEmail. * Method updateEmail.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */
@Override @Override
public synchronized boolean updateEmail(PlayerAuth auth) { public synchronized boolean updateEmail(PlayerAuth auth) {
Connection con = null; Connection con = null;
@ -797,9 +797,9 @@ public class MySQL implements DataSource {
/** /**
* Method updateSalt. * Method updateSalt.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */
@Override @Override
public synchronized boolean updateSalt(PlayerAuth auth) { public synchronized boolean updateSalt(PlayerAuth auth) {
if (columnSalt.isEmpty()) { if (columnSalt.isEmpty()) {
@ -871,9 +871,9 @@ public class MySQL implements DataSource {
/** /**
* Method getAllAuthsByName. * Method getAllAuthsByName.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */
@Override @Override
public synchronized List<String> getAllAuthsByName(PlayerAuth auth) { public synchronized List<String> getAllAuthsByName(PlayerAuth auth) {
Connection con = null; Connection con = null;
@ -903,9 +903,9 @@ public class MySQL implements DataSource {
/** /**
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* @param ip String * @param ip String
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */
@Override @Override
public synchronized List<String> getAllAuthsByIp(String ip) { public synchronized List<String> getAllAuthsByIp(String ip) {
Connection con = null; Connection con = null;
@ -935,10 +935,10 @@ public class MySQL implements DataSource {
/** /**
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* @param email String * @param email String
* @return List<String>
* @throws SQLException
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ * @return List<String> * @throws SQLException * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */
@Override @Override
public synchronized List<String> getAllAuthsByEmail(String email) throws SQLException { public synchronized List<String> getAllAuthsByEmail(String email) throws SQLException {
final Connection con = getConnection(); final Connection con = getConnection();
@ -964,8 +964,8 @@ public class MySQL implements DataSource {
/** /**
* Method purgeBanned. * Method purgeBanned.
* @param banned List<String> * @param banned List<String>
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) */
@Override @Override
public synchronized void purgeBanned(List<String> banned) { public synchronized void purgeBanned(List<String> banned) {
Connection con = null; Connection con = null;
@ -988,9 +988,9 @@ public class MySQL implements DataSource {
/** /**
* Method getType. * Method getType.
* @return DataSourceType
* @see fr.xephi.authme.datasource.DataSource#getType()
*/ * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */
@Override @Override
public DataSourceType getType() { public DataSourceType getType() {
return DataSourceType.MYSQL; return DataSourceType.MYSQL;
@ -999,9 +999,9 @@ public class MySQL implements DataSource {
/** /**
* Method isLogged. * Method isLogged.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */
@Override @Override
public boolean isLogged(String user) { public boolean isLogged(String user) {
Connection con = null; Connection con = null;
@ -1029,8 +1029,8 @@ public class MySQL implements DataSource {
/** /**
* Method setLogged. * Method setLogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */
@Override @Override
public void setLogged(String user) { public void setLogged(String user) {
Connection con = null; Connection con = null;
@ -1053,8 +1053,8 @@ public class MySQL implements DataSource {
/** /**
* Method setUnlogged. * Method setUnlogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */
@Override @Override
public void setUnlogged(String user) { public void setUnlogged(String user) {
Connection con = null; Connection con = null;
@ -1100,9 +1100,9 @@ public class MySQL implements DataSource {
/** /**
* Method getAccountsRegistered. * Method getAccountsRegistered.
* @return int
* @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered()
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */
@Override @Override
public int getAccountsRegistered() { public int getAccountsRegistered() {
int result = 0; int result = 0;
@ -1131,8 +1131,8 @@ public class MySQL implements DataSource {
* Method updateName. * Method updateName.
* @param oldone String * @param oldone String
* @param newone String * @param newone String
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */
@Override @Override
public void updateName(String oldone, String newone) { public void updateName(String oldone, String newone) {
Connection con = null; Connection con = null;
@ -1154,9 +1154,9 @@ public class MySQL implements DataSource {
/** /**
* Method getAllAuths. * Method getAllAuths.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getAllAuths()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */
@Override @Override
public List<PlayerAuth> getAllAuths() { public List<PlayerAuth> getAllAuths() {
List<PlayerAuth> auths = new ArrayList<>(); List<PlayerAuth> auths = new ArrayList<>();
@ -1210,9 +1210,9 @@ public class MySQL implements DataSource {
/** /**
* Method getLoggedPlayers. * Method getLoggedPlayers.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */
@Override @Override
public List<PlayerAuth> getLoggedPlayers() { public List<PlayerAuth> getLoggedPlayers() {
List<PlayerAuth> auths = new ArrayList<>(); List<PlayerAuth> auths = new ArrayList<>();

View File

@ -37,9 +37,9 @@ public class SQLite implements DataSource {
/** /**
* Constructor for SQLite. * Constructor for SQLite.
* @throws ClassNotFoundException
* @throws SQLException
*/ * @throws ClassNotFoundException * @throws SQLException */
public SQLite() throws ClassNotFoundException, SQLException { public SQLite() throws ClassNotFoundException, SQLException {
this.database = Settings.getMySQLDatabase; this.database = Settings.getMySQLDatabase;
this.tableName = Settings.getMySQLTablename; this.tableName = Settings.getMySQLTablename;
@ -69,9 +69,9 @@ public class SQLite implements DataSource {
/** /**
* Method connect. * Method connect.
* @throws ClassNotFoundException
* @throws SQLException
*/ * @throws ClassNotFoundException * @throws SQLException */
private synchronized void connect() throws ClassNotFoundException, SQLException { private synchronized void connect() throws ClassNotFoundException, SQLException {
Class.forName("org.sqlite.JDBC"); Class.forName("org.sqlite.JDBC");
ConsoleLogger.info("SQLite driver loaded"); ConsoleLogger.info("SQLite driver loaded");
@ -81,8 +81,8 @@ public class SQLite implements DataSource {
/** /**
* Method setup. * Method setup.
* @throws SQLException
*/ * @throws SQLException */
private synchronized void setup() throws SQLException { private synchronized void setup() throws SQLException {
Statement st = null; Statement st = null;
ResultSet rs = null; ResultSet rs = null;
@ -140,9 +140,9 @@ public class SQLite implements DataSource {
/** /**
* Method isAuthAvailable. * Method isAuthAvailable.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isAuthAvailable(String) */
@Override @Override
public synchronized boolean isAuthAvailable(String user) { public synchronized boolean isAuthAvailable(String user) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -164,9 +164,9 @@ public class SQLite implements DataSource {
/** /**
* Method getAuth. * Method getAuth.
* @param user String * @param user String
* @return PlayerAuth
* @see fr.xephi.authme.datasource.DataSource#getAuth(String)
*/ * @return PlayerAuth * @see fr.xephi.authme.datasource.DataSource#getAuth(String) */
@Override @Override
public synchronized PlayerAuth getAuth(String user) { public synchronized PlayerAuth getAuth(String user) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -200,9 +200,9 @@ public class SQLite implements DataSource {
/** /**
* Method saveAuth. * Method saveAuth.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#saveAuth(PlayerAuth) */
@Override @Override
public synchronized boolean saveAuth(PlayerAuth auth) { public synchronized boolean saveAuth(PlayerAuth auth) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -237,9 +237,9 @@ public class SQLite implements DataSource {
/** /**
* Method updatePassword. * Method updatePassword.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updatePassword(PlayerAuth) */
@Override @Override
public synchronized boolean updatePassword(PlayerAuth auth) { public synchronized boolean updatePassword(PlayerAuth auth) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -260,9 +260,9 @@ public class SQLite implements DataSource {
/** /**
* Method updateSession. * Method updateSession.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSession(PlayerAuth) */
@Override @Override
public boolean updateSession(PlayerAuth auth) { public boolean updateSession(PlayerAuth auth) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -285,9 +285,9 @@ public class SQLite implements DataSource {
/** /**
* Method purgeDatabase. * Method purgeDatabase.
* @param until long * @param until long
* @return int
* @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#purgeDatabase(long) */
@Override @Override
public int purgeDatabase(long until) { public int purgeDatabase(long until) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -307,9 +307,9 @@ public class SQLite implements DataSource {
/** /**
* Method autoPurgeDatabase. * Method autoPurgeDatabase.
* @param until long * @param until long
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#autoPurgeDatabase(long) */
@Override @Override
public List<String> autoPurgeDatabase(long until) { public List<String> autoPurgeDatabase(long until) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -335,9 +335,9 @@ public class SQLite implements DataSource {
/** /**
* Method removeAuth. * Method removeAuth.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#removeAuth(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#removeAuth(String) */
@Override @Override
public synchronized boolean removeAuth(String user) { public synchronized boolean removeAuth(String user) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -357,9 +357,9 @@ public class SQLite implements DataSource {
/** /**
* Method updateQuitLoc. * Method updateQuitLoc.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateQuitLoc(PlayerAuth) */
@Override @Override
public boolean updateQuitLoc(PlayerAuth auth) { public boolean updateQuitLoc(PlayerAuth auth) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -383,9 +383,9 @@ public class SQLite implements DataSource {
/** /**
* Method getIps. * Method getIps.
* @param ip String * @param ip String
* @return int
* @see fr.xephi.authme.datasource.DataSource#getIps(String)
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getIps(String) */
@Override @Override
public int getIps(String ip) { public int getIps(String ip) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -411,9 +411,9 @@ public class SQLite implements DataSource {
/** /**
* Method updateEmail. * Method updateEmail.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateEmail(PlayerAuth) */
@Override @Override
public boolean updateEmail(PlayerAuth auth) { public boolean updateEmail(PlayerAuth auth) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -434,9 +434,9 @@ public class SQLite implements DataSource {
/** /**
* Method updateSalt. * Method updateSalt.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#updateSalt(PlayerAuth) */
@Override @Override
public boolean updateSalt(PlayerAuth auth) { public boolean updateSalt(PlayerAuth auth) {
if (columnSalt.isEmpty()) { if (columnSalt.isEmpty()) {
@ -509,9 +509,9 @@ public class SQLite implements DataSource {
/** /**
* Method getAllAuthsByName. * Method getAllAuthsByName.
* @param auth PlayerAuth * @param auth PlayerAuth
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByName(PlayerAuth) */
@Override @Override
public List<String> getAllAuthsByName(PlayerAuth auth) { public List<String> getAllAuthsByName(PlayerAuth auth) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -539,9 +539,9 @@ public class SQLite implements DataSource {
/** /**
* Method getAllAuthsByIp. * Method getAllAuthsByIp.
* @param ip String * @param ip String
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByIp(String) */
@Override @Override
public List<String> getAllAuthsByIp(String ip) { public List<String> getAllAuthsByIp(String ip) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -569,9 +569,9 @@ public class SQLite implements DataSource {
/** /**
* Method getAllAuthsByEmail. * Method getAllAuthsByEmail.
* @param email String * @param email String
* @return List<String>
* @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String)
*/ * @return List<String> * @see fr.xephi.authme.datasource.DataSource#getAllAuthsByEmail(String) */
@Override @Override
public List<String> getAllAuthsByEmail(String email) { public List<String> getAllAuthsByEmail(String email) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -599,8 +599,8 @@ public class SQLite implements DataSource {
/** /**
* Method purgeBanned. * Method purgeBanned.
* @param banned List<String> * @param banned List<String>
* @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>)
*/ * @see fr.xephi.authme.datasource.DataSource#purgeBanned(List<String>) */
@Override @Override
public void purgeBanned(List<String> banned) { public void purgeBanned(List<String> banned) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -619,9 +619,9 @@ public class SQLite implements DataSource {
/** /**
* Method getType. * Method getType.
* @return DataSourceType
* @see fr.xephi.authme.datasource.DataSource#getType()
*/ * @return DataSourceType * @see fr.xephi.authme.datasource.DataSource#getType() */
@Override @Override
public DataSourceType getType() { public DataSourceType getType() {
return DataSourceType.SQLITE; return DataSourceType.SQLITE;
@ -630,9 +630,9 @@ public class SQLite implements DataSource {
/** /**
* Method isLogged. * Method isLogged.
* @param user String * @param user String
* @return boolean
* @see fr.xephi.authme.datasource.DataSource#isLogged(String)
*/ * @return boolean * @see fr.xephi.authme.datasource.DataSource#isLogged(String) */
@Override @Override
public boolean isLogged(String user) { public boolean isLogged(String user) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -656,8 +656,8 @@ public class SQLite implements DataSource {
/** /**
* Method setLogged. * Method setLogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setLogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setLogged(String) */
@Override @Override
public void setLogged(String user) { public void setLogged(String user) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -676,8 +676,8 @@ public class SQLite implements DataSource {
/** /**
* Method setUnlogged. * Method setUnlogged.
* @param user String * @param user String
* @see fr.xephi.authme.datasource.DataSource#setUnlogged(String)
*/ * @see fr.xephi.authme.datasource.DataSource#setUnlogged(String) */
@Override @Override
public void setUnlogged(String user) { public void setUnlogged(String user) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -715,9 +715,9 @@ public class SQLite implements DataSource {
/** /**
* Method getAccountsRegistered. * Method getAccountsRegistered.
* @return int
* @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered()
*/ * @return int * @see fr.xephi.authme.datasource.DataSource#getAccountsRegistered() */
@Override @Override
public int getAccountsRegistered() { public int getAccountsRegistered() {
int result = 0; int result = 0;
@ -742,8 +742,8 @@ public class SQLite implements DataSource {
* Method updateName. * Method updateName.
* @param oldone String * @param oldone String
* @param newone String * @param newone String
* @see fr.xephi.authme.datasource.DataSource#updateName(String, String)
*/ * @see fr.xephi.authme.datasource.DataSource#updateName(String, String) */
@Override @Override
public void updateName(String oldone, String newone) { public void updateName(String oldone, String newone) {
PreparedStatement pst = null; PreparedStatement pst = null;
@ -761,9 +761,9 @@ public class SQLite implements DataSource {
/** /**
* Method getAllAuths. * Method getAllAuths.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getAllAuths()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getAllAuths() */
@Override @Override
public List<PlayerAuth> getAllAuths() { public List<PlayerAuth> getAllAuths() {
List<PlayerAuth> auths = new ArrayList<>(); List<PlayerAuth> auths = new ArrayList<>();
@ -796,9 +796,9 @@ public class SQLite implements DataSource {
/** /**
* Method getLoggedPlayers. * Method getLoggedPlayers.
* @return List<PlayerAuth>
* @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers()
*/ * @return List<PlayerAuth> * @see fr.xephi.authme.datasource.DataSource#getLoggedPlayers() */
@Override @Override
public List<PlayerAuth> getLoggedPlayers() { public List<PlayerAuth> getLoggedPlayers() {
List<PlayerAuth> auths = new ArrayList<>(); List<PlayerAuth> auths = new ArrayList<>();

View File

@ -28,16 +28,16 @@ public class AuthMeAsyncPreLoginEvent extends Event {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return player; return player;
} }
/** /**
* Method canLogin. * Method canLogin.
* @return boolean
*/ * @return boolean */
public boolean canLogin() { public boolean canLogin() {
return canLogin; return canLogin;
} }
@ -52,8 +52,8 @@ public class AuthMeAsyncPreLoginEvent extends Event {
/** /**
* Method getHandlers. * Method getHandlers.
* @return HandlerList
*/ * @return HandlerList */
@Override @Override
public HandlerList getHandlers() { public HandlerList getHandlers() {
return handlers; return handlers;

View File

@ -29,8 +29,8 @@ public class AuthMeTeleportEvent extends CustomEvent {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return player; return player;
} }
@ -45,16 +45,16 @@ public class AuthMeTeleportEvent extends CustomEvent {
/** /**
* Method getTo. * Method getTo.
* @return Location
*/ * @return Location */
public Location getTo() { public Location getTo() {
return to; return to;
} }
/** /**
* Method getFrom. * Method getFrom.
* @return Location
*/ * @return Location */
public Location getFrom() { public Location getFrom() {
return from; return from;
} }

View File

@ -28,25 +28,25 @@ public class CustomEvent extends Event implements Cancellable {
/** /**
* Method getHandlers. * Method getHandlers.
* @return HandlerList
*/ * @return HandlerList */
public HandlerList getHandlers() { public HandlerList getHandlers() {
return handlers; return handlers;
} }
/** /**
* Method getHandlerList. * Method getHandlerList.
* @return HandlerList
*/ * @return HandlerList */
public static HandlerList getHandlerList() { public static HandlerList getHandlerList() {
return handlers; return handlers;
} }
/** /**
* Method isCancelled. * Method isCancelled.
* @return boolean
* @see org.bukkit.event.Cancellable#isCancelled()
*/ * @return boolean * @see org.bukkit.event.Cancellable#isCancelled() */
public boolean isCancelled() { public boolean isCancelled() {
return this.isCancelled; return this.isCancelled;
} }
@ -54,8 +54,8 @@ public class CustomEvent extends Event implements Cancellable {
/** /**
* Method setCancelled. * Method setCancelled.
* @param cancelled boolean * @param cancelled boolean
* @see org.bukkit.event.Cancellable#setCancelled(boolean)
*/ * @see org.bukkit.event.Cancellable#setCancelled(boolean) */
public void setCancelled(boolean cancelled) { public void setCancelled(boolean cancelled) {
this.isCancelled = cancelled; this.isCancelled = cancelled;
} }

View File

@ -31,8 +31,8 @@ public class FirstSpawnTeleportEvent extends CustomEvent {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return player; return player;
} }
@ -47,16 +47,16 @@ public class FirstSpawnTeleportEvent extends CustomEvent {
/** /**
* Method getTo. * Method getTo.
* @return Location
*/ * @return Location */
public Location getTo() { public Location getTo() {
return to; return to;
} }
/** /**
* Method getFrom. * Method getFrom.
* @return Location
*/ * @return Location */
public Location getFrom() { public Location getFrom() {
return from; return from;
} }

View File

@ -30,8 +30,8 @@ public class LoginEvent extends Event {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return this.player; return this.player;
} }
@ -55,16 +55,16 @@ public class LoginEvent extends Event {
/** /**
* Method isLogin. * Method isLogin.
* @return boolean
*/ * @return boolean */
public boolean isLogin() { public boolean isLogin() {
return isLogin; return isLogin;
} }
/** /**
* Method getHandlers. * Method getHandlers.
* @return HandlerList
*/ * @return HandlerList */
@Override @Override
public HandlerList getHandlers() { public HandlerList getHandlers() {
return handlers; return handlers;
@ -72,8 +72,8 @@ public class LoginEvent extends Event {
/** /**
* Method getHandlerList. * Method getHandlerList.
* @return HandlerList
*/ * @return HandlerList */
public static HandlerList getHandlerList() { public static HandlerList getHandlerList() {
return handlers; return handlers;
} }

View File

@ -26,8 +26,8 @@ public class LogoutEvent extends Event {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return this.player; return this.player;
} }
@ -42,8 +42,8 @@ public class LogoutEvent extends Event {
/** /**
* Method getHandlers. * Method getHandlers.
* @return HandlerList
*/ * @return HandlerList */
@Override @Override
public HandlerList getHandlers() { public HandlerList getHandlers() {
return handlers; return handlers;
@ -51,8 +51,8 @@ public class LogoutEvent extends Event {
/** /**
* Method getHandlerList. * Method getHandlerList.
* @return HandlerList
*/ * @return HandlerList */
public static HandlerList getHandlerList() { public static HandlerList getHandlerList() {
return handlers; return handlers;
} }

View File

@ -35,8 +35,8 @@ public class PasswordEncryptionEvent extends Event {
/** /**
* Method getHandlers. * Method getHandlers.
* @return HandlerList
*/ * @return HandlerList */
@Override @Override
public HandlerList getHandlers() { public HandlerList getHandlers() {
return handlers; return handlers;
@ -52,24 +52,24 @@ public class PasswordEncryptionEvent extends Event {
/** /**
* Method getMethod. * Method getMethod.
* @return EncryptionMethod
*/ * @return EncryptionMethod */
public EncryptionMethod getMethod() { public EncryptionMethod getMethod() {
return method; return method;
} }
/** /**
* Method getPlayerName. * Method getPlayerName.
* @return String
*/ * @return String */
public String getPlayerName() { public String getPlayerName() {
return playerName; return playerName;
} }
/** /**
* Method getHandlerList. * Method getHandlerList.
* @return HandlerList
*/ * @return HandlerList */
public static HandlerList getHandlerList() { public static HandlerList getHandlerList() {
return handlers; return handlers;
} }

View File

@ -34,24 +34,24 @@ public class ProtectInventoryEvent extends CustomEvent {
/** /**
* Method getStoredInventory. * Method getStoredInventory.
* @return ItemStack[]
*/ * @return ItemStack[] */
public ItemStack[] getStoredInventory() { public ItemStack[] getStoredInventory() {
return this.storedinventory; return this.storedinventory;
} }
/** /**
* Method getStoredArmor. * Method getStoredArmor.
* @return ItemStack[]
*/ * @return ItemStack[] */
public ItemStack[] getStoredArmor() { public ItemStack[] getStoredArmor() {
return this.storedarmor; return this.storedarmor;
} }
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return this.player; return this.player;
} }
@ -66,8 +66,8 @@ public class ProtectInventoryEvent extends CustomEvent {
/** /**
* Method getEmptyInventory. * Method getEmptyInventory.
* @return ItemStack[]
*/ * @return ItemStack[] */
public ItemStack[] getEmptyInventory() { public ItemStack[] getEmptyInventory() {
return this.emptyInventory; return this.emptyInventory;
} }
@ -82,8 +82,8 @@ public class ProtectInventoryEvent extends CustomEvent {
/** /**
* Method getEmptyArmor. * Method getEmptyArmor.
* @return ItemStack[]
*/ * @return ItemStack[] */
public ItemStack[] getEmptyArmor() { public ItemStack[] getEmptyArmor() {
return this.emptyArmor; return this.emptyArmor;
} }

View File

@ -30,8 +30,8 @@ public class RegisterTeleportEvent extends CustomEvent {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return player; return player;
} }
@ -46,16 +46,16 @@ public class RegisterTeleportEvent extends CustomEvent {
/** /**
* Method getTo. * Method getTo.
* @return Location
*/ * @return Location */
public Location getTo() { public Location getTo() {
return to; return to;
} }
/** /**
* Method getFrom. * Method getFrom.
* @return Location
*/ * @return Location */
public Location getFrom() { public Location getFrom() {
return from; return from;
} }

View File

@ -24,8 +24,8 @@ public class ResetInventoryEvent extends CustomEvent {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return this.player; return this.player;
} }

View File

@ -32,8 +32,8 @@ public class RestoreInventoryEvent extends CustomEvent {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return this.player; return this.player;
} }

View File

@ -34,8 +34,8 @@ public class SpawnTeleportEvent extends CustomEvent {
/** /**
* Method getPlayer. * Method getPlayer.
* @return Player
*/ * @return Player */
public Player getPlayer() { public Player getPlayer() {
return player; return player;
} }
@ -50,24 +50,24 @@ public class SpawnTeleportEvent extends CustomEvent {
/** /**
* Method getTo. * Method getTo.
* @return Location
*/ * @return Location */
public Location getTo() { public Location getTo() {
return to; return to;
} }
/** /**
* Method getFrom. * Method getFrom.
* @return Location
*/ * @return Location */
public Location getFrom() { public Location getFrom() {
return from; return from;
} }
/** /**
* Method isAuthenticated. * Method isAuthenticated.
* @return boolean
*/ * @return boolean */
public boolean isAuthenticated() { public boolean isAuthenticated() {
return isAuthenticated; return isAuthenticated;
} }

View File

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

View File

@ -21,8 +21,8 @@ public class EssSpawn extends CustomConfiguration {
/** /**
* Method getInstance. * Method getInstance.
* @return EssSpawn
*/ * @return EssSpawn */
public static EssSpawn getInstance() { public static EssSpawn getInstance() {
if (spawn == null) { if (spawn == null) {
spawn = new EssSpawn(); spawn = new EssSpawn();
@ -32,8 +32,8 @@ public class EssSpawn extends CustomConfiguration {
/** /**
* Method getLocation. * Method getLocation.
* @return Location
*/ * @return Location */
public Location getLocation() { public Location getLocation() {
try { try {
if (!this.contains("spawns.default.world")) if (!this.contains("spawns.default.world"))

View File

@ -57,8 +57,8 @@ public class AuthMeInventoryPacketAdapter extends PacketAdapter {
/** /**
* Method onPacketSending. * Method onPacketSending.
* @param packetEvent PacketEvent * @param packetEvent PacketEvent
* @see com.comphenix.protocol.events.PacketListener#onPacketSending(PacketEvent)
*/ * @see com.comphenix.protocol.events.PacketListener#onPacketSending(PacketEvent) */
@Override @Override
public void onPacketSending(PacketEvent packetEvent) { public void onPacketSending(PacketEvent packetEvent) {
Player player = packetEvent.getPlayer(); Player player = packetEvent.getPlayer();

View File

@ -18,14 +18,14 @@ public abstract class Module {
/** /**
* Method getName. * Method getName.
* @return String
*/ * @return String */
public abstract String getName(); public abstract String getName();
/** /**
* Method getType. * Method getType.
* @return ModuleType
*/ * @return ModuleType */
public abstract ModuleType getType(); public abstract ModuleType getType();
public void load() { public void load() {

View File

@ -31,8 +31,8 @@ public class ModuleManager {
/** /**
* Method isModuleEnabled. * Method isModuleEnabled.
* @param name String * @param name String
* @return boolean
*/ * @return boolean */
public boolean isModuleEnabled(String name) { public boolean isModuleEnabled(String name) {
for (Module m : modules) { for (Module m : modules) {
if (m.getName().equalsIgnoreCase(name)) if (m.getName().equalsIgnoreCase(name))
@ -44,8 +44,8 @@ public class ModuleManager {
/** /**
* Method isModuleEnabled. * Method isModuleEnabled.
* @param type Module.ModuleType * @param type Module.ModuleType
* @return boolean
*/ * @return boolean */
public boolean isModuleEnabled(Module.ModuleType type) { public boolean isModuleEnabled(Module.ModuleType type) {
for (Module m : modules) { for (Module m : modules) {
if (m.getType() == type) if (m.getType() == type)
@ -57,8 +57,8 @@ public class ModuleManager {
/** /**
* Method getModule. * Method getModule.
* @param name String * @param name String
* @return Module
*/ * @return Module */
public Module getModule(String name) { public Module getModule(String name) {
for (Module m : modules) { for (Module m : modules) {
if (m.getName().equalsIgnoreCase(name)) if (m.getName().equalsIgnoreCase(name))
@ -70,8 +70,8 @@ public class ModuleManager {
/** /**
* Method getModule. * Method getModule.
* @param type Module.ModuleType * @param type Module.ModuleType
* @return Module
*/ * @return Module */
public Module getModule(Module.ModuleType type) { public Module getModule(Module.ModuleType type) {
for (Module m : modules) { for (Module m : modules) {
if (m.getType() == type) if (m.getType() == type)
@ -82,8 +82,8 @@ public class ModuleManager {
/** /**
* Method loadModules. * Method loadModules.
* @return int
*/ * @return int */
public int loadModules() { public int loadModules() {
File dir = Settings.MODULE_FOLDER; File dir = Settings.MODULE_FOLDER;
int count = 0; int count = 0;

View File

@ -91,7 +91,7 @@ public class PermissionsManager {
* Check if the permissions manager is currently hooked into any of the supported permissions systems. * Check if the permissions manager is currently hooked into any of the supported permissions systems.
* *
d. d.
* @return False if there isn't any permissions system used. */ * @return False if there isn't any permissions system used. */
public boolean isEnabled() { public boolean isEnabled() {
return !permsType.equals(PermissionsSystemType.NONE); return !permsType.equals(PermissionsSystemType.NONE);
} }
@ -100,7 +100,7 @@ public class PermissionsManager {
* Return the permissions system where the permissions manager is currently hooked into. * Return the permissions system where the permissions manager is currently hooked into.
* *
e. e.
* @return Permissions system type. */ * @return Permissions system type. */
public PermissionsSystemType getUsedPermissionsSystemType() { public PermissionsSystemType getUsedPermissionsSystemType() {
return this.permsType; return this.permsType;
} }
@ -109,7 +109,7 @@ public class PermissionsManager {
* Setup and hook into the permissions systems. * Setup and hook into the permissions systems.
* *
m. m.
* @return The detected permissions system. */ * @return The detected permissions system. */
public PermissionsSystemType setup() { public PermissionsSystemType setup() {
// Define the plugin manager // Define the plugin manager
final PluginManager pm = this.server.getPluginManager(); final PluginManager pm = this.server.getPluginManager();
@ -246,7 +246,7 @@ public class PermissionsManager {
* Reload the permissions manager, and re-hook all permission plugins. * Reload the permissions manager, and re-hook all permission plugins.
* *
e. e.
* @return True on success, false on failure. */ * @return True on success, false on failure. */
public boolean reload() { public boolean reload() {
// Unhook all permission plugins // Unhook all permission plugins
unhook(); unhook();
@ -300,7 +300,7 @@ public class PermissionsManager {
* Get the logger instance. * Get the logger instance.
* *
e. e.
* @return Logger instance. */ * @return Logger instance. */
public Logger getLogger() { public Logger getLogger() {
return this.log; return this.log;
} }
@ -321,7 +321,7 @@ public class PermissionsManager {
* @param permsNode Permissions node. * @param permsNode Permissions node.
* *
n. n.
* @return True if the player has permission. */ * @return True if the player has permission. */
public boolean hasPermission(Player player, String permsNode) { public boolean hasPermission(Player player, String permsNode) {
return hasPermission(player, permsNode, player.isOp()); return hasPermission(player, permsNode, player.isOp());
} }
@ -334,7 +334,7 @@ public class PermissionsManager {
* @param def Default returned if no permissions system is used. * @param def Default returned if no permissions system is used.
* *
n. n.
* @return True if the player has permission. */ * @return True if the player has permission. */
public boolean hasPermission(Player player, String permsNode, boolean def) { public boolean hasPermission(Player player, String permsNode, boolean def) {
if(!isEnabled()) if(!isEnabled())
// No permissions system is used, return default // No permissions system is used, return default
@ -389,8 +389,8 @@ public class PermissionsManager {
/** /**
* Method getGroups. * Method getGroups.
* @param player Player * @param player Player
* @return List<String> g>
*/ * @return List<String> */
@SuppressWarnings({"unchecked", "rawtypes", "deprecation"}) @SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
public List<String> getGroups(Player player) { public List<String> getGroups(Player player) {
if(!isEnabled()) if(!isEnabled())
@ -461,8 +461,8 @@ public class PermissionsManager {
/** /**
* Method getName. * Method getName.
* @return String ng
*/ * @return String */
public String getName() { public String getName() {
return this.name; return this.name;
} }

View File

@ -255,8 +255,8 @@ public class AsyncronousJoin {
/** /**
* Method needFirstSpawn. * Method needFirstSpawn.
* @return boolean
*/ * @return boolean */
private boolean needFirstSpawn() { private boolean needFirstSpawn() {
if (player.hasPlayedBefore()) if (player.hasPlayedBefore())
return false; return false;

View File

@ -57,16 +57,16 @@ public class AsyncronousLogin {
/** /**
* Method getIP. * Method getIP.
* @return String
*/ * @return String */
protected String getIP() { protected String getIP() {
return plugin.getIP(player); return plugin.getIP(player);
} }
/** /**
* Method needsCaptcha. * Method needsCaptcha.
* @return boolean
*/ * @return boolean */
protected boolean needsCaptcha() { protected boolean needsCaptcha() {
if (Settings.useCaptcha) { if (Settings.useCaptcha) {
if (!plugin.captcha.containsKey(name)) { if (!plugin.captcha.containsKey(name)) {
@ -93,8 +93,8 @@ public class AsyncronousLogin {
/** /**
* Checks the precondition for authentication (like user known) and returns * Checks the precondition for authentication (like user known) and returns
* the playerAuth-State * the playerAuth-State
* @return PlayerAuth
*/ * @return PlayerAuth */
protected PlayerAuth preAuth() { protected PlayerAuth preAuth() {
if (PlayerCache.getInstance().isAuthenticated(name)) { if (PlayerCache.getInstance().isAuthenticated(name)) {
m.send(player, "logged_in"); m.send(player, "logged_in");

View File

@ -54,8 +54,8 @@ public class ProcessSyncronousPlayerLogin implements Runnable {
/** /**
* Method getLimbo. * Method getLimbo.
* @return LimboPlayer
*/ * @return LimboPlayer */
public LimboPlayer getLimbo() { public LimboPlayer getLimbo() {
return limbo; return limbo;
} }

View File

@ -46,17 +46,17 @@ public class AsyncRegister {
/** /**
* Method getIp. * Method getIp.
* @return String
*/ * @return String */
protected String getIp() { protected String getIp() {
return plugin.getIP(player); return plugin.getIP(player);
} }
/** /**
* Method preRegisterCheck. * Method preRegisterCheck.
* @return boolean
* @throws Exception
*/ * @return boolean * @throws Exception */
protected boolean preRegisterCheck() throws Exception { protected boolean preRegisterCheck() throws Exception {
String lowpass = password.toLowerCase(); String lowpass = password.toLowerCase();
if (PlayerCache.getInstance().isAuthenticated(name)) { if (PlayerCache.getInstance().isAuthenticated(name)) {
@ -113,8 +113,8 @@ public class AsyncRegister {
/** /**
* Method emailRegister. * Method emailRegister.
* @throws Exception
*/ * @throws Exception */
protected void emailRegister() throws Exception { protected void emailRegister() throws Exception {
if (Settings.getmaxRegPerEmail > 0) { if (Settings.getmaxRegPerEmail > 0) {
if (!plugin.getPermissionsManager().hasPermission(player, "authme.allow2accounts") && database.getAllAuthsByEmail(email).size() >= Settings.getmaxRegPerEmail) { if (!plugin.getPermissionsManager().hasPermission(player, "authme.allow2accounts") && database.getAllAuthsByEmail(email).size() >= Settings.getmaxRegPerEmail) {

View File

@ -52,8 +52,8 @@ public class AsyncronousUnregister {
/** /**
* Method getIp. * Method getIp.
* @return String
*/ * @return String */
protected String getIp() { protected String getIp() {
return plugin.getIP(player); return plugin.getIP(player);
} }

View File

@ -47,8 +47,8 @@ public enum HashAlgorithm {
/** /**
* Method getclasse. * Method getclasse.
* @return Class<?>
*/ * @return Class<?> */
public Class<?> getclasse() { public Class<?> getclasse() {
return classe; return classe;
} }

View File

@ -25,9 +25,9 @@ public class PasswordSecurity {
/** /**
* Method createSalt. * Method createSalt.
* @param length int * @param length int
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
public static String createSalt(int length) public static String createSalt(int length)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
byte[] msg = new byte[40]; byte[] msg = new byte[40];
@ -43,9 +43,9 @@ public class PasswordSecurity {
* @param alg HashAlgorithm * @param alg HashAlgorithm
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
public static String getHash(HashAlgorithm alg, String password, public static String getHash(HashAlgorithm alg, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
EncryptionMethod method; EncryptionMethod method;
@ -146,9 +146,9 @@ public class PasswordSecurity {
* @param password String * @param password String
* @param hash String * @param hash String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
*/ * @return boolean * @throws NoSuchAlgorithmException */
public static boolean comparePasswordWithHash(String password, String hash, public static boolean comparePasswordWithHash(String password, String hash,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
HashAlgorithm algo = Settings.getPasswordHash; HashAlgorithm algo = Settings.getPasswordHash;
@ -184,9 +184,9 @@ public class PasswordSecurity {
* @param password String * @param password String
* @param hash String * @param hash String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
*/ * @return boolean * @throws NoSuchAlgorithmException */
private static boolean compareWithAllEncryptionMethod(String password, private static boolean compareWithAllEncryptionMethod(String password,
String hash, String playerName) throws NoSuchAlgorithmException { String hash, String playerName) throws NoSuchAlgorithmException {
for (HashAlgorithm algo : HashAlgorithm.values()) { for (HashAlgorithm algo : HashAlgorithm.values()) {

View File

@ -36,8 +36,8 @@ public class RandomString {
/** /**
* Method nextString. * Method nextString.
* @return String
*/ * @return String */
public String nextString() { public String nextString() {
for (int idx = 0; idx < buf.length; ++idx) for (int idx = 0; idx < buf.length; ++idx)
buf[idx] = chars[random.nextInt(chars.length)]; buf[idx] = chars[random.nextInt(chars.length)];

View File

@ -94,7 +94,8 @@ public class BCRYPT implements EncryptionMethod {
* @param len the number of bytes to encode * @param len the number of bytes to encode
* @return base64-encoded string * @throws IllegalArgumentException if the length is invalid */ * @return base64-encoded string * @throws IllegalArgumentException if the length is invalid * @throws IllegalArgumentException
*/
private static String encode_base64(byte d[], int len) private static String encode_base64(byte d[], int len)
throws IllegalArgumentException { throws IllegalArgumentException {
int off = 0; int off = 0;
@ -150,7 +151,8 @@ public class BCRYPT implements EncryptionMethod {
* @param maxolen the maximum number of bytes to decode * @param maxolen the maximum number of bytes to decode
* @return an array containing the decoded bytes * @throws IllegalArgumentException if maxolen is invalid */ * @return an array containing the decoded bytes * @throws IllegalArgumentException if maxolen is invalid * @throws IllegalArgumentException
*/
private static byte[] decode_base64(String s, int maxolen) private static byte[] decode_base64(String s, int maxolen)
throws IllegalArgumentException { throws IllegalArgumentException {
StringBuffer rs = new StringBuffer(); StringBuffer rs = new StringBuffer();
@ -474,8 +476,8 @@ public class BCRYPT implements EncryptionMethod {
* @param hashed the previously-hashed password * @param hashed the previously-hashed password
* @param rounds number of rounds to hash the password * @param rounds number of rounds to hash the password
* @return boolean
*/ * @return boolean */
public static boolean checkpw(String text, String hashed, int rounds) { public static boolean checkpw(String text, String hashed, int rounds) {
boolean matched = false; boolean matched = false;
@ -499,10 +501,10 @@ public class BCRYPT implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -514,10 +516,10 @@ public class BCRYPT implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -528,8 +530,8 @@ public class BCRYPT implements EncryptionMethod {
* Method getDoubleHash. * Method getDoubleHash.
* @param text String * @param text String
* @param salt String * @param salt String
* @return String
*/ * @return String */
public static String getDoubleHash(String text, String salt) { public static String getDoubleHash(String text, String salt) {
String hash = hashpw(text, salt); String hash = hashpw(text, salt);
return hashpw(text, hash); return hashpw(text, hash);

View File

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

View File

@ -16,10 +16,10 @@ public class CRAZYCRYPT1 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -36,10 +36,7 @@ public class CRAZYCRYPT1 implements EncryptionMethod {
* Method comparePassword. * Method comparePassword.
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName Stringooleaneptiontring) * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ */
@Override @Override
@ -49,8 +46,7 @@ public class CRAZYCRYPT1 implements EncryptionMethod {
} }
/** /**
* Method byteArrayToHexString. * Method byteArrayToHexString.
* @param args byte[] * @param args byte[]String * @return String
* @return String
*/ */
public static String byteArrayToHexString(final byte... args) { public static String byteArrayToHexString(final byte... args) {

View File

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

View File

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

View File

@ -13,10 +13,10 @@ public class DOUBLEMD5 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class DOUBLEMD5 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -41,9 +41,9 @@ public class DOUBLEMD5 implements EncryptionMethod {
/** /**
* Method getMD5. * Method getMD5.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getMD5(String message) private static String getMD5(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5"); MessageDigest md5 = MessageDigest.getInstance("MD5");

View File

@ -26,7 +26,8 @@ public interface EncryptionMethod {
* @param name String * @param name String
* @return Hashing password * @throws NoSuchAlgorithmException */ * @return Hashing password * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
String getHash(String password, String salt, String name) String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException; throws NoSuchAlgorithmException;
@ -36,7 +37,8 @@ public interface EncryptionMethod {
* @param playerName * @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) boolean comparePassword(String hash, String password, String playerName)
throws NoSuchAlgorithmException; throws NoSuchAlgorithmException;

View File

@ -15,10 +15,10 @@ public class IPB3 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -30,10 +30,10 @@ public class IPB3 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -44,9 +44,9 @@ public class IPB3 implements EncryptionMethod {
/** /**
* Method getMD5. * Method getMD5.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getMD5(String message) private static String getMD5(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5"); MessageDigest md5 = MessageDigest.getInstance("MD5");

View File

@ -13,10 +13,10 @@ public class JOOMLA implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class JOOMLA implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -42,9 +42,9 @@ public class JOOMLA implements EncryptionMethod {
/** /**
* Method getMD5. * Method getMD5.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getMD5(String message) private static String getMD5(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5"); MessageDigest md5 = MessageDigest.getInstance("MD5");

View File

@ -13,10 +13,10 @@ public class MD5 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class MD5 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -41,9 +41,9 @@ public class MD5 implements EncryptionMethod {
/** /**
* Method getMD5. * Method getMD5.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getMD5(String message) private static String getMD5(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5"); MessageDigest md5 = MessageDigest.getInstance("MD5");

View File

@ -13,10 +13,10 @@ public class MD5VB implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class MD5VB implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -42,9 +42,9 @@ public class MD5VB implements EncryptionMethod {
/** /**
* Method getMD5. * Method getMD5.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getMD5(String message) private static String getMD5(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5"); MessageDigest md5 = MessageDigest.getInstance("MD5");

View File

@ -15,10 +15,10 @@ public class MYBB implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -30,10 +30,10 @@ public class MYBB implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -44,9 +44,9 @@ public class MYBB implements EncryptionMethod {
/** /**
* Method getMD5. * Method getMD5.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getMD5(String message) private static String getMD5(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5"); MessageDigest md5 = MessageDigest.getInstance("MD5");

View File

@ -21,8 +21,8 @@ public class PHPBB implements EncryptionMethod {
* Method phpbb_hash. * Method phpbb_hash.
* @param password String * @param password String
* @param salt String * @param salt String
* @return String
*/ * @return String */
public String phpbb_hash(String password, String salt) { public String phpbb_hash(String password, String salt) {
String random_state = salt; String random_state = salt;
StringBuilder random = new StringBuilder(); StringBuilder random = new StringBuilder();
@ -42,8 +42,8 @@ public class PHPBB implements EncryptionMethod {
* Method _hash_gensalt_private. * Method _hash_gensalt_private.
* @param input String * @param input String
* @param itoa64 String * @param itoa64 String
* @return String
*/ * @return String */
private String _hash_gensalt_private(String input, String itoa64) { private String _hash_gensalt_private(String input, String itoa64) {
return _hash_gensalt_private(input, itoa64, 6); return _hash_gensalt_private(input, itoa64, 6);
} }
@ -53,8 +53,8 @@ public class PHPBB implements EncryptionMethod {
* @param input String * @param input String
* @param itoa64 String * @param itoa64 String
* @param iteration_count_log2 int * @param iteration_count_log2 int
* @return String
*/ * @return String */
private String _hash_gensalt_private(String input, String itoa64, private String _hash_gensalt_private(String input, String itoa64,
int iteration_count_log2) { int iteration_count_log2) {
if (iteration_count_log2 < 4 || iteration_count_log2 > 31) { if (iteration_count_log2 < 4 || iteration_count_log2 > 31) {
@ -70,8 +70,8 @@ public class PHPBB implements EncryptionMethod {
* Encode hash * Encode hash
* @param input String * @param input String
* @param count int * @param count int
* @return String
*/ * @return String */
private String _hash_encode64(String input, int count) { private String _hash_encode64(String input, int count) {
StringBuilder output = new StringBuilder(); StringBuilder output = new StringBuilder();
int i = 0; int i = 0;
@ -97,8 +97,8 @@ public class PHPBB implements EncryptionMethod {
* Method _hash_crypt_private. * Method _hash_crypt_private.
* @param password String * @param password String
* @param setting String * @param setting String
* @return String
*/ * @return String */
String _hash_crypt_private(String password, String setting) { String _hash_crypt_private(String password, String setting) {
String output = "*"; String output = "*";
if (!setting.substring(0, 3).equals("$H$")) if (!setting.substring(0, 3).equals("$H$"))
@ -124,8 +124,8 @@ public class PHPBB implements EncryptionMethod {
* Method phpbb_check_hash. * Method phpbb_check_hash.
* @param password String * @param password String
* @param hash String * @param hash String
* @return boolean
*/ * @return boolean */
public boolean phpbb_check_hash(String password, String hash) { public boolean phpbb_check_hash(String password, String hash) {
if (hash.length() == 34) if (hash.length() == 34)
return _hash_crypt_private(password, hash).equals(hash); return _hash_crypt_private(password, hash).equals(hash);
@ -135,8 +135,8 @@ public class PHPBB implements EncryptionMethod {
/** /**
* Method md5. * Method md5.
* @param data String * @param data String
* @return String
*/ * @return String */
public static String md5(String data) { public static String md5(String data) {
try { try {
byte[] bytes = data.getBytes("ISO-8859-1"); byte[] bytes = data.getBytes("ISO-8859-1");
@ -151,8 +151,8 @@ public class PHPBB implements EncryptionMethod {
/** /**
* Method hexToInt. * Method hexToInt.
* @param ch char * @param ch char
* @return int
*/ * @return int */
static int hexToInt(char ch) { static int hexToInt(char ch) {
if (ch >= '0' && ch <= '9') if (ch >= '0' && ch <= '9')
return ch - '0'; return ch - '0';
@ -165,8 +165,8 @@ public class PHPBB implements EncryptionMethod {
/** /**
* Method bytes2hex. * Method bytes2hex.
* @param bytes byte[] * @param bytes byte[]
* @return String
*/ * @return String */
private static String bytes2hex(byte[] bytes) { private static String bytes2hex(byte[] bytes) {
StringBuilder r = new StringBuilder(32); StringBuilder r = new StringBuilder(32);
for (byte b : bytes) { for (byte b : bytes) {
@ -181,8 +181,8 @@ public class PHPBB implements EncryptionMethod {
/** /**
* Method pack. * Method pack.
* @param hex String * @param hex String
* @return String
*/ * @return String */
static String pack(String hex) { static String pack(String hex) {
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
for (int i = 0; i < hex.length(); i += 2) { for (int i = 0; i < hex.length(); i += 2) {
@ -199,10 +199,10 @@ public class PHPBB implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -214,10 +214,10 @@ public class PHPBB implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {

View File

@ -20,10 +20,10 @@ public class PHPFUSION implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -56,10 +56,10 @@ public class PHPFUSION implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -70,9 +70,9 @@ public class PHPFUSION implements EncryptionMethod {
/** /**
* Method getSHA1. * Method getSHA1.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getSHA1(String message) private static String getSHA1(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest sha1 = MessageDigest.getInstance("SHA1"); MessageDigest sha1 = MessageDigest.getInstance("SHA1");

View File

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

View File

@ -12,10 +12,10 @@ public class ROYALAUTH implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,9 +28,9 @@ public class ROYALAUTH implements EncryptionMethod {
* Method hash. * Method hash.
* @param password String * @param password String
* @param salt String * @param salt String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
public String hash(String password, String salt) public String hash(String password, String salt)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest md = MessageDigest.getInstance("SHA-512"); MessageDigest md = MessageDigest.getInstance("SHA-512");
@ -47,10 +47,10 @@ public class ROYALAUTH implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {

View File

@ -15,10 +15,10 @@ public class SALTED2MD5 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -30,10 +30,10 @@ public class SALTED2MD5 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -44,9 +44,9 @@ public class SALTED2MD5 implements EncryptionMethod {
/** /**
* Method getMD5. * Method getMD5.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getMD5(String message) private static String getMD5(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest md5 = MessageDigest.getInstance("MD5"); MessageDigest md5 = MessageDigest.getInstance("MD5");

View File

@ -15,10 +15,10 @@ public class SALTEDSHA512 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -30,10 +30,10 @@ public class SALTEDSHA512 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -44,9 +44,9 @@ public class SALTEDSHA512 implements EncryptionMethod {
/** /**
* Method getSHA512. * Method getSHA512.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getSHA512(String message) private static String getSHA512(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest sha512 = MessageDigest.getInstance("SHA-512"); MessageDigest sha512 = MessageDigest.getInstance("SHA-512");

View File

@ -13,10 +13,10 @@ public class SHA1 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class SHA1 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -41,9 +41,9 @@ public class SHA1 implements EncryptionMethod {
/** /**
* Method getSHA1. * Method getSHA1.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getSHA1(String message) private static String getSHA1(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest sha1 = MessageDigest.getInstance("SHA1"); MessageDigest sha1 = MessageDigest.getInstance("SHA1");

View File

@ -13,10 +13,10 @@ public class SHA256 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class SHA256 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -42,9 +42,9 @@ public class SHA256 implements EncryptionMethod {
/** /**
* Method getSHA256. * Method getSHA256.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getSHA256(String message) private static String getSHA256(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest sha256 = MessageDigest.getInstance("SHA-256"); MessageDigest sha256 = MessageDigest.getInstance("SHA-256");

View File

@ -13,10 +13,10 @@ public class SHA512 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class SHA512 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -41,9 +41,9 @@ public class SHA512 implements EncryptionMethod {
/** /**
* Method getSHA512. * Method getSHA512.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getSHA512(String message) private static String getSHA512(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest sha512 = MessageDigest.getInstance("SHA-512"); MessageDigest sha512 = MessageDigest.getInstance("SHA-512");

View File

@ -13,10 +13,10 @@ public class SMF implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class SMF implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -41,9 +41,9 @@ public class SMF implements EncryptionMethod {
/** /**
* Method getSHA1. * Method getSHA1.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getSHA1(String message) private static String getSHA1(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest sha1 = MessageDigest.getInstance("SHA1"); MessageDigest sha1 = MessageDigest.getInstance("SHA1");

View File

@ -15,10 +15,10 @@ public class WBB3 implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -30,10 +30,10 @@ public class WBB3 implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -44,9 +44,9 @@ public class WBB3 implements EncryptionMethod {
/** /**
* Method getSHA1. * Method getSHA1.
* @param message String * @param message String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
private static String getSHA1(String message) private static String getSHA1(String message)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
MessageDigest sha1 = MessageDigest.getInstance("SHA1"); MessageDigest sha1 = MessageDigest.getInstance("SHA1");

View File

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

View File

@ -379,8 +379,8 @@ public class WHIRLPOOL implements EncryptionMethod {
/** /**
* Method display. * Method display.
* @param array byte[] * @param array byte[]
* @return String
*/ * @return String */
protected static String display(byte[] array) { protected static String display(byte[] array) {
char[] val = new char[2 * array.length]; char[] val = new char[2 * array.length];
String hex = "0123456789ABCDEF"; String hex = "0123456789ABCDEF";
@ -397,10 +397,10 @@ public class WHIRLPOOL implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -416,10 +416,10 @@ public class WHIRLPOOL implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {

View File

@ -17,8 +17,8 @@ public class WORDPRESS implements EncryptionMethod {
* Method encode64. * Method encode64.
* @param src byte[] * @param src byte[]
* @param count int * @param count int
* @return String
*/ * @return String */
private String encode64(byte[] src, int count) { private String encode64(byte[] src, int count) {
int i, value; int i, value;
StringBuilder output = new StringBuilder(); StringBuilder output = new StringBuilder();
@ -57,8 +57,8 @@ public class WORDPRESS implements EncryptionMethod {
* Method crypt. * Method crypt.
* @param password String * @param password String
* @param setting String * @param setting String
* @return String
*/ * @return String */
private String crypt(String password, String setting) { private String crypt(String password, String setting) {
String output = "*0"; String output = "*0";
if (((setting.length() < 2) ? setting : setting.substring(0, 2)).equalsIgnoreCase(output)) { if (((setting.length() < 2) ? setting : setting.substring(0, 2)).equalsIgnoreCase(output)) {
@ -100,8 +100,8 @@ public class WORDPRESS implements EncryptionMethod {
/** /**
* Method gensaltPrivate. * Method gensaltPrivate.
* @param input byte[] * @param input byte[]
* @return String
*/ * @return String */
private String gensaltPrivate(byte[] input) { private String gensaltPrivate(byte[] input) {
String output = "$P$"; String output = "$P$";
int iterationCountLog2 = 8; int iterationCountLog2 = 8;
@ -113,8 +113,8 @@ public class WORDPRESS implements EncryptionMethod {
/** /**
* Method stringToUtf8. * Method stringToUtf8.
* @param string String * @param string String
* @return byte[]
*/ * @return byte[] */
private byte[] stringToUtf8(String string) { private byte[] stringToUtf8(String string) {
try { try {
return string.getBytes("UTF-8"); return string.getBytes("UTF-8");
@ -128,10 +128,10 @@ public class WORDPRESS implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -145,10 +145,10 @@ public class WORDPRESS implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {

View File

@ -11,10 +11,10 @@ public class XAUTH implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -28,10 +28,10 @@ public class XAUTH implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -43,8 +43,8 @@ public class XAUTH implements EncryptionMethod {
/** /**
* Method getWhirlpool. * Method getWhirlpool.
* @param message String * @param message String
* @return String
*/ * @return String */
public static String getWhirlpool(String message) { public static String getWhirlpool(String message) {
WHIRLPOOL w = new WHIRLPOOL(); WHIRLPOOL w = new WHIRLPOOL();
byte[] digest = new byte[WHIRLPOOL.DIGESTBYTES]; byte[] digest = new byte[WHIRLPOOL.DIGESTBYTES];

View File

@ -18,10 +18,10 @@ public class XF implements EncryptionMethod {
* @param password String * @param password String
* @param salt String * @param salt String
* @param name String * @param name String
* @return String
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String)
*/ * @return String * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#getHash(String, String, String) */
@Override @Override
public String getHash(String password, String salt, String name) public String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException { throws NoSuchAlgorithmException {
@ -33,10 +33,10 @@ public class XF implements EncryptionMethod {
* @param hash String * @param hash String
* @param password String * @param password String
* @param playerName String * @param playerName String
* @return boolean
* @throws NoSuchAlgorithmException
* @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String)
*/ * @return boolean * @throws NoSuchAlgorithmException * @see fr.xephi.authme.security.crypts.EncryptionMethod#comparePassword(String, String, String) */
@Override @Override
public boolean comparePassword(String hash, String password, public boolean comparePassword(String hash, String password,
String playerName) throws NoSuchAlgorithmException { String playerName) throws NoSuchAlgorithmException {
@ -47,9 +47,9 @@ public class XF implements EncryptionMethod {
/** /**
* Method getSHA256. * Method getSHA256.
* @param password String * @param password String
* @return String
* @throws NoSuchAlgorithmException
*/ * @return String * @throws NoSuchAlgorithmException */
public String getSHA256(String password) throws NoSuchAlgorithmException { public String getSHA256(String password) throws NoSuchAlgorithmException {
MessageDigest md = MessageDigest.getInstance("SHA-256"); MessageDigest md = MessageDigest.getInstance("SHA-256");
md.update(password.getBytes()); md.update(password.getBytes());
@ -73,8 +73,8 @@ public class XF implements EncryptionMethod {
* Method regmatch. * Method regmatch.
* @param pattern String * @param pattern String
* @param line String * @param line String
* @return String
*/ * @return String */
public String regmatch(String pattern, String line) { public String regmatch(String pattern, String line) {
List<String> allMatches = new ArrayList<>(); List<String> allMatches = new ArrayList<>();
Matcher m = Pattern.compile(pattern).matcher(line); Matcher m = Pattern.compile(pattern).matcher(line);

View File

@ -83,9 +83,9 @@ public class MacBasedPRF implements PRF {
/** /**
* Method doFinal. * Method doFinal.
* @param M byte[] * @param M byte[]
* @return byte[]
* @see fr.xephi.authme.security.pbkdf2.PRF#doFinal(byte[])
*/ * @return byte[] * @see fr.xephi.authme.security.pbkdf2.PRF#doFinal(byte[]) */
public byte[] doFinal(byte[] M) { public byte[] doFinal(byte[] M) {
byte[] r = mac.doFinal(M); byte[] r = mac.doFinal(M);
return r; return r;
@ -93,9 +93,9 @@ public class MacBasedPRF implements PRF {
/** /**
* Method getHLen. * 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() { public int getHLen() {
return hLen; return hLen;
} }
@ -103,8 +103,8 @@ public class MacBasedPRF implements PRF {
/** /**
* Method init. * Method init.
* @param P byte[] * @param P byte[]
* @see fr.xephi.authme.security.pbkdf2.PRF#init(byte[])
*/ * @see fr.xephi.authme.security.pbkdf2.PRF#init(byte[]) */
public void init(byte[] P) { public void init(byte[] P) {
try { try {
mac.init(new SecretKeySpec(P, macAlgorithm)); mac.init(new SecretKeySpec(P, macAlgorithm));

View File

@ -115,9 +115,9 @@ public class PBKDF2Engine implements PBKDF2 {
/** /**
* Method deriveKey. * Method deriveKey.
* @param inputPassword String * @param inputPassword String
* @return byte[]
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String)
*/ * @return byte[] * @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String) */
public byte[] deriveKey(String inputPassword) { public byte[] deriveKey(String inputPassword) {
return deriveKey(inputPassword, 0); return deriveKey(inputPassword, 0);
} }
@ -126,9 +126,9 @@ public class PBKDF2Engine implements PBKDF2 {
* Method deriveKey. * Method deriveKey.
* @param inputPassword String * @param inputPassword String
* @param dkLen int * @param dkLen int
* @return byte[]
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String, int)
*/ * @return byte[] * @see fr.xephi.authme.security.pbkdf2.PBKDF2#deriveKey(String, int) */
public byte[] deriveKey(String inputPassword, int dkLen) { public byte[] deriveKey(String inputPassword, int dkLen) {
byte[] r = null; byte[] r = null;
byte P[] = null; byte P[] = null;
@ -156,9 +156,9 @@ public class PBKDF2Engine implements PBKDF2 {
/** /**
* Method verifyKey. * Method verifyKey.
* @param inputPassword String * @param inputPassword String
* @return boolean
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#verifyKey(String)
*/ * @return boolean * @see fr.xephi.authme.security.pbkdf2.PBKDF2#verifyKey(String) */
public boolean verifyKey(String inputPassword) { public boolean verifyKey(String inputPassword) {
byte[] referenceKey = getParameters().getDerivedKey(); byte[] referenceKey = getParameters().getDerivedKey();
if (referenceKey == null || referenceKey.length == 0) { if (referenceKey == null || referenceKey.length == 0) {
@ -193,9 +193,9 @@ public class PBKDF2Engine implements PBKDF2 {
/** /**
* Method getPseudoRandomFunction. * 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() { public PRF getPseudoRandomFunction() {
return prf; return prf;
} }
@ -318,9 +318,9 @@ public class PBKDF2Engine implements PBKDF2 {
/** /**
* Method getParameters. * 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() { public PBKDF2Parameters getParameters() {
return parameters; return parameters;
} }
@ -328,8 +328,8 @@ public class PBKDF2Engine implements PBKDF2 {
/** /**
* Method setParameters. * Method setParameters.
* @param parameters PBKDF2Parameters * @param parameters PBKDF2Parameters
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#setParameters(PBKDF2Parameters)
*/ * @see fr.xephi.authme.security.pbkdf2.PBKDF2#setParameters(PBKDF2Parameters) */
public void setParameters(PBKDF2Parameters parameters) { public void setParameters(PBKDF2Parameters parameters) {
this.parameters = parameters; this.parameters = parameters;
} }
@ -337,8 +337,8 @@ public class PBKDF2Engine implements PBKDF2 {
/** /**
* Method setPseudoRandomFunction. * Method setPseudoRandomFunction.
* @param prf PRF * @param prf PRF
* @see fr.xephi.authme.security.pbkdf2.PBKDF2#setPseudoRandomFunction(PRF)
*/ * @see fr.xephi.authme.security.pbkdf2.PBKDF2#setPseudoRandomFunction(PRF) */
public void setPseudoRandomFunction(PRF prf) { public void setPseudoRandomFunction(PRF prf) {
this.prf = prf; this.prf = prf;
} }
@ -357,7 +357,8 @@ public class PBKDF2Engine implements PBKDF2 {
* Supply the password as argument. * Supply the password as argument.
* @throws IOException * @throws NoSuchAlgorithmException */ * @throws IOException * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
public static void main(String[] args) public static void main(String[] args)
throws IOException, NoSuchAlgorithmException { throws IOException, NoSuchAlgorithmException {
String password = "password"; String password = "password";

View File

@ -37,9 +37,9 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter {
* Method fromString. * Method fromString.
* @param p PBKDF2Parameters * @param p PBKDF2Parameters
* @param s String * @param s String
* @return boolean
* @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#fromString(PBKDF2Parameters, String)
*/ * @return boolean * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#fromString(PBKDF2Parameters, String) */
public boolean fromString(PBKDF2Parameters p, String s) { public boolean fromString(PBKDF2Parameters p, String s) {
if (p == null || s == null) { if (p == null || s == null) {
return true; return true;
@ -63,9 +63,9 @@ public class PBKDF2HexFormatter implements PBKDF2Formatter {
/** /**
* Method toString. * Method toString.
* @param p PBKDF2Parameters * @param p PBKDF2Parameters
* @return String
* @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#toString(PBKDF2Parameters)
*/ * @return String * @see fr.xephi.authme.security.pbkdf2.PBKDF2Formatter#toString(PBKDF2Parameters) */
public String toString(PBKDF2Parameters p) { public String toString(PBKDF2Parameters p) {
String s = BinTools.bin2hex(p.getSalt()) + ":" + String.valueOf(p.getIterationCount()) + ":" + BinTools.bin2hex(p.getDerivedKey()); String s = BinTools.bin2hex(p.getSalt()) + ":" + String.valueOf(p.getIterationCount()) + ":" + BinTools.bin2hex(p.getDerivedKey());
return s; return s;

View File

@ -111,8 +111,8 @@ public class PBKDF2Parameters {
/** /**
* Method getIterationCount. * Method getIterationCount.
* @return int
*/ * @return int */
public int getIterationCount() { public int getIterationCount() {
return iterationCount; return iterationCount;
} }
@ -127,8 +127,8 @@ public class PBKDF2Parameters {
/** /**
* Method getSalt. * Method getSalt.
* @return byte[]
*/ * @return byte[] */
public byte[] getSalt() { public byte[] getSalt() {
return salt; return salt;
} }
@ -143,8 +143,8 @@ public class PBKDF2Parameters {
/** /**
* Method getDerivedKey. * Method getDerivedKey.
* @return byte[]
*/ * @return byte[] */
public byte[] getDerivedKey() { public byte[] getDerivedKey() {
return derivedKey; return derivedKey;
} }
@ -159,8 +159,8 @@ public class PBKDF2Parameters {
/** /**
* Method getHashAlgorithm. * Method getHashAlgorithm.
* @return String
*/ * @return String */
public String getHashAlgorithm() { public String getHashAlgorithm() {
return hashAlgorithm; return hashAlgorithm;
} }
@ -175,8 +175,8 @@ public class PBKDF2Parameters {
/** /**
* Method getHashCharset. * Method getHashCharset.
* @return String
*/ * @return String */
public String getHashCharset() { public String getHashCharset() {
return hashCharset; return hashCharset;
} }

View File

@ -43,8 +43,8 @@ public class CustomConfiguration extends YamlConfiguration {
/** /**
* Method reLoad. * Method reLoad.
* @return boolean
*/ * @return boolean */
public boolean reLoad() { public boolean reLoad() {
boolean out = true; boolean out = true;
if (!configFile.exists()) { if (!configFile.exists()) {
@ -65,8 +65,8 @@ public class CustomConfiguration extends YamlConfiguration {
/** /**
* Method getConfigFile. * Method getConfigFile.
* @return File
*/ * @return File */
public File getConfigFile() { public File getConfigFile() {
return configFile; return configFile;
} }
@ -74,8 +74,8 @@ public class CustomConfiguration extends YamlConfiguration {
/** /**
* Method loadResource. * Method loadResource.
* @param file File * @param file File
* @return boolean
*/ * @return boolean */
public boolean loadResource(File file) { public boolean loadResource(File file) {
if (!file.exists()) { if (!file.exists()) {
try { try {

View File

@ -46,8 +46,8 @@ public class Messages extends CustomConfiguration {
/** /**
* Method send. * Method send.
* @param msg String * @param msg String
* @return String[]
*/ * @return String[] */
public String[] send(String msg) { public String[] send(String msg) {
if (!Settings.messagesLanguage.equalsIgnoreCase(singleton.lang)) { if (!Settings.messagesLanguage.equalsIgnoreCase(singleton.lang)) {
singleton.reloadMessages(); singleton.reloadMessages();
@ -73,8 +73,8 @@ public class Messages extends CustomConfiguration {
/** /**
* Method getInstance. * Method getInstance.
* @return Messages
*/ * @return Messages */
public static Messages getInstance() { public static Messages getInstance() {
if (singleton == null) { if (singleton == null) {
singleton = new Messages(Settings.messageFile, Settings.messagesLanguage); singleton = new Messages(Settings.messageFile, Settings.messagesLanguage);

View File

@ -35,8 +35,8 @@ public class OtherAccounts extends CustomConfiguration {
/** /**
* Method getInstance. * Method getInstance.
* @return OtherAccounts
*/ * @return OtherAccounts */
public static OtherAccounts getInstance() { public static OtherAccounts getInstance() {
if (others == null) { if (others == null) {
others = new OtherAccounts(); others = new OtherAccounts();
@ -83,8 +83,8 @@ public class OtherAccounts extends CustomConfiguration {
/** /**
* Method getAllPlayersByUUID. * Method getAllPlayersByUUID.
* @param uuid UUID * @param uuid UUID
* @return List<String>
*/ * @return List<String> */
public List<String> getAllPlayersByUUID(UUID uuid) { public List<String> getAllPlayersByUUID(UUID uuid) {
return this.getStringList(uuid.toString()); return this.getStringList(uuid.toString());
} }

View File

@ -118,8 +118,8 @@ public final class Settings extends YamlConfiguration {
/** /**
* Method reload. * Method reload.
* @throws Exception
*/ * @throws Exception */
public static void reload() throws Exception { public static void reload() throws Exception {
plugin.getLogger().info("Loading Configuration File..."); plugin.getLogger().info("Loading Configuration File...");
boolean exist = SETTINGS_FILE.exists(); boolean exist = SETTINGS_FILE.exists();
@ -524,8 +524,8 @@ public final class Settings extends YamlConfiguration {
/** /**
* Method getPasswordHash. * Method getPasswordHash.
* @return HashAlgorithm
*/ * @return HashAlgorithm */
private static HashAlgorithm getPasswordHash() { private static HashAlgorithm getPasswordHash() {
String key = "settings.security.passwordHash"; String key = "settings.security.passwordHash";
try { try {
@ -538,8 +538,8 @@ public final class Settings extends YamlConfiguration {
/** /**
* Method getDataSource. * Method getDataSource.
* @return DataSourceType
*/ * @return DataSourceType */
private static DataSourceType getDataSource() { private static DataSourceType getDataSource() {
String key = "DataSource.backend"; String key = "DataSource.backend";
try { try {
@ -556,8 +556,8 @@ public final class Settings extends YamlConfiguration {
* server, so player has a restricted access * server, so player has a restricted access
* @param name String * @param name String
* @param ip String * @param ip String
* @return boolean
*/ * @return boolean */
public static boolean getRestrictedIp(String name, String ip) { public static boolean getRestrictedIp(String name, String ip) {
Iterator<String> iter = getRestrictedIp.iterator(); Iterator<String> iter = getRestrictedIp.iterator();
@ -610,8 +610,8 @@ public final class Settings extends YamlConfiguration {
/** /**
* Method checkLang. * Method checkLang.
* @param lang String * @param lang String
* @return String
*/ * @return String */
public static String checkLang(String lang) { public static String checkLang(String lang) {
if (new File(PLUGIN_FOLDER, "messages" + File.separator + "messages_" + lang + ".yml").exists()) { if (new File(PLUGIN_FOLDER, "messages" + File.separator + "messages_" + lang + ".yml").exists()) {
ConsoleLogger.info("Set Language to: " + lang); ConsoleLogger.info("Set Language to: " + lang);
@ -673,8 +673,8 @@ public final class Settings extends YamlConfiguration {
/** /**
* Method isEmailCorrect. * Method isEmailCorrect.
* @param email String * @param email String
* @return boolean
*/ * @return boolean */
public static boolean isEmailCorrect(String email) { public static boolean isEmailCorrect(String email) {
if (!email.contains("@")) if (!email.contains("@"))
return false; return false;

View File

@ -45,8 +45,8 @@ public class Spawn extends CustomConfiguration {
/** /**
* Method getInstance. * Method getInstance.
* @return Spawn
*/ * @return Spawn */
public static Spawn getInstance() { public static Spawn getInstance() {
if (spawn == null) { if (spawn == null) {
spawn = new Spawn(); spawn = new Spawn();
@ -57,8 +57,8 @@ public class Spawn extends CustomConfiguration {
/** /**
* Method setSpawn. * Method setSpawn.
* @param location Location * @param location Location
* @return boolean
*/ * @return boolean */
public boolean setSpawn(Location location) { public boolean setSpawn(Location location) {
try { try {
set("spawn.world", location.getWorld().getName()); set("spawn.world", location.getWorld().getName());
@ -77,8 +77,8 @@ public class Spawn extends CustomConfiguration {
/** /**
* Method setFirstSpawn. * Method setFirstSpawn.
* @param location Location * @param location Location
* @return boolean
*/ * @return boolean */
public boolean setFirstSpawn(Location location) { public boolean setFirstSpawn(Location location) {
try { try {
set("firstspawn.world", location.getWorld().getName()); set("firstspawn.world", location.getWorld().getName());
@ -96,8 +96,8 @@ public class Spawn extends CustomConfiguration {
/** /**
* Method getLocation. * Method getLocation.
* @return Location
*/ * @return Location */
@Deprecated @Deprecated
public Location getLocation() { public Location getLocation() {
return getSpawn(); return getSpawn();
@ -105,8 +105,8 @@ public class Spawn extends CustomConfiguration {
/** /**
* Method getSpawn. * Method getSpawn.
* @return Location
*/ * @return Location */
public Location getSpawn() { public Location getSpawn() {
try { try {
if (this.getString("spawn.world").isEmpty() || this.getString("spawn.world").equals("")) if (this.getString("spawn.world").isEmpty() || this.getString("spawn.world").equals(""))
@ -120,8 +120,8 @@ public class Spawn extends CustomConfiguration {
/** /**
* Method getFirstSpawn. * Method getFirstSpawn.
* @return Location
*/ * @return Location */
public Location getFirstSpawn() { public Location getFirstSpawn() {
try { try {
if (this.getString("firstspawn.world").isEmpty() || this.getString("firstspawn.world").equals("")) if (this.getString("firstspawn.world").isEmpty() || this.getString("firstspawn.world").equals(""))

View File

@ -30,8 +30,8 @@ public class TimeoutTask implements Runnable {
/** /**
* Method getName. * Method getName.
* @return String
*/ * @return String */
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -32,8 +32,8 @@ public class StringUtils {
* Method containsAny. * Method containsAny.
* @param str String * @param str String
* @param pieces String[] * @param pieces String[]
* @return boolean
*/ * @return boolean */
public static boolean containsAny(String str, String... pieces) { public static boolean containsAny(String str, String... pieces) {
if (str == null) { if (str == null) {
return false; return false;

View File

@ -47,8 +47,8 @@ public class Utils {
// Check and Download GeoIP data if not exist // Check and Download GeoIP data if not exist
/** /**
* Method checkGeoIP. * Method checkGeoIP.
* @return boolean
*/ * @return boolean */
public static boolean checkGeoIP() { public static boolean checkGeoIP() {
if (lookupService != null) { if (lookupService != null) {
return true; return true;
@ -98,8 +98,8 @@ public class Utils {
/** /**
* Method getCountryCode. * Method getCountryCode.
* @param ip String * @param ip String
* @return String
*/ * @return String */
public static String getCountryCode(String ip) { public static String getCountryCode(String ip) {
if (checkGeoIP()) { if (checkGeoIP()) {
return lookupService.getCountry(ip).getCode(); return lookupService.getCountry(ip).getCode();
@ -110,8 +110,8 @@ public class Utils {
/** /**
* Method getCountryName. * Method getCountryName.
* @param ip String * @param ip String
* @return String
*/ * @return String */
public static String getCountryName(String ip) { public static String getCountryName(String ip) {
if (checkGeoIP()) { if (checkGeoIP()) {
return lookupService.getCountry(ip).getName(); return lookupService.getCountry(ip).getName();
@ -173,8 +173,8 @@ public class Utils {
* Method addNormal. * Method addNormal.
* @param player Player * @param player Player
* @param group String * @param group String
* @return boolean
*/ * @return boolean */
public static boolean addNormal(Player player, String group) { public static boolean addNormal(Player player, String group) {
if (!useGroupSystem()) { if (!useGroupSystem()) {
return false; return false;
@ -197,8 +197,8 @@ public class Utils {
/** /**
* Method checkAuth. * Method checkAuth.
* @param player Player * @param player Player
* @return boolean
*/ * @return boolean */
public static boolean checkAuth(Player player) { public static boolean checkAuth(Player player) {
if (player == null || Utils.isUnrestricted(player)) { if (player == null || Utils.isUnrestricted(player)) {
return true; return true;
@ -221,8 +221,8 @@ public class Utils {
/** /**
* Method isUnrestricted. * Method isUnrestricted.
* @param player Player * @param player Player
* @return boolean
*/ * @return boolean */
public static boolean isUnrestricted(Player player) { public static boolean isUnrestricted(Player player) {
return Settings.isAllowRestrictedIp && !Settings.getUnrestrictedName.isEmpty() return Settings.isAllowRestrictedIp && !Settings.getUnrestrictedName.isEmpty()
&& (Settings.getUnrestrictedName.contains(player.getName())); && (Settings.getUnrestrictedName.contains(player.getName()));
@ -230,8 +230,8 @@ public class Utils {
/** /**
* Method useGroupSystem. * Method useGroupSystem.
* @return boolean
*/ * @return boolean */
private static boolean useGroupSystem() { private static boolean useGroupSystem() {
return Settings.isPermissionCheckEnabled && !Settings.getUnloggedinGroup.isEmpty(); return Settings.isPermissionCheckEnabled && !Settings.getUnloggedinGroup.isEmpty();
} }
@ -315,8 +315,8 @@ public class Utils {
/** /**
* Method getOnlinePlayers. * Method getOnlinePlayers.
* @return Collection<? extends Player>
*/ * @return Collection<? extends Player> */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static Collection<? extends Player> getOnlinePlayers() { public static Collection<? extends Player> getOnlinePlayers() {
if (getOnlinePlayersIsCollection) { if (getOnlinePlayersIsCollection) {
@ -339,8 +339,8 @@ public class Utils {
/** /**
* Method getPlayer. * Method getPlayer.
* @param name String * @param name String
* @return Player
*/ * @return Player */
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public static Player getPlayer(String name) { public static Player getPlayer(String name) {
name = name.toLowerCase(); name = name.toLowerCase();
@ -350,8 +350,8 @@ public class Utils {
/** /**
* Method isNPC. * Method isNPC.
* @param player Entity * @param player Entity
* @return boolean
*/ * @return boolean */
public static boolean isNPC(final Entity player) { public static boolean isNPC(final Entity player) {
try { try {
if (player.hasMetadata("NPC")) { if (player.hasMetadata("NPC")) {