diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/cn/citycraft/AuthMe/AuthMe.java
similarity index 91%
rename from src/main/java/fr/xephi/authme/AuthMe.java
rename to src/main/java/cn/citycraft/AuthMe/AuthMe.java
index 691290d..e807da9 100644
--- a/src/main/java/fr/xephi/authme/AuthMe.java
+++ b/src/main/java/cn/citycraft/AuthMe/AuthMe.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme;
+package cn.citycraft.AuthMe;
import java.util.Calendar;
import java.util.Collection;
@@ -22,46 +22,46 @@ import org.bukkit.scheduler.BukkitTask;
import com.earth2me.essentials.Essentials;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.cache.auth.PlayerCache;
+import cn.citycraft.AuthMe.cache.backup.JsonCache;
+import cn.citycraft.AuthMe.cache.limbo.LimboCache;
+import cn.citycraft.AuthMe.cache.limbo.LimboPlayer;
+import cn.citycraft.AuthMe.commands.AdminCommand;
+import cn.citycraft.AuthMe.commands.CaptchaCommand;
+import cn.citycraft.AuthMe.commands.ChangePasswordCommand;
+import cn.citycraft.AuthMe.commands.ConverterCommand;
+import cn.citycraft.AuthMe.commands.LoginCommand;
+import cn.citycraft.AuthMe.commands.LogoutCommand;
+import cn.citycraft.AuthMe.commands.RegisterCommand;
+import cn.citycraft.AuthMe.commands.UnregisterCommand;
+import cn.citycraft.AuthMe.converter.Converter;
+import cn.citycraft.AuthMe.converter.ForceFlatToSqlite;
+import cn.citycraft.AuthMe.datasource.CacheDataSource;
+import cn.citycraft.AuthMe.datasource.DataSource;
+import cn.citycraft.AuthMe.datasource.DatabaseCalls;
+import cn.citycraft.AuthMe.datasource.FlatFile;
+import cn.citycraft.AuthMe.datasource.MySQL;
+import cn.citycraft.AuthMe.datasource.SQLite;
+import cn.citycraft.AuthMe.datasource.SQLite_HIKARI;
+import cn.citycraft.AuthMe.listener.AuthMeBlockListener;
+import cn.citycraft.AuthMe.listener.AuthMeEntityListener;
+import cn.citycraft.AuthMe.listener.AuthMeInventoryPacketAdapter;
+import cn.citycraft.AuthMe.listener.AuthMePlayerListener;
+import cn.citycraft.AuthMe.listener.AuthMePlayerListener16;
+import cn.citycraft.AuthMe.listener.AuthMePlayerListener18;
+import cn.citycraft.AuthMe.listener.AuthMeServerListener;
+import cn.citycraft.AuthMe.plugin.manager.BungeeCordMessage;
+import cn.citycraft.AuthMe.plugin.manager.EssSpawn;
+import cn.citycraft.AuthMe.process.Management;
+import cn.citycraft.AuthMe.settings.Messages;
+import cn.citycraft.AuthMe.settings.OtherAccounts;
+import cn.citycraft.AuthMe.settings.Settings;
+import cn.citycraft.AuthMe.settings.Spawn;
import cn.citycraft.PluginHelper.config.FileConfig;
import cn.citycraft.PluginHelper.utils.VersionChecker;
import fr.xephi.authme.api.API;
import fr.xephi.authme.api.NewAPI;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.cache.auth.PlayerCache;
-import fr.xephi.authme.cache.backup.JsonCache;
-import fr.xephi.authme.cache.limbo.LimboCache;
-import fr.xephi.authme.cache.limbo.LimboPlayer;
-import fr.xephi.authme.commands.AdminCommand;
-import fr.xephi.authme.commands.CaptchaCommand;
-import fr.xephi.authme.commands.ChangePasswordCommand;
-import fr.xephi.authme.commands.ConverterCommand;
-import fr.xephi.authme.commands.LoginCommand;
-import fr.xephi.authme.commands.LogoutCommand;
-import fr.xephi.authme.commands.RegisterCommand;
-import fr.xephi.authme.commands.UnregisterCommand;
-import fr.xephi.authme.converter.Converter;
-import fr.xephi.authme.converter.ForceFlatToSqlite;
-import fr.xephi.authme.datasource.CacheDataSource;
-import fr.xephi.authme.datasource.DataSource;
-import fr.xephi.authme.datasource.DatabaseCalls;
-import fr.xephi.authme.datasource.FlatFile;
-import fr.xephi.authme.datasource.MySQL;
-import fr.xephi.authme.datasource.SQLite;
-import fr.xephi.authme.datasource.SQLite_HIKARI;
-import fr.xephi.authme.listener.AuthMeBlockListener;
-import fr.xephi.authme.listener.AuthMeEntityListener;
-import fr.xephi.authme.listener.AuthMeInventoryPacketAdapter;
-import fr.xephi.authme.listener.AuthMePlayerListener;
-import fr.xephi.authme.listener.AuthMePlayerListener16;
-import fr.xephi.authme.listener.AuthMePlayerListener18;
-import fr.xephi.authme.listener.AuthMeServerListener;
-import fr.xephi.authme.plugin.manager.BungeeCordMessage;
-import fr.xephi.authme.plugin.manager.EssSpawn;
-import fr.xephi.authme.process.Management;
-import fr.xephi.authme.settings.Messages;
-import fr.xephi.authme.settings.OtherAccounts;
-import fr.xephi.authme.settings.Settings;
-import fr.xephi.authme.settings.Spawn;
import net.milkbowl.vault.permission.Permission;
public class AuthMe extends JavaPlugin {
diff --git a/src/main/java/fr/xephi/authme/ConsoleFilter.java b/src/main/java/cn/citycraft/AuthMe/ConsoleFilter.java
similarity index 97%
rename from src/main/java/fr/xephi/authme/ConsoleFilter.java
rename to src/main/java/cn/citycraft/AuthMe/ConsoleFilter.java
index d2bd828..aa39ebc 100644
--- a/src/main/java/fr/xephi/authme/ConsoleFilter.java
+++ b/src/main/java/cn/citycraft/AuthMe/ConsoleFilter.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme;
+package cn.citycraft.AuthMe;
import java.util.logging.Filter;
import java.util.logging.LogRecord;
diff --git a/src/main/java/fr/xephi/authme/ConsoleLogger.java b/src/main/java/cn/citycraft/AuthMe/ConsoleLogger.java
similarity index 95%
rename from src/main/java/fr/xephi/authme/ConsoleLogger.java
rename to src/main/java/cn/citycraft/AuthMe/ConsoleLogger.java
index dfe20e7..0b54b26 100644
--- a/src/main/java/fr/xephi/authme/ConsoleLogger.java
+++ b/src/main/java/cn/citycraft/AuthMe/ConsoleLogger.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme;
+package cn.citycraft.AuthMe;
import java.io.IOException;
import java.nio.file.Files;
@@ -10,8 +10,8 @@ import java.util.logging.Logger;
import com.google.common.base.Throwables;
+import cn.citycraft.AuthMe.settings.Settings;
import fr.xephi.authme.api.NewAPI;
-import fr.xephi.authme.settings.Settings;
public class ConsoleLogger {
diff --git a/src/main/java/fr/xephi/authme/DataManager.java b/src/main/java/cn/citycraft/AuthMe/DataManager.java
similarity index 95%
rename from src/main/java/fr/xephi/authme/DataManager.java
rename to src/main/java/cn/citycraft/AuthMe/DataManager.java
index 9bb82fc..86a4d7a 100644
--- a/src/main/java/fr/xephi/authme/DataManager.java
+++ b/src/main/java/cn/citycraft/AuthMe/DataManager.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme;
+package cn.citycraft.AuthMe;
import java.io.File;
import java.util.List;
@@ -11,7 +11,7 @@ import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.settings.Settings;
import net.milkbowl.vault.permission.Permission;
public class DataManager {
diff --git a/src/main/java/fr/xephi/authme/ImageGenerator.java b/src/main/java/cn/citycraft/AuthMe/ImageGenerator.java
similarity index 93%
rename from src/main/java/fr/xephi/authme/ImageGenerator.java
rename to src/main/java/cn/citycraft/AuthMe/ImageGenerator.java
index cf9af99..46a1524 100644
--- a/src/main/java/fr/xephi/authme/ImageGenerator.java
+++ b/src/main/java/cn/citycraft/AuthMe/ImageGenerator.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme;
+package cn.citycraft.AuthMe;
import java.awt.Color;
import java.awt.Font;
diff --git a/src/main/java/fr/xephi/authme/Log4JFilter.java b/src/main/java/cn/citycraft/AuthMe/Log4JFilter.java
similarity index 98%
rename from src/main/java/fr/xephi/authme/Log4JFilter.java
rename to src/main/java/cn/citycraft/AuthMe/Log4JFilter.java
index d2bd70e..c1b6c92 100644
--- a/src/main/java/fr/xephi/authme/Log4JFilter.java
+++ b/src/main/java/cn/citycraft/AuthMe/Log4JFilter.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme;
+package cn.citycraft.AuthMe;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Marker;
diff --git a/src/main/java/fr/xephi/authme/PerformBackup.java b/src/main/java/cn/citycraft/AuthMe/PerformBackup.java
similarity index 98%
rename from src/main/java/fr/xephi/authme/PerformBackup.java
rename to src/main/java/cn/citycraft/AuthMe/PerformBackup.java
index 888e106..a0a125e 100644
--- a/src/main/java/fr/xephi/authme/PerformBackup.java
+++ b/src/main/java/cn/citycraft/AuthMe/PerformBackup.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme;
+package cn.citycraft.AuthMe;
import java.io.File;
import java.io.FileInputStream;
@@ -9,7 +9,7 @@ import java.io.OutputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.settings.Settings;
/**
*
diff --git a/src/main/java/fr/xephi/authme/Utils.java b/src/main/java/cn/citycraft/AuthMe/Utils.java
similarity index 97%
rename from src/main/java/fr/xephi/authme/Utils.java
rename to src/main/java/cn/citycraft/AuthMe/Utils.java
index 86271e8..38689a6 100644
--- a/src/main/java/fr/xephi/authme/Utils.java
+++ b/src/main/java/cn/citycraft/AuthMe/Utils.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme;
+package cn.citycraft.AuthMe;
import java.io.File;
import java.io.FileOutputStream;
@@ -21,11 +21,11 @@ import org.bukkit.entity.Player;
import com.maxmind.geoip.LookupService;
-import fr.xephi.authme.cache.auth.PlayerCache;
-import fr.xephi.authme.cache.limbo.LimboCache;
-import fr.xephi.authme.cache.limbo.LimboPlayer;
+import cn.citycraft.AuthMe.cache.auth.PlayerCache;
+import cn.citycraft.AuthMe.cache.limbo.LimboCache;
+import cn.citycraft.AuthMe.cache.limbo.LimboPlayer;
+import cn.citycraft.AuthMe.settings.Settings;
import fr.xephi.authme.events.AuthMeTeleportEvent;
-import fr.xephi.authme.settings.Settings;
public class Utils {
diff --git a/src/main/java/fr/xephi/authme/cache/auth/PlayerAuth.java b/src/main/java/cn/citycraft/AuthMe/cache/auth/PlayerAuth.java
similarity index 97%
rename from src/main/java/fr/xephi/authme/cache/auth/PlayerAuth.java
rename to src/main/java/cn/citycraft/AuthMe/cache/auth/PlayerAuth.java
index 18a4e9a..09d6fd2 100644
--- a/src/main/java/fr/xephi/authme/cache/auth/PlayerAuth.java
+++ b/src/main/java/cn/citycraft/AuthMe/cache/auth/PlayerAuth.java
@@ -1,7 +1,7 @@
-package fr.xephi.authme.cache.auth;
+package cn.citycraft.AuthMe.cache.auth;
-import fr.xephi.authme.security.HashAlgorithm;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.security.HashAlgorithm;
+import cn.citycraft.AuthMe.settings.Settings;
public class PlayerAuth {
diff --git a/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java b/src/main/java/cn/citycraft/AuthMe/cache/auth/PlayerCache.java
similarity index 96%
rename from src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java
rename to src/main/java/cn/citycraft/AuthMe/cache/auth/PlayerCache.java
index af3c01c..7ec74c5 100644
--- a/src/main/java/fr/xephi/authme/cache/auth/PlayerCache.java
+++ b/src/main/java/cn/citycraft/AuthMe/cache/auth/PlayerCache.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.cache.auth;
+package cn.citycraft.AuthMe.cache.auth;
import java.util.concurrent.ConcurrentHashMap;
diff --git a/src/main/java/fr/xephi/authme/cache/backup/DataFileCache.java b/src/main/java/cn/citycraft/AuthMe/cache/backup/DataFileCache.java
similarity index 90%
rename from src/main/java/fr/xephi/authme/cache/backup/DataFileCache.java
rename to src/main/java/cn/citycraft/AuthMe/cache/backup/DataFileCache.java
index ba11a3a..89142c5 100644
--- a/src/main/java/fr/xephi/authme/cache/backup/DataFileCache.java
+++ b/src/main/java/cn/citycraft/AuthMe/cache/backup/DataFileCache.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.cache.backup;
+package cn.citycraft.AuthMe.cache.backup;
public class DataFileCache {
diff --git a/src/main/java/fr/xephi/authme/cache/backup/JsonCache.java b/src/main/java/cn/citycraft/AuthMe/cache/backup/JsonCache.java
similarity index 96%
rename from src/main/java/fr/xephi/authme/cache/backup/JsonCache.java
rename to src/main/java/cn/citycraft/AuthMe/cache/backup/JsonCache.java
index eb1a0fb..872bb71 100644
--- a/src/main/java/fr/xephi/authme/cache/backup/JsonCache.java
+++ b/src/main/java/cn/citycraft/AuthMe/cache/backup/JsonCache.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.cache.backup;
+package cn.citycraft.AuthMe.cache.backup;
import java.io.File;
import java.io.IOException;
@@ -18,9 +18,9 @@ import com.google.gson.JsonParseException;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.Utils;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.Utils;
+import cn.citycraft.AuthMe.settings.Settings;
public class JsonCache {
diff --git a/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java b/src/main/java/cn/citycraft/AuthMe/cache/limbo/LimboCache.java
similarity index 93%
rename from src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java
rename to src/main/java/cn/citycraft/AuthMe/cache/limbo/LimboCache.java
index 642daa5..297a3fc 100644
--- a/src/main/java/fr/xephi/authme/cache/limbo/LimboCache.java
+++ b/src/main/java/cn/citycraft/AuthMe/cache/limbo/LimboCache.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.cache.limbo;
+package cn.citycraft.AuthMe.cache.limbo;
import java.util.concurrent.ConcurrentHashMap;
@@ -7,13 +7,13 @@ import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.entity.Player;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.backup.DataFileCache;
-import fr.xephi.authme.cache.backup.JsonCache;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.backup.DataFileCache;
+import cn.citycraft.AuthMe.cache.backup.JsonCache;
+import cn.citycraft.AuthMe.settings.Settings;
import fr.xephi.authme.events.ResetInventoryEvent;
import fr.xephi.authme.events.StoreInventoryEvent;
-import fr.xephi.authme.settings.Settings;
public class LimboCache {
diff --git a/src/main/java/fr/xephi/authme/cache/limbo/LimboPlayer.java b/src/main/java/cn/citycraft/AuthMe/cache/limbo/LimboPlayer.java
similarity index 97%
rename from src/main/java/fr/xephi/authme/cache/limbo/LimboPlayer.java
rename to src/main/java/cn/citycraft/AuthMe/cache/limbo/LimboPlayer.java
index 86c7ab3..f6ea21b 100644
--- a/src/main/java/fr/xephi/authme/cache/limbo/LimboPlayer.java
+++ b/src/main/java/cn/citycraft/AuthMe/cache/limbo/LimboPlayer.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.cache.limbo;
+package cn.citycraft.AuthMe.cache.limbo;
import org.bukkit.GameMode;
import org.bukkit.Location;
diff --git a/src/main/java/fr/xephi/authme/commands/AdminCommand.java b/src/main/java/cn/citycraft/AuthMe/commands/AdminCommand.java
similarity index 97%
rename from src/main/java/fr/xephi/authme/commands/AdminCommand.java
rename to src/main/java/cn/citycraft/AuthMe/commands/AdminCommand.java
index c6e7b80..be14254 100644
--- a/src/main/java/fr/xephi/authme/commands/AdminCommand.java
+++ b/src/main/java/cn/citycraft/AuthMe/commands/AdminCommand.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.commands;
+package cn.citycraft.AuthMe.commands;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
@@ -18,20 +18,20 @@ import org.bukkit.potion.PotionEffectType;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.Utils;
-import fr.xephi.authme.Utils.GroupType;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.cache.auth.PlayerCache;
-import fr.xephi.authme.cache.limbo.LimboCache;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.Utils;
+import cn.citycraft.AuthMe.Utils.GroupType;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.cache.auth.PlayerCache;
+import cn.citycraft.AuthMe.cache.limbo.LimboCache;
+import cn.citycraft.AuthMe.security.PasswordSecurity;
+import cn.citycraft.AuthMe.settings.Messages;
+import cn.citycraft.AuthMe.settings.Settings;
+import cn.citycraft.AuthMe.settings.Spawn;
+import cn.citycraft.AuthMe.task.MessageTask;
+import cn.citycraft.AuthMe.task.TimeoutTask;
import fr.xephi.authme.events.SpawnTeleportEvent;
-import fr.xephi.authme.security.PasswordSecurity;
-import fr.xephi.authme.settings.Messages;
-import fr.xephi.authme.settings.Settings;
-import fr.xephi.authme.settings.Spawn;
-import fr.xephi.authme.task.MessageTask;
-import fr.xephi.authme.task.TimeoutTask;
public class AdminCommand implements CommandExecutor {
diff --git a/src/main/java/fr/xephi/authme/commands/CaptchaCommand.java b/src/main/java/cn/citycraft/AuthMe/commands/CaptchaCommand.java
similarity index 86%
rename from src/main/java/fr/xephi/authme/commands/CaptchaCommand.java
rename to src/main/java/cn/citycraft/AuthMe/commands/CaptchaCommand.java
index 422a6b2..73fdeb8 100644
--- a/src/main/java/fr/xephi/authme/commands/CaptchaCommand.java
+++ b/src/main/java/cn/citycraft/AuthMe/commands/CaptchaCommand.java
@@ -1,15 +1,15 @@
-package fr.xephi.authme.commands;
+package cn.citycraft.AuthMe.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.cache.auth.PlayerCache;
-import fr.xephi.authme.security.RandomString;
-import fr.xephi.authme.settings.Messages;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.cache.auth.PlayerCache;
+import cn.citycraft.AuthMe.security.RandomString;
+import cn.citycraft.AuthMe.settings.Messages;
+import cn.citycraft.AuthMe.settings.Settings;
public class CaptchaCommand implements CommandExecutor {
diff --git a/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java b/src/main/java/cn/citycraft/AuthMe/commands/ChangePasswordCommand.java
similarity index 87%
rename from src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java
rename to src/main/java/cn/citycraft/AuthMe/commands/ChangePasswordCommand.java
index 2db8485..8cd4a8b 100644
--- a/src/main/java/fr/xephi/authme/commands/ChangePasswordCommand.java
+++ b/src/main/java/cn/citycraft/AuthMe/commands/ChangePasswordCommand.java
@@ -1,15 +1,15 @@
-package fr.xephi.authme.commands;
+package cn.citycraft.AuthMe.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.cache.auth.PlayerCache;
-import fr.xephi.authme.settings.Messages;
-import fr.xephi.authme.settings.Settings;
-import fr.xephi.authme.task.ChangePasswordTask;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.cache.auth.PlayerCache;
+import cn.citycraft.AuthMe.settings.Messages;
+import cn.citycraft.AuthMe.settings.Settings;
+import cn.citycraft.AuthMe.task.ChangePasswordTask;
public class ChangePasswordCommand implements CommandExecutor {
diff --git a/src/main/java/fr/xephi/authme/commands/ConverterCommand.java b/src/main/java/cn/citycraft/AuthMe/commands/ConverterCommand.java
similarity index 81%
rename from src/main/java/fr/xephi/authme/commands/ConverterCommand.java
rename to src/main/java/cn/citycraft/AuthMe/commands/ConverterCommand.java
index 642da6c..64cfb75 100644
--- a/src/main/java/fr/xephi/authme/commands/ConverterCommand.java
+++ b/src/main/java/cn/citycraft/AuthMe/commands/ConverterCommand.java
@@ -1,20 +1,20 @@
-package fr.xephi.authme.commands;
+package cn.citycraft.AuthMe.commands;
import org.bukkit.Bukkit;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.converter.Converter;
-import fr.xephi.authme.converter.CrazyLoginConverter;
-import fr.xephi.authme.converter.FlatToSql;
-import fr.xephi.authme.converter.FlatToSqlite;
-import fr.xephi.authme.converter.RakamakConverter;
-import fr.xephi.authme.converter.RoyalAuthConverter;
-import fr.xephi.authme.converter.SqlToFlat;
-import fr.xephi.authme.converter.vAuthConverter;
-import fr.xephi.authme.settings.Messages;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.converter.Converter;
+import cn.citycraft.AuthMe.converter.CrazyLoginConverter;
+import cn.citycraft.AuthMe.converter.FlatToSql;
+import cn.citycraft.AuthMe.converter.FlatToSqlite;
+import cn.citycraft.AuthMe.converter.RakamakConverter;
+import cn.citycraft.AuthMe.converter.RoyalAuthConverter;
+import cn.citycraft.AuthMe.converter.SqlToFlat;
+import cn.citycraft.AuthMe.converter.vAuthConverter;
+import cn.citycraft.AuthMe.settings.Messages;
public class ConverterCommand implements CommandExecutor {
diff --git a/src/main/java/fr/xephi/authme/commands/LoginCommand.java b/src/main/java/cn/citycraft/AuthMe/commands/LoginCommand.java
similarity index 87%
rename from src/main/java/fr/xephi/authme/commands/LoginCommand.java
rename to src/main/java/cn/citycraft/AuthMe/commands/LoginCommand.java
index ff79e46..c5d817e 100644
--- a/src/main/java/fr/xephi/authme/commands/LoginCommand.java
+++ b/src/main/java/cn/citycraft/AuthMe/commands/LoginCommand.java
@@ -1,12 +1,12 @@
-package fr.xephi.authme.commands;
+package cn.citycraft.AuthMe.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.settings.Messages;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.settings.Messages;
public class LoginCommand implements CommandExecutor {
diff --git a/src/main/java/fr/xephi/authme/commands/LogoutCommand.java b/src/main/java/cn/citycraft/AuthMe/commands/LogoutCommand.java
similarity index 82%
rename from src/main/java/fr/xephi/authme/commands/LogoutCommand.java
rename to src/main/java/cn/citycraft/AuthMe/commands/LogoutCommand.java
index 5fc24ed..ebdd1f0 100644
--- a/src/main/java/fr/xephi/authme/commands/LogoutCommand.java
+++ b/src/main/java/cn/citycraft/AuthMe/commands/LogoutCommand.java
@@ -1,12 +1,12 @@
-package fr.xephi.authme.commands;
+package cn.citycraft.AuthMe.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.settings.Messages;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.settings.Messages;
public class LogoutCommand implements CommandExecutor {
diff --git a/src/main/java/fr/xephi/authme/commands/RegisterCommand.java b/src/main/java/cn/citycraft/AuthMe/commands/RegisterCommand.java
similarity index 86%
rename from src/main/java/fr/xephi/authme/commands/RegisterCommand.java
rename to src/main/java/cn/citycraft/AuthMe/commands/RegisterCommand.java
index 62b2943..82b5c17 100644
--- a/src/main/java/fr/xephi/authme/commands/RegisterCommand.java
+++ b/src/main/java/cn/citycraft/AuthMe/commands/RegisterCommand.java
@@ -1,15 +1,15 @@
-package fr.xephi.authme.commands;
+package cn.citycraft.AuthMe.commands;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.security.RandomString;
-import fr.xephi.authme.settings.Messages;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.security.RandomString;
+import cn.citycraft.AuthMe.settings.Messages;
+import cn.citycraft.AuthMe.settings.Settings;
public class RegisterCommand implements CommandExecutor {
diff --git a/src/main/java/fr/xephi/authme/commands/UnregisterCommand.java b/src/main/java/cn/citycraft/AuthMe/commands/UnregisterCommand.java
similarity index 88%
rename from src/main/java/fr/xephi/authme/commands/UnregisterCommand.java
rename to src/main/java/cn/citycraft/AuthMe/commands/UnregisterCommand.java
index 02940de..d5654ef 100644
--- a/src/main/java/fr/xephi/authme/commands/UnregisterCommand.java
+++ b/src/main/java/cn/citycraft/AuthMe/commands/UnregisterCommand.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.commands;
+package cn.citycraft.AuthMe.commands;
import java.security.NoSuchAlgorithmException;
@@ -12,19 +12,19 @@ import org.bukkit.potion.PotionEffectType;
import org.bukkit.scheduler.BukkitScheduler;
import org.bukkit.scheduler.BukkitTask;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.Utils;
-import fr.xephi.authme.Utils.GroupType;
-import fr.xephi.authme.cache.auth.PlayerCache;
-import fr.xephi.authme.cache.backup.JsonCache;
-import fr.xephi.authme.cache.limbo.LimboCache;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.Utils;
+import cn.citycraft.AuthMe.Utils.GroupType;
+import cn.citycraft.AuthMe.cache.auth.PlayerCache;
+import cn.citycraft.AuthMe.cache.backup.JsonCache;
+import cn.citycraft.AuthMe.cache.limbo.LimboCache;
+import cn.citycraft.AuthMe.security.PasswordSecurity;
+import cn.citycraft.AuthMe.settings.Messages;
+import cn.citycraft.AuthMe.settings.Settings;
+import cn.citycraft.AuthMe.task.MessageTask;
+import cn.citycraft.AuthMe.task.TimeoutTask;
import fr.xephi.authme.events.SpawnTeleportEvent;
-import fr.xephi.authme.security.PasswordSecurity;
-import fr.xephi.authme.settings.Messages;
-import fr.xephi.authme.settings.Settings;
-import fr.xephi.authme.task.MessageTask;
-import fr.xephi.authme.task.TimeoutTask;
public class UnregisterCommand implements CommandExecutor {
diff --git a/src/main/java/fr/xephi/authme/converter/Converter.java b/src/main/java/cn/citycraft/AuthMe/converter/Converter.java
similarity index 55%
rename from src/main/java/fr/xephi/authme/converter/Converter.java
rename to src/main/java/cn/citycraft/AuthMe/converter/Converter.java
index 461567e..f8336d0 100644
--- a/src/main/java/fr/xephi/authme/converter/Converter.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/Converter.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
public interface Converter extends Runnable {
}
diff --git a/src/main/java/fr/xephi/authme/converter/CrazyLoginConverter.java b/src/main/java/cn/citycraft/AuthMe/converter/CrazyLoginConverter.java
similarity index 87%
rename from src/main/java/fr/xephi/authme/converter/CrazyLoginConverter.java
rename to src/main/java/cn/citycraft/AuthMe/converter/CrazyLoginConverter.java
index 51dbde7..b8586bc 100644
--- a/src/main/java/fr/xephi/authme/converter/CrazyLoginConverter.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/CrazyLoginConverter.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
import java.io.BufferedReader;
import java.io.File;
@@ -7,11 +7,11 @@ import java.io.IOException;
import org.bukkit.command.CommandSender;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.datasource.DataSource;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.datasource.DataSource;
+import cn.citycraft.AuthMe.settings.Settings;
/**
* @author Xephi59
diff --git a/src/main/java/fr/xephi/authme/converter/FlatToSql.java b/src/main/java/cn/citycraft/AuthMe/converter/FlatToSql.java
similarity index 96%
rename from src/main/java/fr/xephi/authme/converter/FlatToSql.java
rename to src/main/java/cn/citycraft/AuthMe/converter/FlatToSql.java
index fecaa4f..72fbb0a 100644
--- a/src/main/java/fr/xephi/authme/converter/FlatToSql.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/FlatToSql.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -7,9 +7,9 @@ import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.settings.Settings;
/**
* @author Xephi59
diff --git a/src/main/java/fr/xephi/authme/converter/FlatToSqlite.java b/src/main/java/cn/citycraft/AuthMe/converter/FlatToSqlite.java
similarity index 98%
rename from src/main/java/fr/xephi/authme/converter/FlatToSqlite.java
rename to src/main/java/cn/citycraft/AuthMe/converter/FlatToSqlite.java
index 83a0609..85535ec 100644
--- a/src/main/java/fr/xephi/authme/converter/FlatToSqlite.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/FlatToSqlite.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
import java.io.BufferedReader;
import java.io.File;
@@ -13,8 +13,8 @@ import java.sql.Statement;
import org.bukkit.command.CommandSender;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.settings.Settings;
public class FlatToSqlite implements Converter {
diff --git a/src/main/java/fr/xephi/authme/converter/ForceFlatToSqlite.java b/src/main/java/cn/citycraft/AuthMe/converter/ForceFlatToSqlite.java
similarity index 70%
rename from src/main/java/fr/xephi/authme/converter/ForceFlatToSqlite.java
rename to src/main/java/cn/citycraft/AuthMe/converter/ForceFlatToSqlite.java
index aab8532..d6f24c7 100644
--- a/src/main/java/fr/xephi/authme/converter/ForceFlatToSqlite.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/ForceFlatToSqlite.java
@@ -1,11 +1,11 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.datasource.DataSource;
-import fr.xephi.authme.datasource.SQLite;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.datasource.DataSource;
+import cn.citycraft.AuthMe.datasource.SQLite;
+import cn.citycraft.AuthMe.settings.Settings;
public class ForceFlatToSqlite implements Converter {
diff --git a/src/main/java/fr/xephi/authme/converter/RakamakConverter.java b/src/main/java/cn/citycraft/AuthMe/converter/RakamakConverter.java
similarity index 87%
rename from src/main/java/fr/xephi/authme/converter/RakamakConverter.java
rename to src/main/java/cn/citycraft/AuthMe/converter/RakamakConverter.java
index 6d89a77..d4e7a6a 100644
--- a/src/main/java/fr/xephi/authme/converter/RakamakConverter.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/RakamakConverter.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
import java.io.BufferedReader;
import java.io.File;
@@ -10,13 +10,13 @@ import java.util.Map.Entry;
import org.bukkit.command.CommandSender;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.datasource.DataSource;
-import fr.xephi.authme.security.HashAlgorithm;
-import fr.xephi.authme.security.PasswordSecurity;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.datasource.DataSource;
+import cn.citycraft.AuthMe.security.HashAlgorithm;
+import cn.citycraft.AuthMe.security.PasswordSecurity;
+import cn.citycraft.AuthMe.settings.Settings;
/**
* @author Xephi59
diff --git a/src/main/java/fr/xephi/authme/converter/RoyalAuthConverter.java b/src/main/java/cn/citycraft/AuthMe/converter/RoyalAuthConverter.java
similarity index 82%
rename from src/main/java/fr/xephi/authme/converter/RoyalAuthConverter.java
rename to src/main/java/cn/citycraft/AuthMe/converter/RoyalAuthConverter.java
index e3c2b72..6877585 100644
--- a/src/main/java/fr/xephi/authme/converter/RoyalAuthConverter.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/RoyalAuthConverter.java
@@ -1,13 +1,13 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
import java.io.File;
import org.bukkit.OfflinePlayer;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.datasource.DataSource;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.datasource.DataSource;
public class RoyalAuthConverter implements Converter {
diff --git a/src/main/java/cn/citycraft/AuthMe/converter/RoyalAuthYamlReader.java b/src/main/java/cn/citycraft/AuthMe/converter/RoyalAuthYamlReader.java
new file mode 100644
index 0000000..ac0baa1
--- /dev/null
+++ b/src/main/java/cn/citycraft/AuthMe/converter/RoyalAuthYamlReader.java
@@ -0,0 +1,20 @@
+package cn.citycraft.AuthMe.converter;
+
+import java.io.File;
+
+import cn.citycraft.PluginHelper.config.FileConfig;
+
+public class RoyalAuthYamlReader extends FileConfig {
+
+ public RoyalAuthYamlReader(final File file) {
+ super(file);
+ }
+
+ public String getHash() {
+ return getString("login.password");
+ }
+
+ public long getLastLogin() {
+ return getLong("timestamps.quit");
+ }
+}
diff --git a/src/main/java/fr/xephi/authme/converter/SqlToFlat.java b/src/main/java/cn/citycraft/AuthMe/converter/SqlToFlat.java
similarity index 74%
rename from src/main/java/fr/xephi/authme/converter/SqlToFlat.java
rename to src/main/java/cn/citycraft/AuthMe/converter/SqlToFlat.java
index 2a6c154..45f89ab 100644
--- a/src/main/java/fr/xephi/authme/converter/SqlToFlat.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/SqlToFlat.java
@@ -1,15 +1,15 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
import java.util.List;
import org.bukkit.command.CommandSender;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.datasource.DataSource;
-import fr.xephi.authme.datasource.FlatFile;
-import fr.xephi.authme.settings.Messages;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.datasource.DataSource;
+import cn.citycraft.AuthMe.datasource.FlatFile;
+import cn.citycraft.AuthMe.settings.Messages;
public class SqlToFlat implements Converter {
diff --git a/src/main/java/fr/xephi/authme/converter/vAuthConverter.java b/src/main/java/cn/citycraft/AuthMe/converter/vAuthConverter.java
similarity index 76%
rename from src/main/java/fr/xephi/authme/converter/vAuthConverter.java
rename to src/main/java/cn/citycraft/AuthMe/converter/vAuthConverter.java
index 47236a4..fbe6759 100644
--- a/src/main/java/fr/xephi/authme/converter/vAuthConverter.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/vAuthConverter.java
@@ -1,10 +1,10 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
import org.bukkit.command.CommandSender;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.datasource.DataSource;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.datasource.DataSource;
public class vAuthConverter implements Converter {
diff --git a/src/main/java/fr/xephi/authme/converter/vAuthFileReader.java b/src/main/java/cn/citycraft/AuthMe/converter/vAuthFileReader.java
similarity index 89%
rename from src/main/java/fr/xephi/authme/converter/vAuthFileReader.java
rename to src/main/java/cn/citycraft/AuthMe/converter/vAuthFileReader.java
index cd21bcb..7aab4ce 100644
--- a/src/main/java/fr/xephi/authme/converter/vAuthFileReader.java
+++ b/src/main/java/cn/citycraft/AuthMe/converter/vAuthFileReader.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.converter;
+package cn.citycraft.AuthMe.converter;
import java.io.File;
import java.io.IOException;
@@ -9,10 +9,10 @@ import org.bukkit.Bukkit;
import org.bukkit.OfflinePlayer;
import org.bukkit.command.CommandSender;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.datasource.DataSource;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.datasource.DataSource;
public class vAuthFileReader {
diff --git a/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java b/src/main/java/cn/citycraft/AuthMe/datasource/CacheDataSource.java
similarity index 93%
rename from src/main/java/fr/xephi/authme/datasource/CacheDataSource.java
rename to src/main/java/cn/citycraft/AuthMe/datasource/CacheDataSource.java
index b7952ab..a5ab6c0 100644
--- a/src/main/java/fr/xephi/authme/datasource/CacheDataSource.java
+++ b/src/main/java/cn/citycraft/AuthMe/datasource/CacheDataSource.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.datasource;
+package cn.citycraft.AuthMe.datasource;
import java.util.ArrayList;
import java.util.List;
@@ -9,10 +9,10 @@ import java.util.concurrent.Executors;
import org.bukkit.entity.Player;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.Utils;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.cache.auth.PlayerCache;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.Utils;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.cache.auth.PlayerCache;
public class CacheDataSource implements DataSource {
diff --git a/src/main/java/fr/xephi/authme/datasource/DataSource.java b/src/main/java/cn/citycraft/AuthMe/datasource/DataSource.java
similarity index 87%
rename from src/main/java/fr/xephi/authme/datasource/DataSource.java
rename to src/main/java/cn/citycraft/AuthMe/datasource/DataSource.java
index 9468a4b..9b33bb5 100644
--- a/src/main/java/fr/xephi/authme/datasource/DataSource.java
+++ b/src/main/java/cn/citycraft/AuthMe/datasource/DataSource.java
@@ -1,8 +1,8 @@
-package fr.xephi.authme.datasource;
+package cn.citycraft.AuthMe.datasource;
import java.util.List;
-import fr.xephi.authme.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
public interface DataSource {
diff --git a/src/main/java/fr/xephi/authme/datasource/DatabaseCalls.java b/src/main/java/cn/citycraft/AuthMe/datasource/DatabaseCalls.java
similarity index 94%
rename from src/main/java/fr/xephi/authme/datasource/DatabaseCalls.java
rename to src/main/java/cn/citycraft/AuthMe/datasource/DatabaseCalls.java
index b517642..bc3a1b2 100644
--- a/src/main/java/fr/xephi/authme/datasource/DatabaseCalls.java
+++ b/src/main/java/cn/citycraft/AuthMe/datasource/DatabaseCalls.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.datasource;
+package cn.citycraft.AuthMe.datasource;
import java.util.ArrayList;
import java.util.List;
@@ -6,7 +6,7 @@ import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import fr.xephi.authme.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
public class DatabaseCalls implements DataSource {
diff --git a/src/main/java/fr/xephi/authme/datasource/FlatFile.java b/src/main/java/cn/citycraft/AuthMe/datasource/FlatFile.java
similarity index 98%
rename from src/main/java/fr/xephi/authme/datasource/FlatFile.java
rename to src/main/java/cn/citycraft/AuthMe/datasource/FlatFile.java
index 8662d4f..cd108d7 100644
--- a/src/main/java/fr/xephi/authme/datasource/FlatFile.java
+++ b/src/main/java/cn/citycraft/AuthMe/datasource/FlatFile.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.datasource;
+package cn.citycraft.AuthMe.datasource;
import java.io.BufferedReader;
import java.io.BufferedWriter;
@@ -10,11 +10,11 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.cache.auth.PlayerCache;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.cache.auth.PlayerCache;
+import cn.citycraft.AuthMe.settings.Settings;
public class FlatFile implements DataSource {
diff --git a/src/main/java/fr/xephi/authme/datasource/MySQL.java b/src/main/java/cn/citycraft/AuthMe/datasource/MySQL.java
similarity index 96%
rename from src/main/java/fr/xephi/authme/datasource/MySQL.java
rename to src/main/java/cn/citycraft/AuthMe/datasource/MySQL.java
index f8b2b12..ffe1c2e 100644
--- a/src/main/java/fr/xephi/authme/datasource/MySQL.java
+++ b/src/main/java/cn/citycraft/AuthMe/datasource/MySQL.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.datasource;
+package cn.citycraft.AuthMe.datasource;
import java.sql.Blob;
import java.sql.Connection;
@@ -13,11 +13,11 @@ import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
import com.zaxxer.hikari.pool.PoolInitializationException;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.security.HashAlgorithm;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.security.HashAlgorithm;
+import cn.citycraft.AuthMe.settings.Settings;
public class MySQL implements DataSource {
diff --git a/src/main/java/fr/xephi/authme/datasource/SQLite.java b/src/main/java/cn/citycraft/AuthMe/datasource/SQLite.java
similarity index 96%
rename from src/main/java/fr/xephi/authme/datasource/SQLite.java
rename to src/main/java/cn/citycraft/AuthMe/datasource/SQLite.java
index 8095ff2..9555c8c 100644
--- a/src/main/java/fr/xephi/authme/datasource/SQLite.java
+++ b/src/main/java/cn/citycraft/AuthMe/datasource/SQLite.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.datasource;
+package cn.citycraft.AuthMe.datasource;
import java.sql.Connection;
import java.sql.DriverManager;
@@ -9,9 +9,9 @@ import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.settings.Settings;
public class SQLite implements DataSource {
diff --git a/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java b/src/main/java/cn/citycraft/AuthMe/datasource/SQLite_HIKARI.java
similarity index 99%
rename from src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java
rename to src/main/java/cn/citycraft/AuthMe/datasource/SQLite_HIKARI.java
index 0c91602..2131cf8 100644
--- a/src/main/java/fr/xephi/authme/datasource/SQLite_HIKARI.java
+++ b/src/main/java/cn/citycraft/AuthMe/datasource/SQLite_HIKARI.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.datasource;
+package cn.citycraft.AuthMe.datasource;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -11,10 +11,10 @@ import java.util.List;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.ConsoleLogger;
-import fr.xephi.authme.cache.auth.PlayerAuth;
-import fr.xephi.authme.settings.Settings;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.ConsoleLogger;
+import cn.citycraft.AuthMe.cache.auth.PlayerAuth;
+import cn.citycraft.AuthMe.settings.Settings;
public class SQLite_HIKARI implements DataSource {
diff --git a/src/main/java/fr/xephi/authme/listener/AuthMeBlockListener.java b/src/main/java/cn/citycraft/AuthMe/listener/AuthMeBlockListener.java
similarity index 87%
rename from src/main/java/fr/xephi/authme/listener/AuthMeBlockListener.java
rename to src/main/java/cn/citycraft/AuthMe/listener/AuthMeBlockListener.java
index 51d2c23..e6360ef 100644
--- a/src/main/java/fr/xephi/authme/listener/AuthMeBlockListener.java
+++ b/src/main/java/cn/citycraft/AuthMe/listener/AuthMeBlockListener.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.listener;
+package cn.citycraft.AuthMe.listener;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@@ -6,8 +6,8 @@ import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.event.block.BlockPlaceEvent;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.Utils;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.Utils;
public class AuthMeBlockListener implements Listener {
diff --git a/src/main/java/fr/xephi/authme/listener/AuthMeEntityListener.java b/src/main/java/cn/citycraft/AuthMe/listener/AuthMeEntityListener.java
similarity index 97%
rename from src/main/java/fr/xephi/authme/listener/AuthMeEntityListener.java
rename to src/main/java/cn/citycraft/AuthMe/listener/AuthMeEntityListener.java
index 83bb463..719f31a 100644
--- a/src/main/java/fr/xephi/authme/listener/AuthMeEntityListener.java
+++ b/src/main/java/cn/citycraft/AuthMe/listener/AuthMeEntityListener.java
@@ -1,4 +1,4 @@
-package fr.xephi.authme.listener;
+package cn.citycraft.AuthMe.listener;
import java.lang.reflect.Method;
@@ -19,8 +19,8 @@ import org.bukkit.event.entity.FoodLevelChangeEvent;
import org.bukkit.event.entity.ProjectileLaunchEvent;
import org.bukkit.projectiles.ProjectileSource;
-import fr.xephi.authme.AuthMe;
-import fr.xephi.authme.Utils;
+import cn.citycraft.AuthMe.AuthMe;
+import cn.citycraft.AuthMe.Utils;
public class AuthMeEntityListener implements Listener {
diff --git a/src/main/java/fr/xephi/authme/listener/AuthMeInventoryPacketAdapter.java b/src/main/java/cn/citycraft/AuthMe/listener/AuthMeInventoryPacketAdapter.java
similarity index 96%
rename from src/main/java/fr/xephi/authme/listener/AuthMeInventoryPacketAdapter.java
rename to src/main/java/cn/citycraft/AuthMe/listener/AuthMeInventoryPacketAdapter.java
index 55b4a9f..ab4b513 100644
--- a/src/main/java/fr/xephi/authme/listener/AuthMeInventoryPacketAdapter.java
+++ b/src/main/java/cn/citycraft/AuthMe/listener/AuthMeInventoryPacketAdapter.java
@@ -14,7 +14,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see
diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/MacBasedPRF.java b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/MacBasedPRF.java similarity index 98% rename from src/main/java/fr/xephi/authme/security/pbkdf2/MacBasedPRF.java rename to src/main/java/cn/citycraft/AuthMe/security/pbkdf2/MacBasedPRF.java index d7f3ebe..074670c 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/MacBasedPRF.java +++ b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/MacBasedPRF.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.security.pbkdf2; +package cn.citycraft.AuthMe.security.pbkdf2; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2.java b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2.java similarity index 98% rename from src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2.java rename to src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2.java index 7c19368..ed3ac40 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2.java +++ b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.security.pbkdf2; +package cn.citycraft.AuthMe.security.pbkdf2; /** *
diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Engine.java b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Engine.java similarity index 99% rename from src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Engine.java rename to src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Engine.java index 4fd51c9..dfd319b 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Engine.java +++ b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Engine.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.security.pbkdf2; +package cn.citycraft.AuthMe.security.pbkdf2; import java.io.IOException; import java.io.UnsupportedEncodingException; diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Formatter.java b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Formatter.java similarity index 97% rename from src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Formatter.java rename to src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Formatter.java index 943a90a..bce374c 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Formatter.java +++ b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Formatter.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.security.pbkdf2; +package cn.citycraft.AuthMe.security.pbkdf2; /** *
diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2HexFormatter.java b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2HexFormatter.java similarity index 97% rename from src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2HexFormatter.java rename to src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2HexFormatter.java index 05af16d..2258b05 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2HexFormatter.java +++ b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2HexFormatter.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.security.pbkdf2; +package cn.citycraft.AuthMe.security.pbkdf2; /** *
diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.java b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Parameters.java similarity index 98% rename from src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.java rename to src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Parameters.java index 741b594..a0069a0 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PBKDF2Parameters.java +++ b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PBKDF2Parameters.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.security.pbkdf2; +package cn.citycraft.AuthMe.security.pbkdf2; /** *
diff --git a/src/main/java/fr/xephi/authme/security/pbkdf2/PRF.java b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PRF.java similarity index 97% rename from src/main/java/fr/xephi/authme/security/pbkdf2/PRF.java rename to src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PRF.java index 1d98442..2eef252 100644 --- a/src/main/java/fr/xephi/authme/security/pbkdf2/PRF.java +++ b/src/main/java/cn/citycraft/AuthMe/security/pbkdf2/PRF.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.security.pbkdf2; +package cn.citycraft.AuthMe.security.pbkdf2; /** *
diff --git a/src/main/java/fr/xephi/authme/settings/Messages.java b/src/main/java/cn/citycraft/AuthMe/settings/Messages.java similarity index 90% rename from src/main/java/fr/xephi/authme/settings/Messages.java rename to src/main/java/cn/citycraft/AuthMe/settings/Messages.java index 2e5f01c..06aba4a 100644 --- a/src/main/java/fr/xephi/authme/settings/Messages.java +++ b/src/main/java/cn/citycraft/AuthMe/settings/Messages.java @@ -1,10 +1,10 @@ -package fr.xephi.authme.settings; +package cn.citycraft.AuthMe.settings; import org.bukkit.command.CommandSender; +import cn.citycraft.AuthMe.AuthMe; +import cn.citycraft.AuthMe.ConsoleLogger; import cn.citycraft.PluginHelper.config.FileConfig; -import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; public class Messages { diff --git a/src/main/java/fr/xephi/authme/settings/OtherAccounts.java b/src/main/java/cn/citycraft/AuthMe/settings/OtherAccounts.java similarity index 95% rename from src/main/java/fr/xephi/authme/settings/OtherAccounts.java rename to src/main/java/cn/citycraft/AuthMe/settings/OtherAccounts.java index 90dea81..927ffa3 100644 --- a/src/main/java/fr/xephi/authme/settings/OtherAccounts.java +++ b/src/main/java/cn/citycraft/AuthMe/settings/OtherAccounts.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.settings; +package cn.citycraft.AuthMe.settings; import java.util.ArrayList; import java.util.List; @@ -7,8 +7,8 @@ import java.util.UUID; import org.bukkit.Bukkit; import org.bukkit.entity.Player; +import cn.citycraft.AuthMe.AuthMe; import cn.citycraft.PluginHelper.config.FileConfig; -import fr.xephi.authme.AuthMe; /** * diff --git a/src/main/java/fr/xephi/authme/settings/Settings.java b/src/main/java/cn/citycraft/AuthMe/settings/Settings.java similarity index 99% rename from src/main/java/fr/xephi/authme/settings/Settings.java rename to src/main/java/cn/citycraft/AuthMe/settings/Settings.java index b31f069..cadbfb1 100644 --- a/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/src/main/java/cn/citycraft/AuthMe/settings/Settings.java @@ -1,4 +1,4 @@ -package fr.xephi.authme.settings; +package cn.citycraft.AuthMe.settings; import java.io.BufferedReader; import java.io.BufferedWriter; @@ -10,12 +10,12 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import cn.citycraft.AuthMe.AuthMe; +import cn.citycraft.AuthMe.ConsoleLogger; +import cn.citycraft.AuthMe.datasource.DataSource; +import cn.citycraft.AuthMe.datasource.DataSource.DataSourceType; +import cn.citycraft.AuthMe.security.HashAlgorithm; import cn.citycraft.PluginHelper.config.FileConfig; -import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.datasource.DataSource; -import fr.xephi.authme.datasource.DataSource.DataSourceType; -import fr.xephi.authme.security.HashAlgorithm; public final class Settings { diff --git a/src/main/java/cn/citycraft/AuthMe/settings/Spawn.java b/src/main/java/cn/citycraft/AuthMe/settings/Spawn.java new file mode 100644 index 0000000..4357247 --- /dev/null +++ b/src/main/java/cn/citycraft/AuthMe/settings/Spawn.java @@ -0,0 +1,89 @@ +package cn.citycraft.AuthMe.settings; + +import org.bukkit.Bukkit; +import org.bukkit.Location; + +import cn.citycraft.AuthMe.AuthMe; +import cn.citycraft.PluginHelper.config.FileConfig; + +/** + * + * @author Xephi59 + */ +public class Spawn extends FileConfig { + + private static Spawn spawn; + + public Spawn() { + super(AuthMe.getInstance(), "spawn.yml"); + spawn = this; + } + + public static Spawn getInstance() { + if (spawn == null) { + spawn = new Spawn(); + } + return spawn; + } + + public Location getFirstSpawn() { + try { + if (this.getString("firstspawn.world").isEmpty() || this.getString("firstspawn.world").equals("")) { + return null; + } + final Location location = new Location(Bukkit.getWorld(this.getString("firstspawn.world")), this.getDouble("firstspawn.x"), this.getDouble("firstspawn.y"), this + .getDouble("firstspawn.z"), Float.parseFloat(this.getString("firstspawn.yaw")), Float.parseFloat(this.getString("firstspawn.pitch"))); + return location; + } catch (NullPointerException | NumberFormatException npe) { + return null; + } + } + + @Deprecated + public Location getLocation() { + return getSpawn(); + } + + public Location getSpawn() { + try { + if (this.getString("spawn.world").isEmpty() || this.getString("spawn.world").equals("")) { + return null; + } + final Location location = new Location(Bukkit.getWorld(this.getString("spawn.world")), this.getDouble("spawn.x"), this.getDouble("spawn.y"), this.getDouble("spawn.z"), Float + .parseFloat(this.getString("spawn.yaw")), Float.parseFloat(this.getString("spawn.pitch"))); + return location; + } catch (NullPointerException | NumberFormatException npe) { + return null; + } + } + + public boolean setFirstSpawn(final Location location) { + try { + set("firstspawn.world", location.getWorld().getName()); + set("firstspawn.x", location.getX()); + set("firstspawn.y", location.getY()); + set("firstspawn.z", location.getZ()); + set("firstspawn.yaw", location.getYaw()); + set("firstspawn.pitch", location.getPitch()); + save(); + return true; + } catch (final NullPointerException npe) { + return false; + } + } + + public boolean setSpawn(final Location location) { + try { + set("spawn.world", location.getWorld().getName()); + set("spawn.x", location.getX()); + set("spawn.y", location.getY()); + set("spawn.z", location.getZ()); + set("spawn.yaw", location.getYaw()); + set("spawn.pitch", location.getPitch()); + save(); + return true; + } catch (final NullPointerException npe) { + return false; + } + } +} diff --git a/src/main/java/fr/xephi/authme/task/ChangePasswordTask.java b/src/main/java/cn/citycraft/AuthMe/task/ChangePasswordTask.java similarity index 81% rename from src/main/java/fr/xephi/authme/task/ChangePasswordTask.java rename to src/main/java/cn/citycraft/AuthMe/task/ChangePasswordTask.java index ee77357..ffbb3b8 100644 --- a/src/main/java/fr/xephi/authme/task/ChangePasswordTask.java +++ b/src/main/java/cn/citycraft/AuthMe/task/ChangePasswordTask.java @@ -1,16 +1,16 @@ -package fr.xephi.authme.task; +package cn.citycraft.AuthMe.task; import java.security.NoSuchAlgorithmException; import org.bukkit.entity.Player; -import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; -import fr.xephi.authme.cache.auth.PlayerAuth; -import fr.xephi.authme.cache.auth.PlayerCache; -import fr.xephi.authme.security.PasswordSecurity; -import fr.xephi.authme.settings.Messages; -import fr.xephi.authme.settings.Settings; +import cn.citycraft.AuthMe.AuthMe; +import cn.citycraft.AuthMe.ConsoleLogger; +import cn.citycraft.AuthMe.cache.auth.PlayerAuth; +import cn.citycraft.AuthMe.cache.auth.PlayerCache; +import cn.citycraft.AuthMe.security.PasswordSecurity; +import cn.citycraft.AuthMe.settings.Messages; +import cn.citycraft.AuthMe.settings.Settings; public class ChangePasswordTask implements Runnable { diff --git a/src/main/java/fr/xephi/authme/task/MessageTask.java b/src/main/java/cn/citycraft/AuthMe/task/MessageTask.java similarity index 82% rename from src/main/java/fr/xephi/authme/task/MessageTask.java rename to src/main/java/cn/citycraft/AuthMe/task/MessageTask.java index 36aa309..9099357 100644 --- a/src/main/java/fr/xephi/authme/task/MessageTask.java +++ b/src/main/java/cn/citycraft/AuthMe/task/MessageTask.java @@ -1,12 +1,12 @@ -package fr.xephi.authme.task; +package cn.citycraft.AuthMe.task; import org.bukkit.entity.Player; import org.bukkit.scheduler.BukkitTask; -import fr.xephi.authme.AuthMe; -import fr.xephi.authme.Utils; -import fr.xephi.authme.cache.auth.PlayerCache; -import fr.xephi.authme.cache.limbo.LimboCache; +import cn.citycraft.AuthMe.AuthMe; +import cn.citycraft.AuthMe.Utils; +import cn.citycraft.AuthMe.cache.auth.PlayerCache; +import cn.citycraft.AuthMe.cache.limbo.LimboCache; public class MessageTask implements Runnable { diff --git a/src/main/java/fr/xephi/authme/task/TimeoutTask.java b/src/main/java/cn/citycraft/AuthMe/task/TimeoutTask.java similarity index 81% rename from src/main/java/fr/xephi/authme/task/TimeoutTask.java rename to src/main/java/cn/citycraft/AuthMe/task/TimeoutTask.java index 811a36d..cfbef9f 100644 --- a/src/main/java/fr/xephi/authme/task/TimeoutTask.java +++ b/src/main/java/cn/citycraft/AuthMe/task/TimeoutTask.java @@ -1,11 +1,11 @@ -package fr.xephi.authme.task; +package cn.citycraft.AuthMe.task; import org.bukkit.Bukkit; import org.bukkit.entity.Player; -import fr.xephi.authme.AuthMe; -import fr.xephi.authme.cache.auth.PlayerCache; -import fr.xephi.authme.settings.Messages; +import cn.citycraft.AuthMe.AuthMe; +import cn.citycraft.AuthMe.cache.auth.PlayerCache; +import cn.citycraft.AuthMe.settings.Messages; public class TimeoutTask implements Runnable { diff --git a/src/main/java/fr/xephi/authme/api/API.java b/src/main/java/fr/xephi/authme/api/API.java index 694dd73..9ef6649 100644 --- a/src/main/java/fr/xephi/authme/api/API.java +++ b/src/main/java/fr/xephi/authme/api/API.java @@ -8,12 +8,12 @@ import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.bukkit.plugin.Plugin; -import fr.xephi.authme.AuthMe; -import fr.xephi.authme.Utils; -import fr.xephi.authme.cache.auth.PlayerAuth; -import fr.xephi.authme.cache.auth.PlayerCache; -import fr.xephi.authme.security.PasswordSecurity; -import fr.xephi.authme.settings.Settings; +import cn.citycraft.AuthMe.AuthMe; +import cn.citycraft.AuthMe.Utils; +import cn.citycraft.AuthMe.cache.auth.PlayerAuth; +import cn.citycraft.AuthMe.cache.auth.PlayerCache; +import cn.citycraft.AuthMe.security.PasswordSecurity; +import cn.citycraft.AuthMe.settings.Settings; public class API { diff --git a/src/main/java/fr/xephi/authme/api/NewAPI.java b/src/main/java/fr/xephi/authme/api/NewAPI.java index cfa405e..268e927 100644 --- a/src/main/java/fr/xephi/authme/api/NewAPI.java +++ b/src/main/java/fr/xephi/authme/api/NewAPI.java @@ -8,12 +8,12 @@ import org.bukkit.Server; import org.bukkit.entity.Player; import org.bukkit.plugin.Plugin; -import fr.xephi.authme.AuthMe; -import fr.xephi.authme.Utils; -import fr.xephi.authme.cache.auth.PlayerAuth; -import fr.xephi.authme.cache.auth.PlayerCache; -import fr.xephi.authme.security.PasswordSecurity; -import fr.xephi.authme.settings.Settings; +import cn.citycraft.AuthMe.AuthMe; +import cn.citycraft.AuthMe.Utils; +import cn.citycraft.AuthMe.cache.auth.PlayerAuth; +import cn.citycraft.AuthMe.cache.auth.PlayerCache; +import cn.citycraft.AuthMe.security.PasswordSecurity; +import cn.citycraft.AuthMe.settings.Settings; public class NewAPI { diff --git a/src/main/java/fr/xephi/authme/converter/RoyalAuthYamlReader.java b/src/main/java/fr/xephi/authme/converter/RoyalAuthYamlReader.java deleted file mode 100644 index 14c1dcc..0000000 --- a/src/main/java/fr/xephi/authme/converter/RoyalAuthYamlReader.java +++ /dev/null @@ -1,22 +0,0 @@ -package fr.xephi.authme.converter; - -import java.io.File; - -import fr.xephi.authme.settings.CustomConfiguration; - -public class RoyalAuthYamlReader extends CustomConfiguration { - - public RoyalAuthYamlReader(File file) { - super(file); - load(); - save(); - } - - public String getHash() { - return getString("login.password"); - } - - public long getLastLogin() { - return getLong("timestamps.quit"); - } -} diff --git a/src/main/java/fr/xephi/authme/events/PasswordEncryptionEvent.java b/src/main/java/fr/xephi/authme/events/PasswordEncryptionEvent.java index 7c0073b..b08225c 100644 --- a/src/main/java/fr/xephi/authme/events/PasswordEncryptionEvent.java +++ b/src/main/java/fr/xephi/authme/events/PasswordEncryptionEvent.java @@ -3,7 +3,7 @@ package fr.xephi.authme.events; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; -import fr.xephi.authme.security.crypts.EncryptionMethod; +import cn.citycraft.AuthMe.security.crypts.EncryptionMethod; /** *
@@ -11,7 +11,7 @@ import fr.xephi.authme.security.crypts.EncryptionMethod; * a custom EncryptionMethod *
* - * @see fr.xephi.authme.security.crypts.EncryptionMethod + * @see cn.citycraft.AuthMe.security.crypts.EncryptionMethod * * @author Xephi59 */ diff --git a/src/main/java/fr/xephi/authme/events/StoreInventoryEvent.java b/src/main/java/fr/xephi/authme/events/StoreInventoryEvent.java index a3cb114..e58fbcb 100644 --- a/src/main/java/fr/xephi/authme/events/StoreInventoryEvent.java +++ b/src/main/java/fr/xephi/authme/events/StoreInventoryEvent.java @@ -3,7 +3,7 @@ package fr.xephi.authme.events; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; -import fr.xephi.authme.cache.backup.JsonCache; +import cn.citycraft.AuthMe.cache.backup.JsonCache; /** * This event is call just before write inventory content to cache diff --git a/src/main/java/fr/xephi/authme/security/HashAlgorithm.java b/src/main/java/fr/xephi/authme/security/HashAlgorithm.java deleted file mode 100644 index 685c9f3..0000000 --- a/src/main/java/fr/xephi/authme/security/HashAlgorithm.java +++ /dev/null @@ -1,74 +0,0 @@ -package fr.xephi.authme.security; - -import org.apache.commons.lang.ObjectUtils.Null; - -import fr.xephi.authme.security.crypts.BCRYPT; -import fr.xephi.authme.security.crypts.BCRYPT2Y; -import fr.xephi.authme.security.crypts.CRAZYCRYPT1; -import fr.xephi.authme.security.crypts.CryptPBKDF2; -import fr.xephi.authme.security.crypts.CryptPBKDF2Django; -import fr.xephi.authme.security.crypts.DOUBLEMD5; -import fr.xephi.authme.security.crypts.IPB3; -import fr.xephi.authme.security.crypts.JOOMLA; -import fr.xephi.authme.security.crypts.MD5; -import fr.xephi.authme.security.crypts.MD5VB; -import fr.xephi.authme.security.crypts.MYBB; -import fr.xephi.authme.security.crypts.PHPBB; -import fr.xephi.authme.security.crypts.PHPFUSION; -import fr.xephi.authme.security.crypts.PLAINTEXT; -import fr.xephi.authme.security.crypts.ROYALAUTH; -import fr.xephi.authme.security.crypts.SALTED2MD5; -import fr.xephi.authme.security.crypts.SALTEDSHA512; -import fr.xephi.authme.security.crypts.SHA1; -import fr.xephi.authme.security.crypts.SHA256; -import fr.xephi.authme.security.crypts.SHA512; -import fr.xephi.authme.security.crypts.SMF; -import fr.xephi.authme.security.crypts.WBB3; -import fr.xephi.authme.security.crypts.WBB4; -import fr.xephi.authme.security.crypts.WHIRLPOOL; -import fr.xephi.authme.security.crypts.WORDPRESS; -import fr.xephi.authme.security.crypts.XAUTH; -import fr.xephi.authme.security.crypts.XF; - -public enum HashAlgorithm { - - BCRYPT(BCRYPT.class), - BCRYPT2Y(BCRYPT2Y.class), - CRAZYCRYPT1(CRAZYCRYPT1.class), - CUSTOM(Null.class), - DOUBLEMD5(DOUBLEMD5.class), - IPB3(IPB3.class), - JOOMLA(JOOMLA.class), - MD5(MD5.class), - MD5VB(MD5VB.class), - MYBB(MYBB.class), - PBKDF2(CryptPBKDF2.class), - PBKDF2DJANGO(CryptPBKDF2Django.class), - PHPBB(PHPBB.class), - PHPFUSION(PHPFUSION.class), - PLAINTEXT(PLAINTEXT.class), - ROYALAUTH(ROYALAUTH.class), - SALTED2MD5(SALTED2MD5.class), - SALTEDSHA512(SALTEDSHA512.class), - SHA1(SHA1.class), - SHA256(SHA256.class), - SHA512(SHA512.class), - SMF(SMF.class), - WBB3(WBB3.class), - WBB4(WBB4.class), - WHIRLPOOL(WHIRLPOOL.class), - WORDPRESS(WORDPRESS.class), - XAUTH(XAUTH.class), - XENFORO(XF.class); - - Class> classe; - - HashAlgorithm(final Class> classe) { - this.classe = classe; - } - - public Class> getclasse() { - return classe; - } - -} diff --git a/src/main/java/fr/xephi/authme/settings/CustomConfiguration.java b/src/main/java/fr/xephi/authme/settings/CustomConfiguration.java deleted file mode 100644 index 7976cde..0000000 --- a/src/main/java/fr/xephi/authme/settings/CustomConfiguration.java +++ /dev/null @@ -1,81 +0,0 @@ -package fr.xephi.authme.settings; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.nio.file.Files; -import java.nio.file.StandardCopyOption; - -import org.bukkit.configuration.InvalidConfigurationException; -import org.bukkit.configuration.file.YamlConfiguration; - -import fr.xephi.authme.AuthMe; -import fr.xephi.authme.ConsoleLogger; - -public class CustomConfiguration extends YamlConfiguration { - - private final File configFile; - - public CustomConfiguration(final File file) { - this.configFile = file; - load(); - } - - public File getConfigFile() { - return configFile; - } - - public void load() { - try { - super.load(configFile); - } catch (final FileNotFoundException e) { - ConsoleLogger.showError("未找到配置文件 " + configFile.getName() + ", 创建新文件..."); - reLoad(); - } catch (final IOException e) { - ConsoleLogger.showError("无法载入配置文件 " + configFile.getName()); - } catch (final InvalidConfigurationException e) { - ConsoleLogger.showError(configFile.getName() + " 不是一个有效的配置文件"); - } - } - - public boolean loadResource(final File file) { - if (!file.exists()) { - try { - if (!file.getParentFile().exists() && !file.getParentFile().mkdirs()) { - return false; - } - final int i = file.getPath().indexOf("AuthMe"); - if (i > -1) { - final String path = file.getPath().substring(i + 6).replace('\\', '/'); - final InputStream is = AuthMe.class.getResourceAsStream(path); - Files.copy(is, file.toPath(), StandardCopyOption.REPLACE_EXISTING); - return true; - } - } catch (final Exception e) { - ConsoleLogger.writeStackTrace(e); - ConsoleLogger.showError("从 JAR 载入配置文件失败..."); - } - } - return false; - } - - public boolean reLoad() { - boolean out = true; - if (!configFile.exists()) { - out = loadResource(configFile); - } - if (out) { - load(); - } - return out; - } - - public void save() { - try { - super.save(configFile); - } catch (final IOException ex) { - ConsoleLogger.showError("无法保存配置文件 " + configFile.getName()); - } - } -} diff --git a/src/main/java/fr/xephi/authme/settings/Spawn.java b/src/main/java/fr/xephi/authme/settings/Spawn.java deleted file mode 100644 index 1ef8df7..0000000 --- a/src/main/java/fr/xephi/authme/settings/Spawn.java +++ /dev/null @@ -1,111 +0,0 @@ -package fr.xephi.authme.settings; - -import java.io.File; - -import org.bukkit.Bukkit; -import org.bukkit.Location; - -/** - * - * @author Xephi59 - */ -public class Spawn extends CustomConfiguration { - - private static Spawn spawn; - - public Spawn() { - super(new File("." + File.separator + "plugins" + File.separator + "AuthMe" + File.separator + "spawn.yml")); - spawn = this; - load(); - save(); - saveDefault(); - } - - public static Spawn getInstance() { - if (spawn == null) { - spawn = new Spawn(); - } - return spawn; - } - - public Location getFirstSpawn() { - try { - if (this.getString("firstspawn.world").isEmpty() || this.getString("firstspawn.world").equals("")) - return null; - Location location = new Location(Bukkit.getWorld(this.getString("firstspawn.world")), this.getDouble("firstspawn.x"), this.getDouble("firstspawn.y"), this.getDouble("firstspawn.z"), - Float.parseFloat(this.getString("firstspawn.yaw")), Float.parseFloat(this.getString("firstspawn.pitch"))); - return location; - } catch (NullPointerException | NumberFormatException npe) { - return null; - } - } - - @Deprecated - public Location getLocation() { - return getSpawn(); - } - - public Location getSpawn() { - try { - if (this.getString("spawn.world").isEmpty() || this.getString("spawn.world").equals("")) - return null; - Location location = new Location(Bukkit.getWorld(this.getString("spawn.world")), this.getDouble("spawn.x"), this.getDouble("spawn.y"), this.getDouble("spawn.z"), - Float.parseFloat(this.getString("spawn.yaw")), Float.parseFloat(this.getString("spawn.pitch"))); - return location; - } catch (NullPointerException | NumberFormatException npe) { - return null; - } - } - - public boolean setFirstSpawn(Location location) { - try { - set("firstspawn.world", location.getWorld().getName()); - set("firstspawn.x", location.getX()); - set("firstspawn.y", location.getY()); - set("firstspawn.z", location.getZ()); - set("firstspawn.yaw", location.getYaw()); - set("firstspawn.pitch", location.getPitch()); - save(); - return true; - } catch (NullPointerException npe) { - return false; - } - } - - public boolean setSpawn(Location location) { - try { - set("spawn.world", location.getWorld().getName()); - set("spawn.x", location.getX()); - set("spawn.y", location.getY()); - set("spawn.z", location.getZ()); - set("spawn.yaw", location.getYaw()); - set("spawn.pitch", location.getPitch()); - save(); - return true; - } catch (NullPointerException npe) { - return false; - } - } - - private void saveDefault() { - if (!contains("spawn")) { - set("spawn.world", ""); - set("spawn.x", ""); - set("spawn.y", ""); - set("spawn.z", ""); - set("spawn.yaw", ""); - set("spawn.pitch", ""); - save(); - } - if (!contains("firstspawn")) { - set("firstspawn.world", ""); - set("firstspawn.x", ""); - set("firstspawn.y", ""); - set("firstspawn.z", ""); - set("firstspawn.yaw", ""); - set("firstspawn.pitch", ""); - save(); - } - } - -} diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f1a37f4..f83dc6a 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,9 +1,9 @@ -name: AuthMe -authors: [Xephi59, 喵♂呜] -website: http://dev.bukkit.org/bukkit-plugins/authme-reloaded/ -description: AuthMe prevents people, which aren't logged in, from doing stuff like placing blocks, moving, typing commands or seeing the inventory of the player. -main: fr.xephi.authme.AuthMe +name: ${project.artifactId} +description: ${project.description} +main: ${project.groupId}.${project.artifactId}.${project.artifactId} version: ${project.version} +authors: [Xephi59, 喵♂呜] +website: ${jenkins.url}/job/${project.artifactId}/ softdepend: [Vault, ChestShop, Citizens, Essentials, EssentialsSpawn, ProtocolLib] commands: register: