mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-23 18:55:11 +01:00
parent
15ca8284f4
commit
4c265f1879
@ -108,6 +108,9 @@ public class AuthMePlayerListener implements Listener {
|
||||
if (Settings.useEssentialsMotd && cmd.equals("/motd")) {
|
||||
return;
|
||||
}
|
||||
if(!Settings.isForcedRegistrationEnabled && Settings.allowAllCommandsIfRegIsOptional) {
|
||||
return;
|
||||
}
|
||||
if (Settings.allowCommands.contains(cmd)) {
|
||||
return;
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ public final class Settings {
|
||||
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
||||
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
||||
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
||||
kickPlayersBeforeStopping,
|
||||
kickPlayersBeforeStopping, allowAllCommandsIfRegIsOptional,
|
||||
customAttributes, generateImage, isRemoveSpeedEnabled, preventOtherCase;
|
||||
public static String helpHeader, getNickRegex, getUnloggedinGroup, getMySQLHost,
|
||||
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
||||
@ -211,6 +211,7 @@ public final class Settings {
|
||||
isStopEnabled = configFile.getBoolean("Security.SQLProblem.stopServer", true);
|
||||
reloadSupport = configFile.getBoolean("Security.ReloadCommand.useReloadCommandSupport", true);
|
||||
|
||||
allowAllCommandsIfRegIsOptional = configFile.getBoolean("settings.restrictions.allowAllCommandsIfRegistrationIsOptional", false);
|
||||
allowCommands = new ArrayList<>();
|
||||
allowCommands.addAll(Arrays.asList("/login", "/l", "/register", "/reg", "/email", "/captcha"));
|
||||
for (String cmd : configFile.getStringList("settings.restrictions.allowCommands")) {
|
||||
@ -576,6 +577,10 @@ public final class Settings {
|
||||
set("settings.restrictions.enablePasswordVerifier", null);
|
||||
changes = true;
|
||||
}
|
||||
if(!contains("settings.restrictions.allowAllCommandsIfRegistrationIsOptional")) {
|
||||
set("settings.restrictions.allowAllCommandsIfRegistrationIsOptional", false);
|
||||
changes = true;
|
||||
}
|
||||
if (!contains("settings.security.unsafePasswords")) {
|
||||
List<String> str = new ArrayList<>();
|
||||
str.add("123456");
|
||||
|
@ -67,6 +67,9 @@ settings:
|
||||
# Care that this feature blocks also all the commands not
|
||||
# listed in the list below.
|
||||
allowChat: false
|
||||
# WARNING: use this only if you need it!
|
||||
# Allow unlogged users to use all the commands if registration is not forced!
|
||||
allowAllCommandsIfRegistrationIsOptional: false
|
||||
# Commands allowed when a player is not authenticated
|
||||
allowCommands:
|
||||
- /login
|
||||
|
Loading…
Reference in New Issue
Block a user