From e109094472856ecedd7ccf0ea85cc74a0412ac0e Mon Sep 17 00:00:00 2001 From: Sabrita Date: Tue, 28 Feb 2023 13:13:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E6=B5=8B=E6=B5=8B=E8=AF=95=E9=A1=B9?= =?UTF-8?q?=20=E9=BB=98=E8=AE=A4=E5=BC=80=E5=90=AF=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=90=8D=E9=99=90=E5=88=B6=E5=B9=B6=E5=A2=9E=E5=8A=A0=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=99=90=E5=88=B6=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/fr/xephi/authme/AuthMe.java | 14 ++------------ .../authme/settings/properties/EmailSettings.java | 2 +- .../settings/properties/RestrictionSettings.java | 9 +++++++-- 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/src/main/java/fr/xephi/authme/AuthMe.java b/src/main/java/fr/xephi/authme/AuthMe.java index 8bf2cc4d..0c514602 100644 --- a/src/main/java/fr/xephi/authme/AuthMe.java +++ b/src/main/java/fr/xephi/authme/AuthMe.java @@ -2,7 +2,6 @@ package fr.xephi.authme; import ch.jalu.injector.Injector; import ch.jalu.injector.InjectorBuilder; -import com.google.common.annotations.VisibleForTesting; import fr.xephi.authme.api.v3.AuthMeApi; import fr.xephi.authme.command.CommandHandler; import fr.xephi.authme.datasource.DataSource; @@ -37,16 +36,15 @@ import fr.xephi.authme.util.ExceptionUtils; import org.bukkit.Server; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; -import org.bukkit.plugin.PluginDescriptionFile; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; -import org.bukkit.plugin.java.JavaPluginLoader; import org.bukkit.scheduler.BukkitScheduler; import org.jetbrains.annotations.NotNull; import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Objects; import java.util.function.Consumer; import static fr.xephi.authme.service.BukkitService.TICKS_PER_MINUTE; @@ -82,14 +80,6 @@ public class AuthMe extends JavaPlugin { public AuthMe() { } - /* - * Constructor for unit testing. - */ - @VisibleForTesting - AuthMe(JavaPluginLoader loader, PluginDescriptionFile description, File dataFolder, File file) { - super(loader, description, dataFolder, file); - } - /** * Get the plugin's name. * @@ -156,7 +146,7 @@ public class AuthMe extends JavaPlugin { th.printStackTrace(); } else { logger.logException("File '" + yamlParseException.getFile() + "' contains invalid YAML. " - + "Please run its contents through http://yamllint.com", yamlParseException); + + "Please run its contents through https://yamllint.com", yamlParseException); } stopOrUnload(); return; diff --git a/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java b/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java index 11b1a1c8..376f6323 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/EmailSettings.java @@ -10,7 +10,7 @@ public final class EmailSettings implements SettingsHolder { @Comment("Email SMTP server host") public static final Property SMTP_HOST = - newProperty("Email.mailSMTP", "smtp.gmail.com"); + newProperty("Email.mailSMTP", "smtp.163.com"); @Comment("Email SMTP server port") public static final Property SMTP_PORT = diff --git a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java index 166e71ed..05366cfb 100644 --- a/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java +++ b/src/main/java/fr/xephi/authme/settings/properties/RestrictionSettings.java @@ -74,7 +74,7 @@ public final class RestrictionSettings implements SettingsHolder { "To activate the restricted user feature you need", "to enable this option and configure the AllowedRestrictedUser field."}) public static final Property ENABLE_RESTRICTED_USERS = - newProperty("settings.restrictions.AllowRestrictedUser", false); + newProperty("settings.restrictions.AllowRestrictedUser", true); @Comment({ "The restricted user feature will kick players listed below", @@ -85,7 +85,12 @@ public final class RestrictionSettings implements SettingsHolder { " - playername;127.0.0.1", " - playername;regex:127\\.0\\.0\\..*"}) public static final Property> RESTRICTED_USERS = - newLowercaseStringSetProperty("settings.restrictions.AllowedRestrictedUser","Sattera;127.0.0.1","Server_Land;127.0.0.1"); + newLowercaseStringSetProperty("settings.restrictions.AllowedRestrictedUser", + "server_land;127.0.0.1","server;127.0.0.1","bukkit;127.0.0.1","purpur;127.0.0.1", + "system;127.0.0.1","admin;127.0.0.1","md_5;127.0.0.1","administrator;127.0.0.1","notch;127.0.0.1", + "spigot;127.0.0.1","bukkit;127.0.0.1","bukkitcraft;127.0.0.1","paperclip;127.0.0.1","papermc;127.0.0.1", + "spigotmc;127.0.0.1","root;127.0.0.1","console;127.0.0.1","purpur;127.0.0.1","authme;127.0.0.1", + "owner;127.0.0.1"); @Comment("Ban unknown IPs trying to log in with a restricted username?") public static final Property BAN_UNKNOWN_IP =