Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| eaa30cc5eb | |||
| 4046105e87 | |||
| e782cccf72 | |||
| eaa0fba587 | |||
| cc248c3459 | |||
| ab24793861 | |||
| 25ebbf6f20 | |||
| d3e463165d | |||
| a459e6bad8 | |||
| 6a91130aa8 | |||
| d25949fc3b | |||
| f63f00fade | |||
| 19c18987f6 | |||
| db1650c27f | |||
| f45696f82f | |||
| 1c1879ea01 | |||
| 812762db25 | |||
| a4bf7adb60 | |||
| 11c5237950 | |||
| bc43afe3d0 | |||
| ced3d17537 | |||
| d9b3c59f30 | |||
| 8c286ceceb | |||
| 2ce6b066cc | |||
| 585b69ecd2 | |||
| 17187b05c1 | |||
| 6f193f05ce | |||
| a626265b09 | |||
| bda8613f93 | |||
| 44136bb91f | |||
| 69514738f7 | |||
| 220b31bb99 | |||
| 3b58a0acc9 | |||
| 5efa360cb2 | |||
| 2269c93dee | |||
| bf6233c024 | |||
| 3cc6f535a8 | |||
| 95d9edddeb | |||
| 4a559a7ccf | |||
| baaabb22d4 | |||
| 9e39f4a186 | |||
| c2b7a693b2 |
@@ -0,0 +1,34 @@
|
|||||||
|
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
|
||||||
|
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
|
||||||
|
|
||||||
|
name: Maven Package
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up JDK 11
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
java-version: '11'
|
||||||
|
distribution: 'temurin'
|
||||||
|
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
|
||||||
|
settings-path: ${{ github.workspace }} # location for the settings.xml file
|
||||||
|
|
||||||
|
- name: Build with Maven
|
||||||
|
run: mvn -B package --file pom.xml
|
||||||
|
|
||||||
|
- name: Publish to GitHub Packages Apache Maven
|
||||||
|
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ github.token }}
|
||||||
@@ -7,11 +7,11 @@ on:
|
|||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build_and_test:
|
Build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
jdkversion: [11]
|
jdkversion: [11]
|
||||||
runs-on: ubuntu-latest
|
runs-on: windows-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-java@v3
|
- uses: actions/setup-java@v3
|
||||||
@@ -19,5 +19,6 @@ jobs:
|
|||||||
distribution: 'temurin'
|
distribution: 'temurin'
|
||||||
java-version: ${{ matrix.jdkversion }}
|
java-version: ${{ matrix.jdkversion }}
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
- name: Build with Maven
|
- name: 使用Maven构建
|
||||||
run: mvn -V -B clean package --file pom.xml
|
run: mvn -V -B clean package --file pom.xml
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@ hs_err_pid*
|
|||||||
|
|
||||||
# Include the project's code style settings file
|
# Include the project's code style settings file
|
||||||
!.idea/codeStyleSettings.xml
|
!.idea/codeStyleSettings.xml
|
||||||
|
/target/class/
|
||||||
# File-based project format:
|
# File-based project format:
|
||||||
*.ipr
|
*.ipr
|
||||||
*.iws
|
*.iws
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# AuthMeReloaded
|
# AuthMeReReloaded
|
||||||
**"The best authentication plugin for the Bukkit modding API!"**
|
**"A Fork of Authme that contains many bug fixes!"**
|
||||||
|
**请前往Releases下载最新版本**
|
||||||
<img src="wallpaper.png?raw=true" alt="AuthMeLogo"/>
|
<img src="wallpaper.png?raw=true" alt="AuthMeLogo"/>
|
||||||
|
|
||||||
| Type | Badges |
|
| Type | Badges |
|
||||||
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| **General:** |   |
|
| **General:** |   |
|
||||||
| **Code quality:** | [](https://codeclimate.com/github/AuthMe/AuthMeReloaded) [](https://coveralls.io/github/AuthMe-Team/AuthMeReloaded?branch=master) |
|
| **代码质量:** | [](https://codeclimate.com/github/AuthMe/AuthMeReloaded) [](https://coveralls.io/github/AuthMe-Team/AuthMeReloaded?branch=master) |
|
||||||
| **Jenkins CI:** | [](https://ci.codemc.org/) [](https://ci.codemc.org/job/AuthMe/job/AuthMeReloaded)  |
|
| **Jenkins CI:** | [](https://ci.codemc.org/) [](https://ci.codemc.org/job/AuthMe/job/AuthMeReloaded)  |
|
||||||
| **Other CIs:** | [](https://www.travis-ci.com/AuthMe/AuthMeReloaded) |
|
| **Other CIs:** | [](https://www.travis-ci.com/AuthMe/AuthMeReloaded) |
|
||||||
|
|
||||||
|
|||||||
@@ -598,11 +598,26 @@
|
|||||||
<enabled>true</enabled>
|
<enabled>true</enabled>
|
||||||
</snapshots>
|
</snapshots>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>opencollab-snapshot</id>
|
||||||
|
<url>https://repo.opencollab.dev/maven-snapshots/</url>
|
||||||
|
<releases>
|
||||||
|
<enabled>false</enabled>
|
||||||
|
</releases>
|
||||||
|
<snapshots>
|
||||||
|
<enabled>true</enabled>
|
||||||
|
</snapshots>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Java Libraries -->
|
<!-- Java Libraries -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.geysermc.floodgate</groupId>
|
||||||
|
<artifactId>api</artifactId>
|
||||||
|
<version>2.2.0-SNAPSHOT</version>
|
||||||
|
<scope>provided</scope>
|
||||||
|
</dependency>
|
||||||
<!-- Jalu Injector -->
|
<!-- Jalu Injector -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>ch.jalu</groupId>
|
<groupId>ch.jalu</groupId>
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ public class PlayerListener implements Listener {
|
|||||||
private PermissionsManager permissionsManager;
|
private PermissionsManager permissionsManager;
|
||||||
@Inject
|
@Inject
|
||||||
private QuickCommandsProtectionManager quickCommandsProtectionManager;
|
private QuickCommandsProtectionManager quickCommandsProtectionManager;
|
||||||
|
|
||||||
// Lowest priority to apply fast protection checks
|
// Lowest priority to apply fast protection checks
|
||||||
@EventHandler(priority = EventPriority.LOWEST)
|
@EventHandler(priority = EventPriority.LOWEST)
|
||||||
public void onAsyncPlayerPreLoginEventLowest(AsyncPlayerPreLoginEvent event) {
|
public void onAsyncPlayerPreLoginEventLowest(AsyncPlayerPreLoginEvent event) {
|
||||||
@@ -113,6 +112,9 @@ public class PlayerListener implements Listener {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings.getProperty(RestrictionSettings.HOOK_FLOODGATE_PLAYER) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(event.getUniqueId())){
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Non-blocking checks
|
// Non-blocking checks
|
||||||
try {
|
try {
|
||||||
onJoinVerifier.checkIsValidName(name);
|
onJoinVerifier.checkIsValidName(name);
|
||||||
@@ -120,6 +122,7 @@ public class PlayerListener implements Listener {
|
|||||||
event.setKickMessage(messages.retrieveSingle(name, e.getReason(), e.getArgs()));
|
event.setKickMessage(messages.retrieveSingle(name, e.getReason(), e.getArgs()));
|
||||||
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
|
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -47,37 +47,21 @@ public class GeoIpService {
|
|||||||
|
|
||||||
private static final String DATABASE_NAME = "GeoLite2-Country";
|
private static final String DATABASE_NAME = "GeoLite2-Country";
|
||||||
private static final String DATABASE_FILE = DATABASE_NAME + ".mmdb";
|
private static final String DATABASE_FILE = DATABASE_NAME + ".mmdb";
|
||||||
private static final String DATABASE_TMP_FILE = DATABASE_NAME + ".mmdb.tmp";
|
|
||||||
|
|
||||||
private static final String ARCHIVE_FILE = DATABASE_NAME + ".mmdb.gz";
|
|
||||||
|
|
||||||
private static final String ARCHIVE_URL =
|
|
||||||
"https://updates.maxmind.com/geoip/databases/" + DATABASE_NAME + "/update";
|
|
||||||
|
|
||||||
private static final int UPDATE_INTERVAL_DAYS = 30;
|
|
||||||
|
|
||||||
private final ConsoleLogger logger = ConsoleLoggerFactory.get(GeoIpService.class);
|
private final ConsoleLogger logger = ConsoleLoggerFactory.get(GeoIpService.class);
|
||||||
private final Path dataFile;
|
private final Path dataFile;
|
||||||
private final BukkitService bukkitService;
|
|
||||||
private final Settings settings;
|
|
||||||
|
|
||||||
private GeoIp2Provider databaseReader;
|
private GeoIp2Provider databaseReader;
|
||||||
private volatile boolean downloading;
|
private volatile boolean downloading;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
GeoIpService(@DataFolder File dataFolder, BukkitService bukkitService, Settings settings) {
|
GeoIpService(@DataFolder File dataFolder) {
|
||||||
this.bukkitService = bukkitService;
|
|
||||||
this.dataFile = dataFolder.toPath().resolve(DATABASE_FILE);
|
this.dataFile = dataFolder.toPath().resolve(DATABASE_FILE);
|
||||||
this.settings = settings;
|
|
||||||
|
|
||||||
// Fires download of recent data or the initialization of the look up service
|
// Fires download of recent data or the initialization of the look up service
|
||||||
isDataAvailable();
|
isDataAvailable();
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
GeoIpService(@DataFolder File dataFolder, BukkitService bukkitService, Settings settings, GeoIp2Provider reader) {
|
GeoIpService(@DataFolder File dataFolder, GeoIp2Provider reader) {
|
||||||
this.bukkitService = bukkitService;
|
|
||||||
this.settings = settings;
|
|
||||||
this.dataFile = dataFolder.toPath().resolve(DATABASE_FILE);
|
this.dataFile = dataFolder.toPath().resolve(DATABASE_FILE);
|
||||||
|
|
||||||
this.databaseReader = reader;
|
this.databaseReader = reader;
|
||||||
@@ -101,73 +85,19 @@ public class GeoIpService {
|
|||||||
|
|
||||||
if (Files.exists(dataFile)) {
|
if (Files.exists(dataFile)) {
|
||||||
try {
|
try {
|
||||||
FileTime lastModifiedTime = Files.getLastModifiedTime(dataFile);
|
startReading();
|
||||||
if (Duration.between(lastModifiedTime.toInstant(), Instant.now()).toDays() <= UPDATE_INTERVAL_DAYS) {
|
// don't fire the update task - we are up to date
|
||||||
startReading();
|
return true;
|
||||||
|
|
||||||
// don't fire the update task - we are up to date
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
logger.debug("GEO IP database is older than " + UPDATE_INTERVAL_DAYS + " Days");
|
|
||||||
}
|
|
||||||
} catch (IOException ioEx) {
|
} catch (IOException ioEx) {
|
||||||
logger.logException("Failed to load GeoLiteAPI database", ioEx);
|
logger.logException("Failed to load GeoLiteAPI database", ioEx);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the downloading flag in order to fix race conditions outside
|
|
||||||
downloading = true;
|
|
||||||
|
|
||||||
// File is outdated or doesn't exist - let's try to download the data file!
|
// File is outdated or doesn't exist - let's try to download the data file!
|
||||||
// use bukkit's cached threads
|
// use bukkit's cached threads
|
||||||
bukkitService.runTaskAsynchronously(this::updateDatabase);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Tries to update the database by downloading a new version from the website.
|
|
||||||
*/
|
|
||||||
private void updateDatabase() {
|
|
||||||
logger.info("Downloading GEO IP database, because the old database is older than "
|
|
||||||
+ UPDATE_INTERVAL_DAYS + " days or doesn't exist");
|
|
||||||
|
|
||||||
Path downloadFile = null;
|
|
||||||
Path tempFile = null;
|
|
||||||
try {
|
|
||||||
// download database to temporarily location
|
|
||||||
downloadFile = Files.createTempFile(ARCHIVE_FILE, null);
|
|
||||||
tempFile = Files.createTempFile(DATABASE_TMP_FILE, null);
|
|
||||||
String expectedChecksum = downloadDatabaseArchive(downloadFile);
|
|
||||||
if (expectedChecksum == null) {
|
|
||||||
logger.info("There is no newer GEO IP database uploaded to MaxMind. Using the old one for now.");
|
|
||||||
startReading();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// tar extract database and copy to target destination
|
|
||||||
extractDatabase(downloadFile, tempFile);
|
|
||||||
|
|
||||||
// MD5 checksum verification
|
|
||||||
verifyChecksum(Hashing.md5(), tempFile, expectedChecksum);
|
|
||||||
|
|
||||||
Files.copy(tempFile, dataFile, StandardCopyOption.REPLACE_EXISTING);
|
|
||||||
|
|
||||||
//only set this value to false on success otherwise errors could lead to endless download triggers
|
|
||||||
logger.info("Successfully downloaded new GEO IP database to " + dataFile);
|
|
||||||
startReading();
|
|
||||||
} catch (IOException ioEx) {
|
|
||||||
logger.logException("Could not download GeoLiteAPI database", ioEx);
|
|
||||||
} finally {
|
|
||||||
// clean up
|
|
||||||
if (downloadFile != null) {
|
|
||||||
FileUtils.delete(downloadFile.toFile());
|
|
||||||
}
|
|
||||||
if (tempFile != null) {
|
|
||||||
FileUtils.delete(tempFile.toFile());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void startReading() throws IOException {
|
private void startReading() throws IOException {
|
||||||
databaseReader = new Reader(dataFile.toFile(), FileMode.MEMORY, new CHMCache());
|
databaseReader = new Reader(dataFile.toFile(), FileMode.MEMORY, new CHMCache());
|
||||||
@@ -177,101 +107,6 @@ public class GeoIpService {
|
|||||||
downloading = false;
|
downloading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Downloads the archive to the destination file if it's newer than the locally version.
|
|
||||||
*
|
|
||||||
* @param lastModified modification timestamp of the already present file
|
|
||||||
* @param destination save file
|
|
||||||
* @return null if no updates were found, the MD5 hash of the downloaded archive if successful
|
|
||||||
* @throws IOException if failed during downloading and writing to destination file
|
|
||||||
*/
|
|
||||||
private String downloadDatabaseArchive(Instant lastModified, Path destination) throws IOException {
|
|
||||||
String clientId = settings.getProperty(ProtectionSettings.MAXMIND_API_CLIENT_ID);
|
|
||||||
String licenseKey = settings.getProperty(ProtectionSettings.MAXMIND_API_LICENSE_KEY);
|
|
||||||
if (clientId.isEmpty() || licenseKey.isEmpty()) {
|
|
||||||
logger.warning("No MaxMind credentials found in the configuration file!"
|
|
||||||
+ " GeoIp protections will be disabled.");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
HttpURLConnection connection = (HttpURLConnection) new URL(ARCHIVE_URL).openConnection();
|
|
||||||
String basicAuth = "Basic " + new String(Base64.getEncoder().encode((clientId + ":" + licenseKey).getBytes()));
|
|
||||||
connection.setRequestProperty("Authorization", basicAuth);
|
|
||||||
|
|
||||||
if (lastModified != null) {
|
|
||||||
// Only download if we actually need a newer version - this field is specified in GMT zone
|
|
||||||
ZonedDateTime zonedTime = lastModified.atZone(ZoneId.of("GMT"));
|
|
||||||
String timeFormat = DateTimeFormatter.RFC_1123_DATE_TIME.format(zonedTime);
|
|
||||||
connection.addRequestProperty("If-Modified-Since", timeFormat);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (connection.getResponseCode() == HttpURLConnection.HTTP_NOT_MODIFIED) {
|
|
||||||
//we already have the newest version
|
|
||||||
connection.getInputStream().close();
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
String hash = connection.getHeaderField("X-Database-MD5");
|
|
||||||
String rawModifiedDate = connection.getHeaderField("Last-Modified");
|
|
||||||
Instant modifiedDate = Instant.from(DateTimeFormatter.RFC_1123_DATE_TIME.parse(rawModifiedDate));
|
|
||||||
Files.copy(connection.getInputStream(), destination, StandardCopyOption.REPLACE_EXISTING);
|
|
||||||
Files.setLastModifiedTime(destination, FileTime.from(modifiedDate));
|
|
||||||
return hash;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Downloads the archive to the destination file if it's newer than the locally version.
|
|
||||||
*
|
|
||||||
* @param destination save file
|
|
||||||
* @return null if no updates were found, the MD5 hash of the downloaded archive if successful
|
|
||||||
* @throws IOException if failed during downloading and writing to destination file
|
|
||||||
*/
|
|
||||||
private String downloadDatabaseArchive(Path destination) throws IOException {
|
|
||||||
Instant lastModified = null;
|
|
||||||
if (Files.exists(dataFile)) {
|
|
||||||
lastModified = Files.getLastModifiedTime(dataFile).toInstant();
|
|
||||||
}
|
|
||||||
|
|
||||||
return downloadDatabaseArchive(lastModified, destination);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Verify if the expected checksum is equal to the checksum of the given file.
|
|
||||||
*
|
|
||||||
* @param function the checksum function like MD5, SHA256 used to generate the checksum from the file
|
|
||||||
* @param file the file we want to calculate the checksum from
|
|
||||||
* @param expectedChecksum the expected checksum
|
|
||||||
* @throws IOException on I/O error reading the file or the checksum verification failed
|
|
||||||
*/
|
|
||||||
private void verifyChecksum(HashFunction function, Path file, String expectedChecksum) throws IOException {
|
|
||||||
HashCode actualHash = function.hashBytes(Files.readAllBytes(file));
|
|
||||||
HashCode expectedHash = HashCode.fromString(expectedChecksum);
|
|
||||||
if (!Objects.equals(actualHash, expectedHash)) {
|
|
||||||
throw new IOException("GEO IP Checksum verification failed. "
|
|
||||||
+ "Expected: " + expectedChecksum + "Actual:" + actualHash);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Extract the database from gzipped data. Existing outputFile will be replaced if it already exists.
|
|
||||||
*
|
|
||||||
* @param inputFile gzipped database input file
|
|
||||||
* @param outputFile destination file for the database
|
|
||||||
* @throws IOException on I/O error reading the archive, or writing the output
|
|
||||||
*/
|
|
||||||
private void extractDatabase(Path inputFile, Path outputFile) throws IOException {
|
|
||||||
// .gz -> gzipped file
|
|
||||||
try (BufferedInputStream in = new BufferedInputStream(Files.newInputStream(inputFile));
|
|
||||||
GZIPInputStream gzipIn = new GZIPInputStream(in)) {
|
|
||||||
|
|
||||||
// found the database file and copy file
|
|
||||||
Files.copy(gzipIn, outputFile, StandardCopyOption.REPLACE_EXISTING);
|
|
||||||
|
|
||||||
// update the last modification date to be same as in the archive
|
|
||||||
Files.setLastModifiedTime(outputFile, Files.getLastModifiedTime(inputFile));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the country code of the given IP address.
|
* Get the country code of the given IP address.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ public final class EmailSettings implements SettingsHolder {
|
|||||||
newProperty("Email.emailOauth2Token", "");
|
newProperty("Email.emailOauth2Token", "");
|
||||||
@Comment("Email notifications when the server shuts down")
|
@Comment("Email notifications when the server shuts down")
|
||||||
public static final Property<Boolean> SHUTDOWN_MAIL =
|
public static final Property<Boolean> SHUTDOWN_MAIL =
|
||||||
newProperty("Email.shutDownEmail", true);
|
newProperty("Email.shutDownEmail", false);
|
||||||
@Comment("Email notification address when the server is shut down")
|
@Comment("Email notification address when the server is shut down")
|
||||||
public static final Property<String> SHUTDOWN_MAIL_ADDRESS =
|
public static final Property<String> SHUTDOWN_MAIL_ADDRESS =
|
||||||
newProperty("Email.shutDownEmailAddress", "your@mail.com");
|
newProperty("Email.shutDownEmailAddress", "your@mail.com");
|
||||||
|
|||||||
@@ -20,17 +20,6 @@ public final class ProtectionSettings implements SettingsHolder {
|
|||||||
public static final Property<Boolean> ENABLE_PROTECTION_REGISTERED =
|
public static final Property<Boolean> ENABLE_PROTECTION_REGISTERED =
|
||||||
newProperty("Protection.enableProtectionRegistered", true);
|
newProperty("Protection.enableProtectionRegistered", true);
|
||||||
|
|
||||||
@Comment({"The MaxMind clientId used to download the GeoIp database,",
|
|
||||||
"get one at https://www.maxmind.com/en/accounts/current/license-key",
|
|
||||||
"The EssentialsX project has a very useful tutorial on how to generate",
|
|
||||||
"the license key: https://github.com/EssentialsX/Wiki/blob/master/GeoIP.md"})
|
|
||||||
public static final Property<String> MAXMIND_API_CLIENT_ID =
|
|
||||||
newProperty("Protection.geoIpDatabase.clientId", "");
|
|
||||||
|
|
||||||
@Comment("The MaxMind licenseKey used to download the GeoIp database.")
|
|
||||||
public static final Property<String> MAXMIND_API_LICENSE_KEY =
|
|
||||||
newProperty("Protection.geoIpDatabase.licenseKey", "");
|
|
||||||
|
|
||||||
@Comment({
|
@Comment({
|
||||||
"Countries allowed to join the server and register. For country codes, see",
|
"Countries allowed to join the server and register. For country codes, see",
|
||||||
"https://dev.maxmind.com/geoip/legacy/codes/iso3166/",
|
"https://dev.maxmind.com/geoip/legacy/codes/iso3166/",
|
||||||
|
|||||||
@@ -125,6 +125,9 @@ public final class RestrictionSettings implements SettingsHolder {
|
|||||||
public static final Property<String> ALLOWED_NICKNAME_CHARACTERS =
|
public static final Property<String> ALLOWED_NICKNAME_CHARACTERS =
|
||||||
newProperty("settings.restrictions.allowedNicknameCharacters", "[a-zA-Z0-9_]*");
|
newProperty("settings.restrictions.allowedNicknameCharacters", "[a-zA-Z0-9_]*");
|
||||||
|
|
||||||
|
@Comment("Allow FloodGatePlayer Join Without checkIsValidName()")
|
||||||
|
public static final Property<Boolean> HOOK_FLOODGATE_PLAYER =
|
||||||
|
newProperty("settings.restrictions.hookFloodGatePlayer", false);
|
||||||
@Comment({
|
@Comment({
|
||||||
"How far can unregistered players walk?",
|
"How far can unregistered players walk?",
|
||||||
"Set to 0 for unlimited radius"
|
"Set to 0 for unlimited radius"
|
||||||
|
|||||||
Binary file not shown.
@@ -15,6 +15,7 @@ softdepend:
|
|||||||
- Essentials
|
- Essentials
|
||||||
- EssentialsSpawn
|
- EssentialsSpawn
|
||||||
- ProtocolLib
|
- ProtocolLib
|
||||||
|
- floodgate
|
||||||
commands:
|
commands:
|
||||||
authme:
|
authme:
|
||||||
description: AuthMe op commands
|
description: AuthMe op commands
|
||||||
|
|||||||
Reference in New Issue
Block a user