修复注册后无法直接登录的问题...

Signed-off-by: 502647092 <jtb1@163.com>
master
502647092 2016-01-08 13:55:53 +08:00
parent 16be94d926
commit ea4b75a212
5 changed files with 890 additions and 900 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>cn.citycraft</groupId>
<artifactId>AuthMe</artifactId>
<version>6.0</version>
<version>6.0.1</version>
<packaging>jar</packaging>
<name>AuthMe</name>
<description>登录插件重制版本</description>
@ -39,7 +39,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<javaVersion>1.7</javaVersion>
<jenkins.url>http://ci.citycraft.cn:8080</jenkins.url>
<update.description>测试版本发布...</update.description>
<update.description>&amp;c修复注册后无法直接登录的问题...</update.description>
<bukkitVersion>1.8.8-R0.1-SNAPSHOT</bukkitVersion>
</properties>
<build>

View File

@ -13,19 +13,9 @@ import cn.citycraft.AuthMe.cache.backup.JsonCache;
import cn.citycraft.AuthMe.settings.Settings;
public class LimboCache {
private volatile static LimboCache singleton;
public static LimboCache getInstance() {
if (singleton == null) {
singleton = new LimboCache(AuthMe.getInstance());
}
return singleton;
}
public ConcurrentHashMap<String, LimboPlayer> cache;
public AuthMe plugin;
private final JsonCache playerData;
private LimboCache(final AuthMe plugin) {
@ -34,6 +24,13 @@ public class LimboCache {
this.playerData = new JsonCache();
}
public static LimboCache getInstance() {
if (singleton == null) {
singleton = new LimboCache(AuthMe.getInstance());
}
return singleton;
}
public void addLimboPlayer(final Player player) {
final String name = player.getName().toLowerCase();
Location loc = player.getLocation();
@ -56,7 +53,7 @@ public class LimboCache {
try {
playerGroup = plugin.permission.getPrimaryGroup(player);
} catch (final UnsupportedOperationException e) {
ConsoleLogger.showError("Your permission system (" + plugin.permission.getName() + ") do not support Group system with that config... unhook!");
ConsoleLogger.showError("你的权限系统 (" + plugin.permission.getName() + ") 不支持权限组功能 移除配置... UnHook!");
plugin.permission = null;
}
}

View File

@ -106,7 +106,7 @@ public class AsyncronousRegister {
m.send(player, "error");
return;
}
if (!Settings.forceRegLogin) {
if (Settings.forceRegLogin) {
PlayerCache.getInstance().addPlayer(auth);
database.setLogged(name);
}

View File

@ -230,10 +230,6 @@ public final class Settings {
useCaptcha = configFile.getBoolean("Security.captcha.useCaptcha", false);
maxLoginTry = configFile.getInt("Security.captcha.maxLoginTry", 5);
captchaLength = configFile.getInt("Security.captcha.captchaLength", 5);
getMailSubject = configFile.getString("Email.mailSubject", "Your new AuthMe Password");
getMailText = configFile.getString("Email.mailText",
"Dear <playername>, <br /><br /> This is your new AuthMe password for the server <br /><br /> <servername> : <br /><br /> <generatedpass><br /><br />Do not forget to change password after login! <br /> /changepassword <generatedpass> newPassword");
emailRegistration = configFile.getBoolean("settings.registration.enableEmailRegistrationSystem", false);
saltLength = configFile.getInt("settings.security.doubleMD5SaltLength", 8);
getmaxRegPerEmail = configFile.getInt("Email.maxRegPerEmail", 1);
multiverse = configFile.getBoolean("Hooks.multiverse", true);
@ -273,7 +269,7 @@ public final class Settings {
countriesBlacklist = configFile.getStringList("Protection.countriesBlacklist");
broadcastWelcomeMessage = configFile.getBoolean("settings.broadcastWelcomeMessage", false);
forceRegKick = configFile.getBoolean("settings.registration.forceKickAfterRegister", false);
forceRegLogin = configFile.getBoolean("settings.registration.forceLoginAfterRegister", false);
forceRegLogin = configFile.getBoolean("settings.registration.forceLoginAfterRegister", true);
getMySQLColumnLogged = configFile.getString("DataSource.mySQLColumnLogged", "isLogged");
spawnPriority = configFile.getString("settings.restrictions.spawnPriority", "authme,essentials,multiverse,default");
getMaxLoginPerIp = configFile.getInt("settings.restrictions.maxLoginPerIp", 0);
@ -292,7 +288,6 @@ public final class Settings {
generateImage = configFile.getBoolean("Email.generateImage", true);
// Load the welcome message
getWelcomeMessage();
}
public static boolean reloadcfg() {

View File

@ -196,8 +196,8 @@ settings:
# 是否在玩家成功注册后t出玩家
# 不使用下面的注册功能
forceKickAfterRegister: false
# 是否需要Autheme强制在正常注册后才能使用/login
forceLoginAfterRegister: false
# 是否需要Autheme注册以后直接使玩家登录
forceLoginAfterRegister: true
unrestrictions:
# 在下面列出的所有idAuthme都将忽略注册和登陆。启用该选项要注意风险
# 如果你要添加[]的括号,你必须使用' '
@ -226,8 +226,6 @@ settings:
delayJoinMessage: false
# 是否需要再 login或register 后使用药水效果?
applyBlindEffect: false
ExternalBoardOptions:
# MySQL column for the salt , needed for some forum/cms support
mySQLColumnSalt: ''