mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 11:15:19 +01:00
Add a case checker option
This commit is contained in:
parent
f40d75e4aa
commit
1e5a29a502
@ -135,6 +135,13 @@ public class AsynchronousLogin {
|
|||||||
m.send(player, MessageKey.ACCOUNT_NOT_ACTIVATED);
|
m.send(player, MessageKey.ACCOUNT_NOT_ACTIVATED);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Settings.preventOtherCase && !player.getName().equals(pAuth.getRealName()))
|
||||||
|
{
|
||||||
|
// TODO: Add a message like : MessageKey.INVALID_NAME_CASE
|
||||||
|
m.send(player, MessageKey.USERNAME_ALREADY_ONLINE_ERROR);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
AuthMeAsyncPreLoginEvent event = new AuthMeAsyncPreLoginEvent(player);
|
AuthMeAsyncPreLoginEvent event = new AuthMeAsyncPreLoginEvent(player);
|
||||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||||
if (!event.canLogin())
|
if (!event.canLogin())
|
||||||
|
@ -73,7 +73,7 @@ public final class Settings {
|
|||||||
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
||||||
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
||||||
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
||||||
customAttributes, generateImage, isRemoveSpeedEnabled;
|
customAttributes, generateImage, isRemoveSpeedEnabled, preventOtherCase;
|
||||||
public static String helpHeader, getNickRegex, getUnloggedinGroup, getMySQLHost,
|
public static String helpHeader, getNickRegex, getUnloggedinGroup, getMySQLHost,
|
||||||
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
||||||
getMySQLTablename, getMySQLColumnName, getMySQLColumnPassword,
|
getMySQLTablename, getMySQLColumnName, getMySQLColumnPassword,
|
||||||
@ -294,6 +294,7 @@ public final class Settings {
|
|||||||
forceRegisterCommandsAsConsole = configFile.getStringList("settings.forceRegisterCommandsAsConsole");
|
forceRegisterCommandsAsConsole = configFile.getStringList("settings.forceRegisterCommandsAsConsole");
|
||||||
customAttributes = configFile.getBoolean("Hooks.customAttributes");
|
customAttributes = configFile.getBoolean("Hooks.customAttributes");
|
||||||
generateImage = configFile.getBoolean("Email.generateImage", false);
|
generateImage = configFile.getBoolean("Email.generateImage", false);
|
||||||
|
preventOtherCase = configFile.getBoolean("settings.preventOtherCase", false);
|
||||||
|
|
||||||
// Load the welcome message
|
// Load the welcome message
|
||||||
getWelcomeMessage();
|
getWelcomeMessage();
|
||||||
@ -713,6 +714,12 @@ public final class Settings {
|
|||||||
changes = true;
|
changes = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!contains("settings.preventOtherCase"))
|
||||||
|
{
|
||||||
|
set("settings.preventOtherCase", false);
|
||||||
|
changes = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (contains("Email.mailText"))
|
if (contains("Email.mailText"))
|
||||||
{
|
{
|
||||||
set("Email.mailText", null);
|
set("Email.mailText", null);
|
||||||
|
@ -259,6 +259,9 @@ settings:
|
|||||||
delayJoinLeaveMessages: true
|
delayJoinLeaveMessages: true
|
||||||
# Do we need to add potion effect Blinding before login/register ?
|
# Do we need to add potion effect Blinding before login/register ?
|
||||||
applyBlindEffect: false
|
applyBlindEffect: false
|
||||||
|
# Do we need to prevent people to login without another case ?
|
||||||
|
# Xephi is registered, also Xephi can login, but not XEPHI/xephi/XePhI
|
||||||
|
preventOtherCase: false
|
||||||
ExternalBoardOptions:
|
ExternalBoardOptions:
|
||||||
# MySQL column for the salt , needed for some forum/cms support
|
# MySQL column for the salt , needed for some forum/cms support
|
||||||
mySQLColumnSalt: ''
|
mySQLColumnSalt: ''
|
||||||
|
Loading…
Reference in New Issue
Block a user