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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -389,8 +389,8 @@ public class PermissionsManager {
/**
* Method getGroups.
* @param player Player
* @return List<String>
*/
g>
* @return List<String> */
@SuppressWarnings({"unchecked", "rawtypes", "deprecation"})
public List<String> getGroups(Player player) {
if(!isEnabled())
@ -461,8 +461,8 @@ public class PermissionsManager {
/**
* Method getName.
* @return String
*/
ng
* @return String */
public String getName() {
return this.name;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -26,7 +26,8 @@ public interface EncryptionMethod {
* @param name String
* @return Hashing password * @throws NoSuchAlgorithmException */
* @return Hashing password * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
String getHash(String password, String salt, String name)
throws NoSuchAlgorithmException;
@ -36,7 +37,8 @@ public interface EncryptionMethod {
* @param playerName
* @return true if password match, false else * @throws NoSuchAlgorithmException */
* @return true if password match, false else * @throws NoSuchAlgorithmException * @throws NoSuchAlgorithmException
*/
boolean comparePassword(String hash, String password, String playerName)
throws NoSuchAlgorithmException;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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