Compare commits

..

53 Commits

Author SHA1 Message Date
HaHaWTH 778edac895 B49 release 2024-05-24 16:41:36 +08:00
HaHaWTH 17d1cf1665 Update SpigotAPI 2024-05-24 00:55:58 +08:00
HaHaWTH 3f3671c95c Fix #146 and cleanup 2024-05-24 00:42:47 +08:00
HaHaWTH 52c06917c3 Add repository 2024-05-23 18:02:47 +08:00
HaHaWTH b2ea5cbef8 Dynamically download H2 2024-05-23 17:55:42 +08:00
HaHaWTH 99c7466b37 Better handling teleportUnAuthedToSpawn 2024-05-22 23:55:34 +08:00
HaHaWTH e60c18d8a8 Merge remote-tracking branch 'origin/master' 2024-05-22 23:49:33 +08:00
HaHaWTH 8c4da6288e Revert "Always save quit location and fixes #2769 issue 1"
This reverts commit c1eee8e139.
2024-05-22 23:48:28 +08:00
DGun Otto 1a73adf414 Remove relocation 2024-05-11 14:28:38 +08:00
HaHaWTH cb76ae01e1 Fix potential NPE when using velocity 2024-05-08 08:32:19 +08:00
HaHaWTH 89df4e451c B48 release 2024-04-30 22:58:53 +08:00
DGun Otto fe39310eca Merge pull request #138 from HaHaWTH/HaHaWTH-patch-1
Update workflows
2024-04-30 00:40:07 +08:00
DGun Otto b9790d458e Update workflows 2024-04-30 00:30:28 +08:00
DGun Otto dc8d5f741a [ci skip] Update README.md 2024-04-25 23:46:55 +08:00
DGun Otto b3288e9c72 [ci skip] Update LICENSE 2024-04-25 23:44:25 +08:00
DGun Otto c88aa79377 [ci skip] Update LICENSE 2024-04-25 23:42:27 +08:00
HaHaWTH 2327c07f9a Revert email dependency update 2024-04-24 16:46:22 +08:00
DGun Otto 8e93d4cd19 Merge pull request #133 from HaHaWTH/dependabot/maven/org.apache.commons-commons-email-1.6.0
Bump org.apache.commons:commons-email from 1.6-SNAPSHOT to 1.6.0
2024-04-24 15:31:23 +08:00
HaHaWTH a963bde749 Merge remote-tracking branch 'origin/master' 2024-04-24 15:26:57 +08:00
HaHaWTH 10b6997c32 Don't apply relocation and fixes #999 again 2024-04-24 15:26:20 +08:00
DGun Otto 970c77678b Merge pull request #132 from HaHaWTH/dependabot/maven/org.apache.maven.plugins-maven-shade-plugin-3.5.3
Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.2 to 3.5.3
2024-04-24 14:22:30 +08:00
dependabot[bot] 07c479746b Bump org.apache.commons:commons-email from 1.6-SNAPSHOT to 1.6.0
Bumps org.apache.commons:commons-email from 1.6-SNAPSHOT to 1.6.0.

---
updated-dependencies:
- dependency-name: org.apache.commons:commons-email
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-24 04:38:47 +00:00
dependabot[bot] d90a8a36cf Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.2 to 3.5.3
Bumps [org.apache.maven.plugins:maven-shade-plugin](https://github.com/apache/maven-shade-plugin) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/apache/maven-shade-plugin/releases)
- [Commits](https://github.com/apache/maven-shade-plugin/compare/maven-shade-plugin-3.5.2...maven-shade-plugin-3.5.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-shade-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-24 04:38:40 +00:00
HaHaWTH c1eee8e139 Always save quit location and fixes #2769 issue 1 2024-04-24 02:21:40 +08:00
DGun Otto dd831a65a5 Downgrade email dependency version 2024-04-24 00:56:24 +08:00
DGun Otto 51783604c6 Merge pull request #130 from HaHaWTH/dependabot/maven/org.apache.maven.plugins-maven-jar-plugin-3.4.1
Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.0 to 3.4.1
2024-04-22 12:37:00 +08:00
dependabot[bot] 9f8471d4e9 Bump org.apache.maven.plugins:maven-jar-plugin from 3.4.0 to 3.4.1
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.4.0...maven-jar-plugin-3.4.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 04:11:25 +00:00
HaHaWTH c4ac2601ad Merge remote-tracking branch 'origin/master' 2024-04-20 03:53:59 +08:00
HaHaWTH b4a0994871 Update GeoLite2 database 2024-04-20 03:53:41 +08:00
DGun Otto b619e1dac5 Merge pull request #128 from HaHaWTH/dependabot/maven/org.xerial-sqlite-jdbc-3.45.3.0
Bump org.xerial:sqlite-jdbc from 3.45.2.0 to 3.45.3.0
2024-04-16 14:24:56 +08:00
dependabot[bot] ba1703c684 Bump org.xerial:sqlite-jdbc from 3.45.2.0 to 3.45.3.0
Bumps [org.xerial:sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.45.2.0 to 3.45.3.0.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.45.2.0...3.45.3.0)

---
updated-dependencies:
- dependency-name: org.xerial:sqlite-jdbc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-16 04:52:25 +00:00
DGun Otto 131b5b7805 Merge pull request #127 from HaHaWTH/dependabot/maven/org.apache.maven.plugins-maven-jar-plugin-3.4.0
Bump org.apache.maven.plugins:maven-jar-plugin from 3.3.0 to 3.4.0
2024-04-15 16:19:11 +08:00
dependabot[bot] 099415e823 Bump org.apache.maven.plugins:maven-jar-plugin from 3.3.0 to 3.4.0
Bumps [org.apache.maven.plugins:maven-jar-plugin](https://github.com/apache/maven-jar-plugin) from 3.3.0 to 3.4.0.
- [Release notes](https://github.com/apache/maven-jar-plugin/releases)
- [Commits](https://github.com/apache/maven-jar-plugin/compare/maven-jar-plugin-3.3.0...maven-jar-plugin-3.4.0)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-jar-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-15 04:46:39 +00:00
HaHaWTH 91261f4315 Update config comment 2024-04-15 02:20:19 +08:00
HaHaWTH 548be5042d Merge remote-tracking branch 'origin/master' 2024-04-07 12:37:57 +08:00
HaHaWTH e9fd7fd80f B47 release 2024-04-07 12:37:34 +08:00
DGun Otto e44cd3edc6 Merge pull request #124 from HaHaWTH/dependabot/maven/org.apache.maven.plugins-maven-source-plugin-3.3.1
Bump org.apache.maven.plugins:maven-source-plugin from 3.3.0 to 3.3.1
2024-04-05 13:16:21 +08:00
dependabot[bot] 219a7a3493 Bump org.apache.maven.plugins:maven-source-plugin from 3.3.0 to 3.3.1
Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.3.0 to 3.3.1.
- [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.3.0...maven-source-plugin-3.3.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-source-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-05 04:57:38 +00:00
DGun Otto 6876a6dd9f Update workflows 2024-04-04 14:51:02 +08:00
DGun Otto d04a69f481 Update workflows 2024-04-04 13:26:41 +08:00
DGun Otto dfa8317706 Update workflows 2024-04-04 13:21:27 +08:00
HaHaWTH 555514f7dd Add warning for H2 database 2024-04-03 19:02:19 +08:00
HaHaWTH 74633937bc Revert stupid changes made by the original upstream 2024-04-03 16:40:37 +08:00
HaHaWTH 948736b5ea Merge upstream pull request #2777 2024-04-03 16:11:06 +08:00
HaHaWTH 5e54b8b105 Update build 2024-04-03 13:55:42 +08:00
DGun Otto 0d818dd00f Merge pull request #121 from HaHaWTH/dependabot/maven/org.jacoco-jacoco-maven-plugin-0.8.12
Bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12
2024-04-03 13:07:47 +08:00
dependabot[bot] 22586e601f Bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12
Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.11 to 0.8.12.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.11...v0.8.12)

---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-03 05:02:43 +00:00
DGun Otto 9938df3c28 [ci skip] Update feature_request.yml 2024-04-02 20:16:08 +08:00
DGun Otto ec2e8d3654 [ci skip] Update bug_report.yml 2024-04-02 20:14:50 +08:00
DGun Otto 71a9c0c98f [ci skip] Update README.md 2024-04-02 19:59:44 +08:00
HaHaWTH 54cef57ea5 Configurable send delay 2024-04-02 17:34:03 +08:00
HaHaWTH 73c1116047 Delayed more 2024-04-02 01:27:58 +08:00
HaHaWTH abb85f005d Delayed more 2024-04-02 01:23:53 +08:00
23 changed files with 176 additions and 164 deletions
+6 -1
View File
@@ -47,8 +47,10 @@ body:
description: Which server implementation are you using? description: Which server implementation are you using?
multiple: false multiple: false
options: options:
- Standalone server (no proxy) - Standalone(Spigot)
- Standalone(Folia)
- BungeeCord - BungeeCord
- Velocity
validations: validations:
required: true required: true
@@ -60,6 +62,9 @@ body:
options: options:
- SQLite - SQLite
- MySQL - MySQL
- H2
- MariaDB
- PostgreSQL
validations: validations:
required: true required: true
+1 -1
View File
@@ -1,6 +1,6 @@
name: Feature request name: Feature request
description: Suggest an idea for AuthMe description: Suggest an idea for AuthMe
labels: 'Type: enhancement' labels: 'enhancement'
body: body:
- type: markdown - type: markdown
+9 -7
View File
@@ -10,11 +10,11 @@ jobs:
Build: Build:
strategy: strategy:
matrix: matrix:
jdkversion: [ 17 ] jdkversion: [ 21 ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-java@v3 - uses: actions/setup-java@v4
with: with:
distribution: 'temurin' distribution: 'temurin'
java-version: ${{ matrix.jdkversion }} java-version: ${{ matrix.jdkversion }}
@@ -22,10 +22,10 @@ jobs:
- name: Build - name: Build
run: mvn -V -B clean package --file pom.xml run: mvn -V -B clean package --file pom.xml
- name: Upload Artifacts - name: Upload Artifacts
uses: actions/upload-artifact@v3.1.2 uses: actions/upload-artifact@v4
with: with:
name: Download name: Download
path: ./target/AuthMe-5.6.0-FORK-Spigot-Universal.jar path: ./target/AuthMe-5.6.0-FORK-Universal.jar
runtime-test: runtime-test:
name: Plugin Runtime Test name: Plugin Runtime Test
needs: [Build] needs: [Build]
@@ -37,8 +37,10 @@ jobs:
javaVersion: '8' javaVersion: '8'
- mcVersion: '1.12.2' - mcVersion: '1.12.2'
javaVersion: '8' javaVersion: '8'
- mcVersion: '1.20.2' - mcVersion: '1.18.2'
javaVersion: '20' javaVersion: '17'
- mcVersion: '1.20.4'
javaVersion: '21'
steps: steps:
- uses: HaHaWTH/minecraft-plugin-runtime-test@paper - uses: HaHaWTH/minecraft-plugin-runtime-test@paper
with: with:
+8 -1
View File
@@ -8,7 +8,10 @@
<img src="https://img.shields.io/github/languages/code-size/HaHaWTH/AuthMeReReloaded.svg" alt="Code size"/> <img src="https://img.shields.io/github/languages/code-size/HaHaWTH/AuthMeReReloaded.svg" alt="Code size"/>
<img src="https://img.shields.io/github/repo-size/HaHaWTH/AuthMeReReloaded.svg" alt="GitHub repo size"/> <img src="https://img.shields.io/github/repo-size/HaHaWTH/AuthMeReReloaded.svg" alt="GitHub repo size"/>
<img src="https://www.codefactor.io/repository/github/hahawth/authmerereloaded/badge" alt="CodeFactor" /> <img src="https://www.codefactor.io/repository/github/hahawth/authmerereloaded/badge" alt="CodeFactor" />
<img src="https://img.shields.io/github/downloads/HaHaWTH/AuthMeReReloaded/total" alt="Downloads" /> <img alt="GitHub Downloads (all assets, all releases)" src="https://img.shields.io/github/downloads/HaHaWTH/AuthMeReReloaded/total?logo=github&label=GitHub%20Downloads&color=black">
<img alt="Spiget Downloads" src="https://img.shields.io/spiget/downloads/114010?logo=spigotmc&label=SpigotMC%20Downloads&color=orange">
<img alt="Modrinth Downloads" src="https://img.shields.io/modrinth/dt/3IEZ9vol?logo=modrinth&label=Modrinth%20Downloads&color=light-green">
<img alt="Hangar Downloads" src="https://img.shields.io/hangar/dt/AuthMeReReloaded?logo=hangar&label=Hangar%20Downloads&color=white">
</p> </p>
**Detailed Changes:** **Detailed Changes:**
@@ -42,6 +45,10 @@ If you are using FRP(内网穿透) for your server, this plugin may help [HAProx
**Pull Requests and suggestions are welcome!** **Pull Requests and suggestions are welcome!**
## License
Only additions to AuthMeReloaded is under AGPL-3.0 license, AuthMeReloaded is licensed under GPL-3.0.
<picture> <picture>
<source <source
media="(prefers-color-scheme: dark)" media="(prefers-color-scheme: dark)"
+38 -108
View File
@@ -67,7 +67,7 @@
<maven.minimumVersion>3.6.3</maven.minimumVersion> <maven.minimumVersion>3.6.3</maven.minimumVersion>
<!-- Dependencies versions --> <!-- Dependencies versions -->
<spigot.version>1.20.4-R0.1-SNAPSHOT</spigot.version> <spigot.version>1.20.6-R0.1-SNAPSHOT</spigot.version>
<!-- Versioning properties --> <!-- Versioning properties -->
<project.outputName>AuthMe</project.outputName> <project.outputName>AuthMe</project.outputName>
@@ -82,54 +82,11 @@
<pluginDescription.authors>sgdc3, games647, Hex3l, krusic22</pluginDescription.authors> <pluginDescription.authors>sgdc3, games647, Hex3l, krusic22</pluginDescription.authors>
</properties> </properties>
<!-- Jenkins profile -->
<profiles>
<!-- Set the buildNumber using the jenkins env. variable -->
<profile>
<id>jenkins</id>
<activation>
<property>
<name>env.BUILD_NUMBER</name>
</property>
</activation>
<properties>
<project.buildNumber>${env.BUILD_NUMBER}</project.buildNumber>
</properties>
</profile>
<!-- Skip long hash tests, reduce the test time of 20-30 seconds -->
<profile>
<id>skipLongHashTests</id>
<activation>
<property>
<name>skipLongHashTests</name>
</property>
</activation>
<properties>
<project.skipExtendedHashTests>true</project.skipExtendedHashTests>
</properties>
</profile>
<!-- Skip javadoc generation for faster local build -->
<profile>
<id>skipJavadocGeneration</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build> <build>
<defaultGoal>clean package</defaultGoal> <defaultGoal>clean package</defaultGoal>
<!-- Little hack to make the shade plugin output a file with the right name --> <!-- Little hack to make the shade plugin output a file with the right name -->
<finalName>${project.finalNameBase}-noshade</finalName> <finalName>${project.finalNameBase}-noshade</finalName>
<resources> <resources>
<resource> <resource>
<directory>.</directory> <directory>.</directory>
@@ -222,7 +179,7 @@
<plugin> <plugin>
<groupId>org.jacoco</groupId> <groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId> <artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version> <version>0.8.12</version>
<executions> <executions>
<execution> <execution>
<id>pre-unit-test</id> <id>pre-unit-test</id>
@@ -258,7 +215,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version> <version>3.4.1</version>
</plugin> </plugin>
<!-- Generate a jar containing the source javadoc --> <!-- Generate a jar containing the source javadoc -->
<plugin> <plugin>
@@ -282,7 +239,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>3.3.0</version> <version>3.3.1</version>
<configuration> <configuration>
<finalName>${project.finalNameBase}</finalName> <finalName>${project.finalNameBase}</finalName>
</configuration> </configuration>
@@ -299,7 +256,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version> <version>3.5.3</version>
<executions> <executions>
<execution> <execution>
<id>shaded-jar</id> <id>shaded-jar</id>
@@ -308,6 +265,7 @@
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>
<configuration> <configuration>
<finalName>${project.finalNameBase}-Lite</finalName>
<artifactSet> <artifactSet>
<excludes> <excludes>
<!-- Guava --> <!-- Guava -->
@@ -321,10 +279,6 @@
</excludes> </excludes>
</artifactSet> </artifactSet>
<relocations> <relocations>
<relocation>
<pattern>org.h2</pattern>
<shadedPattern>fr.xephi.authme.libs.org.h2</shadedPattern>
</relocation>
<relocation> <relocation>
<pattern>org.apache.http</pattern> <pattern>org.apache.http</pattern>
<shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern> <shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern>
@@ -333,39 +287,25 @@
<pattern>org.apache.commons</pattern> <pattern>org.apache.commons</pattern>
<shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern> <shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern>
</relocation> </relocation>
<relocation>
<pattern>javax.activation</pattern>
<shadedPattern>fr.xephi.authme.libs.javax.activation</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>fr.xephi.authme.libs.javax.annotation</shadedPattern>
</relocation>
<relocation>
<pattern>javax.mail</pattern>
<shadedPattern>fr.xephi.authme.libs.javax.mail</shadedPattern>
</relocation>
<relocation> <relocation>
<pattern>waffle</pattern> <pattern>waffle</pattern>
<shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern> <shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern>
</relocation> </relocation>
<relocation>
<pattern>com.sun.mail</pattern>
<shadedPattern>fr.xephi.authme.libs.com.sun.mail</shadedPattern>
</relocation>
<relocation>
<pattern>com.sun.jna</pattern>
<shadedPattern>fr.xephi.authme.libs.com.sun.jna</shadedPattern>
</relocation>
<relocation>
<pattern>com.sun.activation</pattern>
<shadedPattern>fr.xephi.authme.libs.com.sun.activation</shadedPattern>
</relocation>
<relocation> <relocation>
<pattern>com.github.benmanes.caffeine</pattern> <pattern>com.github.benmanes.caffeine</pattern>
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern> <shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
</relocation> </relocation>
</relocations> </relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration> </configuration>
</execution> </execution>
<execution> <execution>
@@ -375,7 +315,7 @@
<goal>shade</goal> <goal>shade</goal>
</goals> </goals>
<configuration> <configuration>
<finalName>${project.finalNameBase}-Spigot-Universal</finalName> <finalName>${project.finalNameBase}-Universal</finalName>
<relocations> <relocations>
<relocation> <relocation>
<pattern>com.google.common</pattern> <pattern>com.google.common</pattern>
@@ -397,10 +337,6 @@
<pattern>com.google.gson</pattern> <pattern>com.google.gson</pattern>
<shadedPattern>fr.xephi.authme.libs.com.google.gson</shadedPattern> <shadedPattern>fr.xephi.authme.libs.com.google.gson</shadedPattern>
</relocation> </relocation>
<relocation>
<pattern>org.h2</pattern>
<shadedPattern>fr.xephi.authme.libs.org.h2</shadedPattern>
</relocation>
<relocation> <relocation>
<pattern>org.apache.http</pattern> <pattern>org.apache.http</pattern>
<shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern> <shadedPattern>fr.xephi.authme.libs.org.apache.http</shadedPattern>
@@ -409,34 +345,10 @@
<pattern>org.apache.commons</pattern> <pattern>org.apache.commons</pattern>
<shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern> <shadedPattern>fr.xephi.authme.libs.org.apache.commons</shadedPattern>
</relocation> </relocation>
<relocation>
<pattern>javax.activation</pattern>
<shadedPattern>fr.xephi.authme.libs.javax.activation</shadedPattern>
</relocation>
<relocation>
<pattern>javax.annotation</pattern>
<shadedPattern>fr.xephi.authme.libs.javax.annotation</shadedPattern>
</relocation>
<relocation>
<pattern>javax.mail</pattern>
<shadedPattern>fr.xephi.authme.libs.javax.mail</shadedPattern>
</relocation>
<relocation> <relocation>
<pattern>waffle</pattern> <pattern>waffle</pattern>
<shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern> <shadedPattern>fr.xephi.authme.libs.waffle</shadedPattern>
</relocation> </relocation>
<relocation>
<pattern>com.sun.mail</pattern>
<shadedPattern>fr.xephi.authme.libs.com.sun.mail</shadedPattern>
</relocation>
<relocation>
<pattern>com.sun.jna</pattern>
<shadedPattern>fr.xephi.authme.libs.com.sun.jna</shadedPattern>
</relocation>
<relocation>
<pattern>com.sun.activation</pattern>
<shadedPattern>fr.xephi.authme.libs.com.sun.activation</shadedPattern>
</relocation>
<relocation> <relocation>
<pattern>com.github.benmanes.caffeine</pattern> <pattern>com.github.benmanes.caffeine</pattern>
<shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern> <shadedPattern>fr.xephi.authme.libs.com.github.benmanes.caffeine</shadedPattern>
@@ -547,6 +459,10 @@
<pattern>org.apache.commons.validator</pattern> <pattern>org.apache.commons.validator</pattern>
<shadedPattern>fr.xephi.authme.libs.org.apache.commons.validator</shadedPattern> <shadedPattern>fr.xephi.authme.libs.org.apache.commons.validator</shadedPattern>
</relocation> </relocation>
<relocation>
<pattern>com.alessiodp.libby</pattern>
<shadedPattern>fr.xephi.authme.libs.com.alessiodp.libby</shadedPattern>
</relocation>
</relocations> </relocations>
<filters> <filters>
@@ -693,6 +609,12 @@
</snapshots> </snapshots>
</repository> </repository>
<!-- Maven Central Snapshots Repository -->
<repository>
<id>maven-snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</repository>
<!-- Multiverse Repo --> <!-- Multiverse Repo -->
<repository> <repository>
<id>onarandombox-repo-releases</id> <id>onarandombox-repo-releases</id>
@@ -795,7 +717,7 @@
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-email</artifactId> <artifactId>commons-email</artifactId>
<version>1.6.0</version> <version>1.6-SNAPSHOT</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
@@ -807,6 +729,14 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- Libby -->
<dependency>
<groupId>com.alessiodp.libby</groupId>
<artifactId>libby-bukkit</artifactId>
<version>2.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- Database Connection Pool --> <!-- Database Connection Pool -->
<dependency> <dependency>
<groupId>com.zaxxer</groupId> <groupId>com.zaxxer</groupId>
@@ -1222,14 +1152,14 @@
<dependency> <dependency>
<groupId>org.xerial</groupId> <groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId> <artifactId>sqlite-jdbc</artifactId>
<version>3.45.2.0</version> <version>3.45.3.0</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.h2database</groupId> <groupId>com.h2database</groupId>
<artifactId>h2</artifactId> <artifactId>h2</artifactId>
<version>2.2.224</version> <version>2.2.224</version>
<scope>compile</scope> <scope>provided</scope>
</dependency> </dependency>
</dependencies> </dependencies>
+8 -1
View File
@@ -2,6 +2,7 @@ package fr.xephi.authme;
import ch.jalu.injector.Injector; import ch.jalu.injector.Injector;
import ch.jalu.injector.InjectorBuilder; import ch.jalu.injector.InjectorBuilder;
import com.alessiodp.libby.BukkitLibraryManager;
import com.github.Anon8281.universalScheduler.UniversalScheduler; import com.github.Anon8281.universalScheduler.UniversalScheduler;
import com.github.Anon8281.universalScheduler.scheduling.schedulers.TaskScheduler; import com.github.Anon8281.universalScheduler.scheduling.schedulers.TaskScheduler;
import fr.xephi.authme.api.v3.AuthMeApi; import fr.xephi.authme.api.v3.AuthMeApi;
@@ -80,7 +81,7 @@ public class AuthMe extends JavaPlugin {
// Version and build number values // Version and build number values
private static String pluginVersion = "5.6.0-Fork"; private static String pluginVersion = "5.6.0-Fork";
private static final String pluginBuild = "b"; private static final String pluginBuild = "b";
private static String pluginBuildNumber = "46"; private static String pluginBuildNumber = "49";
// Private instances // Private instances
private EmailService emailService; private EmailService emailService;
private CommandHandler commandHandler; private CommandHandler commandHandler;
@@ -143,6 +144,11 @@ public class AuthMe extends JavaPlugin {
return scheduler; return scheduler;
} }
/**
* The library manager
*/
public static BukkitLibraryManager libraryManager;
/** /**
* Method called when the server enables the plugin. * Method called when the server enables the plugin.
*/ */
@@ -151,6 +157,7 @@ public class AuthMe extends JavaPlugin {
// Load the plugin version data from the plugin description file // Load the plugin version data from the plugin description file
loadPluginInfo(getDescription().getVersion()); loadPluginInfo(getDescription().getVersion());
scheduler = UniversalScheduler.getScheduler(this); scheduler = UniversalScheduler.getScheduler(this);
libraryManager = new BukkitLibraryManager(this);
// Set the Logger instance and log file path // Set the Logger instance and log file path
ConsoleLogger.initialize(getLogger(), new File(getDataFolder(), LOG_FILENAME)); ConsoleLogger.initialize(getLogger(), new File(getDataFolder(), LOG_FILENAME));
@@ -15,6 +15,7 @@ import fr.xephi.authme.process.register.executors.PasswordRegisterParams;
import fr.xephi.authme.process.register.executors.RegistrationMethod; import fr.xephi.authme.process.register.executors.RegistrationMethod;
import fr.xephi.authme.process.register.executors.TwoFactorRegisterParams; import fr.xephi.authme.process.register.executors.TwoFactorRegisterParams;
import fr.xephi.authme.security.HashAlgorithm; import fr.xephi.authme.security.HashAlgorithm;
import fr.xephi.authme.service.BukkitService;
import fr.xephi.authme.service.CommonService; import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.service.ValidationService; import fr.xephi.authme.service.ValidationService;
import fr.xephi.authme.settings.properties.EmailSettings; import fr.xephi.authme.settings.properties.EmailSettings;
@@ -24,8 +25,6 @@ import org.bukkit.entity.Player;
import javax.inject.Inject; import javax.inject.Inject;
import java.util.List; import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import static fr.xephi.authme.process.register.RegisterSecondaryArgument.CONFIRMATION; import static fr.xephi.authme.process.register.RegisterSecondaryArgument.CONFIRMATION;
import static fr.xephi.authme.process.register.RegisterSecondaryArgument.EMAIL_MANDATORY; import static fr.xephi.authme.process.register.RegisterSecondaryArgument.EMAIL_MANDATORY;
@@ -46,6 +45,9 @@ public class RegisterCommand extends PlayerCommand {
@Inject @Inject
private CommonService commonService; private CommonService commonService;
@Inject
private BukkitService bukkitService;
@Inject @Inject
private DataSource dataSource; private DataSource dataSource;
@@ -175,20 +177,15 @@ public class RegisterCommand extends PlayerCommand {
} else if (isSecondArgValidForEmailRegistration(player, arguments)) { } else if (isSecondArgValidForEmailRegistration(player, arguments)) {
management.performRegister(RegistrationMethod.EMAIL_REGISTRATION, management.performRegister(RegistrationMethod.EMAIL_REGISTRATION,
EmailRegisterParams.of(player, email)); EmailRegisterParams.of(player, email));
Timer timer = new Timer(); if (commonService.getProperty(RegistrationSettings.UNREGISTER_ON_EMAIL_VERIFICATION_FAILURE) && commonService.getProperty(RegistrationSettings.UNREGISTER_AFTER_MINUTES) > 0) {
timer.schedule(new TimerTask() { bukkitService.runTaskLater(player, () -> {
@Override
public void run() {
if (dataSource.getAuth(player.getName()) != null) { if (dataSource.getAuth(player.getName()) != null) {
if (dataSource.getAuth(player.getName()).getLastLogin() == null) { if (dataSource.getAuth(player.getName()).getLastLogin() == null) {
management.performUnregisterByAdmin(null, player.getName(), player); management.performUnregisterByAdmin(null, player.getName(), player);
timer.cancel();
}
} else {
timer.cancel();
} }
} }
}, 600000); }, 60 * 20 * commonService.getProperty(RegistrationSettings.UNREGISTER_AFTER_MINUTES));
}
} }
} }
@@ -41,6 +41,7 @@ public class MySQL extends AbstractSqlDataSource {
private boolean useSsl; private boolean useSsl;
private boolean serverCertificateVerification; private boolean serverCertificateVerification;
private boolean allowPublicKeyRetrieval; private boolean allowPublicKeyRetrieval;
private String mariaDbSslMode;
private String host; private String host;
private String port; private String port;
private String username; private String username;
@@ -121,6 +122,7 @@ public class MySQL extends AbstractSqlDataSource {
this.useSsl = settings.getProperty(DatabaseSettings.MYSQL_USE_SSL); this.useSsl = settings.getProperty(DatabaseSettings.MYSQL_USE_SSL);
this.serverCertificateVerification = settings.getProperty(DatabaseSettings.MYSQL_CHECK_SERVER_CERTIFICATE); this.serverCertificateVerification = settings.getProperty(DatabaseSettings.MYSQL_CHECK_SERVER_CERTIFICATE);
this.allowPublicKeyRetrieval = settings.getProperty(DatabaseSettings.MYSQL_ALLOW_PUBLIC_KEY_RETRIEVAL); this.allowPublicKeyRetrieval = settings.getProperty(DatabaseSettings.MYSQL_ALLOW_PUBLIC_KEY_RETRIEVAL);
this.mariaDbSslMode = settings.getProperty(DatabaseSettings.MARIADB_SSL_MODE);
} }
/** /**
@@ -145,12 +147,19 @@ public class MySQL extends AbstractSqlDataSource {
ds.setDriverClassName(this.getDriverClassName()); ds.setDriverClassName(this.getDriverClassName());
// Request mysql over SSL // Request mysql over SSL
if (this instanceof MariaDB) {
ds.addDataSourceProperty("sslMode", mariaDbSslMode);
} else {
ds.addDataSourceProperty("useSSL", String.valueOf(useSsl)); ds.addDataSourceProperty("useSSL", String.valueOf(useSsl));
// Disabling server certificate verification on need // Disabling server certificate verification on need
if (!serverCertificateVerification) { if (!serverCertificateVerification) {
ds.addDataSourceProperty("verifyServerCertificate", String.valueOf(false)); ds.addDataSourceProperty("verifyServerCertificate", String.valueOf(false));
} // Disabling server certificate verification on need }
}
// Disabling server certificate verification on need
if (allowPublicKeyRetrieval) { if (allowPublicKeyRetrieval) {
ds.addDataSourceProperty("allowPublicKeyRetrieval", String.valueOf(true)); ds.addDataSourceProperty("allowPublicKeyRetrieval", String.valueOf(true));
} }
@@ -1,5 +1,6 @@
package fr.xephi.authme.initialization; package fr.xephi.authme.initialization;
import com.alessiodp.libby.Library;
import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.data.auth.PlayerCache; import fr.xephi.authme.data.auth.PlayerCache;
import fr.xephi.authme.datasource.CacheDataSource; import fr.xephi.authme.datasource.CacheDataSource;
@@ -21,6 +22,8 @@ import javax.inject.Provider;
import java.io.File; import java.io.File;
import java.sql.SQLException; import java.sql.SQLException;
import static fr.xephi.authme.AuthMe.libraryManager;
/** /**
* Creates the AuthMe data source. * Creates the AuthMe data source.
*/ */
@@ -78,6 +81,13 @@ public class DataSourceProvider implements Provider<DataSource> {
dataSource = new SQLite(settings, dataFolder); dataSource = new SQLite(settings, dataFolder);
break; break;
case H2: case H2:
Library h2 = Library.builder()
.groupId("com.h2database")
.artifactId("h2")
.version("2.2.224")
.build();
libraryManager.addMavenCentral();
libraryManager.loadLibrary(h2);
dataSource = new H2(settings, dataFolder); dataSource = new H2(settings, dataFolder);
break; break;
default: default:
@@ -39,14 +39,16 @@ public class BedrockAutoLoginListener implements Listener {
return settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && settings.getProperty(SecuritySettings.FORCE_LOGIN_BEDROCK) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(uuid) && getServer().getPluginManager().getPlugin("floodgate") != null; return settings.getProperty(HooksSettings.HOOK_FLOODGATE_PLAYER) && settings.getProperty(SecuritySettings.FORCE_LOGIN_BEDROCK) && org.geysermc.floodgate.api.FloodgateApi.getInstance().isFloodgateId(uuid) && getServer().getPluginManager().getPlugin("floodgate") != null;
} }
@EventHandler(priority = EventPriority.HIGHEST) @EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(PlayerJoinEvent event) { public void onPlayerJoin(PlayerJoinEvent event) {
Player player = event.getPlayer(); Player player = event.getPlayer();
String name = event.getPlayer().getName(); String name = event.getPlayer().getName();
UUID uuid = event.getPlayer().getUniqueId(); UUID uuid = event.getPlayer().getUniqueId();
bukkitService.runTaskLater(player, () -> {
if (isBedrockPlayer(uuid) && !authmeApi.isAuthenticated(player) && authmeApi.isRegistered(name)) { if (isBedrockPlayer(uuid) && !authmeApi.isAuthenticated(player) && authmeApi.isRegistered(name)) {
authmeApi.forceLogin(player); authmeApi.forceLogin(player);
messages.send(player, MessageKey.BEDROCK_AUTO_LOGGED_IN); messages.send(player, MessageKey.BEDROCK_AUTO_LOGGED_IN);
} }
},20L);
} }
} }
@@ -158,7 +158,7 @@ public class EmailService {
try { try {
htmlEmail = sendMailSsl.initializeMail(email); htmlEmail = sendMailSsl.initializeMail(email);
} catch (EmailException e) { } catch (EmailException e) {
logger.logException("Failed to create email for recovery code:", e); logger.logException("Failed to create email for shutdown:", e);
return; return;
} }
@@ -19,6 +19,7 @@ import fr.xephi.authme.service.bungeecord.BungeeSender;
import fr.xephi.authme.service.bungeecord.MessageType; import fr.xephi.authme.service.bungeecord.MessageType;
import fr.xephi.authme.service.velocity.VMessageType; import fr.xephi.authme.service.velocity.VMessageType;
import fr.xephi.authme.service.velocity.VelocitySender; import fr.xephi.authme.service.velocity.VelocitySender;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.commandconfig.CommandManager; import fr.xephi.authme.settings.commandconfig.CommandManager;
import fr.xephi.authme.settings.properties.HooksSettings; import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.RegistrationSettings; import fr.xephi.authme.settings.properties.RegistrationSettings;
@@ -47,6 +48,9 @@ public class AsynchronousJoin implements AsynchronousProcess {
@Inject @Inject
private Server server; private Server server;
@Inject
private Settings settings;
@Inject @Inject
private DataSource database; private DataSource database;
@@ -157,11 +161,11 @@ public class AsynchronousJoin implements AsynchronousProcess {
// As described at https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/ // As described at https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/
// "Keep in mind that you can't send plugin messages directly after a player joins." // "Keep in mind that you can't send plugin messages directly after a player joins."
bukkitService.scheduleSyncDelayedTask(() -> bukkitService.scheduleSyncDelayedTask(() ->
bungeeSender.sendAuthMeBungeecordMessage(player, MessageType.LOGIN), 5L); bungeeSender.sendAuthMeBungeecordMessage(player, MessageType.LOGIN), settings.getProperty(HooksSettings.PROXY_SEND_DELAY));
} }
if (velocitySender.isEnabled()) { if (velocitySender.isEnabled()) {
bukkitService.scheduleSyncDelayedTask(() -> bukkitService.scheduleSyncDelayedTask(() ->
velocitySender.sendAuthMeVelocityMessage(player, VMessageType.LOGIN), 5L); velocitySender.sendAuthMeVelocityMessage(player, VMessageType.LOGIN), settings.getProperty(HooksSettings.PROXY_SEND_DELAY));
} }
return; return;
} }
@@ -28,6 +28,7 @@ import fr.xephi.authme.service.bungeecord.BungeeSender;
import fr.xephi.authme.service.bungeecord.MessageType; import fr.xephi.authme.service.bungeecord.MessageType;
import fr.xephi.authme.service.velocity.VMessageType; import fr.xephi.authme.service.velocity.VMessageType;
import fr.xephi.authme.service.velocity.VelocitySender; import fr.xephi.authme.service.velocity.VelocitySender;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.DatabaseSettings; import fr.xephi.authme.settings.properties.DatabaseSettings;
import fr.xephi.authme.settings.properties.EmailSettings; import fr.xephi.authme.settings.properties.EmailSettings;
import fr.xephi.authme.settings.properties.HooksSettings; import fr.xephi.authme.settings.properties.HooksSettings;
@@ -83,7 +84,8 @@ public class AsynchronousLogin implements AsynchronousProcess {
@Inject @Inject
private SessionService sessionService; private SessionService sessionService;
@Inject
private Settings settings;
@Inject @Inject
private BungeeSender bungeeSender; private BungeeSender bungeeSender;
@Inject @Inject
@@ -310,11 +312,11 @@ public class AsynchronousLogin implements AsynchronousProcess {
// As described at https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/ // As described at https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/
// "Keep in mind that you can't send plugin messages directly after a player joins." // "Keep in mind that you can't send plugin messages directly after a player joins."
bukkitService.scheduleSyncDelayedTask(() -> bukkitService.scheduleSyncDelayedTask(() ->
bungeeSender.sendAuthMeBungeecordMessage(player, MessageType.LOGIN), 5L); bungeeSender.sendAuthMeBungeecordMessage(player, MessageType.LOGIN), settings.getProperty(HooksSettings.PROXY_SEND_DELAY));
} }
if (velocitySender.isEnabled()) { if (velocitySender.isEnabled()) {
bukkitService.scheduleSyncDelayedTask(() -> bukkitService.scheduleSyncDelayedTask(() ->
velocitySender.sendAuthMeVelocityMessage(player, VMessageType.LOGIN), 5L); velocitySender.sendAuthMeVelocityMessage(player, VMessageType.LOGIN), settings.getProperty(HooksSettings.PROXY_SEND_DELAY));
} }
// As the scheduling executes the Task most likely after the current // As the scheduling executes the Task most likely after the current
@@ -1,5 +1,6 @@
package fr.xephi.authme.process.quit; package fr.xephi.authme.process.quit;
import com.github.Anon8281.universalScheduler.UniversalScheduler;
import fr.xephi.authme.data.limbo.LimboService; import fr.xephi.authme.data.limbo.LimboService;
import fr.xephi.authme.process.SynchronousProcess; import fr.xephi.authme.process.SynchronousProcess;
import fr.xephi.authme.settings.commandconfig.CommandManager; import fr.xephi.authme.settings.commandconfig.CommandManager;
@@ -27,8 +28,10 @@ public class ProcessSyncPlayerQuit implements SynchronousProcess {
commandManager.runCommandsOnLogout(player); commandManager.runCommandsOnLogout(player);
} else { } else {
limboService.restoreData(player); limboService.restoreData(player);
if (!UniversalScheduler.isFolia) { // AuthMeReReloaded - Fix #146 (Very stupid solution, but works)
player.saveData(); // #1238: Speed is sometimes not restored properly player.saveData(); // #1238: Speed is sometimes not restored properly
} }
}
player.leaveVehicle(); player.leaveVehicle();
} }
} }
@@ -103,7 +103,7 @@ public class AsynchronousUnregister implements AsynchronousProcess {
public void adminUnregister(CommandSender initiator, String name, Player player) { public void adminUnregister(CommandSender initiator, String name, Player player) {
if (dataSource.removeAuth(name)) { if (dataSource.removeAuth(name)) {
performPostUnregisterActions(name, player); performPostUnregisterActions(name, player);
velocitySender.sendAuthMeVelocityMessage(player, VMessageType.FORCE_UNREGISTER); if (player != null) velocitySender.sendAuthMeVelocityMessage(player, VMessageType.FORCE_UNREGISTER);
bukkitService.createAndCallEvent(isAsync -> new UnregisterByAdminEvent(player, name, isAsync, initiator)); bukkitService.createAndCallEvent(isAsync -> new UnregisterByAdminEvent(player, name, isAsync, initiator));
if (initiator == null) { if (initiator == null) {
logger.info(name + " was unregistered"); logger.info(name + " was unregistered");
@@ -1,12 +1,12 @@
package fr.xephi.authme.service; package fr.xephi.authme.service;
import com.github.Anon8281.universalScheduler.UniversalRunnable; import com.github.Anon8281.universalScheduler.UniversalRunnable;
import com.github.Anon8281.universalScheduler.UniversalScheduler;
import com.github.Anon8281.universalScheduler.scheduling.tasks.MyScheduledTask; import com.github.Anon8281.universalScheduler.scheduling.tasks.MyScheduledTask;
import fr.xephi.authme.AuthMe; import fr.xephi.authme.AuthMe;
import fr.xephi.authme.initialization.SettingsDependent; import fr.xephi.authme.initialization.SettingsDependent;
import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.PluginSettings; import fr.xephi.authme.settings.properties.PluginSettings;
import fr.xephi.authme.util.Utils;
import org.bukkit.BanEntry; import org.bukkit.BanEntry;
import org.bukkit.BanList; import org.bukkit.BanList;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
@@ -38,7 +38,7 @@ public class BukkitService implements SettingsDependent {
/** Number of ticks per minute. */ /** Number of ticks per minute. */
public static final int TICKS_PER_MINUTE = 60 * TICKS_PER_SECOND; public static final int TICKS_PER_MINUTE = 60 * TICKS_PER_SECOND;
/** Whether the server is running Folia. */ /** Whether the server is running Folia. */
private static final boolean IS_FOLIA = Utils.isClassLoaded("io.papermc.paper.threadedregions.RegionizedServer"); private static final boolean isFolia = UniversalScheduler.isFolia;
private final AuthMe authMe; private final AuthMe authMe;
private boolean useAsyncTasks; private boolean useAsyncTasks;
@@ -68,7 +68,7 @@ public class BukkitService implements SettingsDependent {
* @param delay Delay in server ticks before executing task * @param delay Delay in server ticks before executing task
*/ */
public void scheduleSyncDelayedTask(Runnable task, long delay) { public void scheduleSyncDelayedTask(Runnable task, long delay) {
if (IS_FOLIA) { if (isFolia) {
runTaskLater(task, delay); runTaskLater(task, delay);
} else { } else {
Bukkit.getScheduler().runTaskLater(authMe, task, delay); // We must do this to keep compatibility Bukkit.getScheduler().runTaskLater(authMe, task, delay); // We must do this to keep compatibility
@@ -98,7 +98,7 @@ public class BukkitService implements SettingsDependent {
* @throws IllegalArgumentException if task is null * @throws IllegalArgumentException if task is null
*/ */
public void runTask(Runnable task) { public void runTask(Runnable task) {
if (IS_FOLIA) { if (isFolia) {
getScheduler().runTask(task); getScheduler().runTask(task);
} else { } else {
Bukkit.getScheduler().runTask(authMe, task); Bukkit.getScheduler().runTask(authMe, task);
@@ -106,7 +106,7 @@ public class BukkitService implements SettingsDependent {
} }
public void runTask(Entity entity, Runnable task) { public void runTask(Entity entity, Runnable task) {
if (IS_FOLIA) { if (isFolia) {
getScheduler().runTask(entity, task); getScheduler().runTask(entity, task);
} else { } else {
Bukkit.getScheduler().runTask(authMe, task); Bukkit.getScheduler().runTask(authMe, task);
@@ -122,7 +122,7 @@ public class BukkitService implements SettingsDependent {
* @param task the task to be run * @param task the task to be run
*/ */
public void runTaskIfFolia(Runnable task) { public void runTaskIfFolia(Runnable task) {
if (IS_FOLIA) { if (isFolia) {
runTask(task); runTask(task);
} else { } else {
task.run(); task.run();
@@ -134,7 +134,7 @@ public class BukkitService implements SettingsDependent {
* @param task the task to be run * @param task the task to be run
*/ */
public void runTaskIfFolia(Entity entity, Runnable task) { public void runTaskIfFolia(Entity entity, Runnable task) {
if (IS_FOLIA) { if (isFolia) {
runTask(entity, task); runTask(entity, task);
} else { } else {
task.run(); task.run();
@@ -146,7 +146,7 @@ public class BukkitService implements SettingsDependent {
* @param task the task to be run * @param task the task to be run
*/ */
public void runTaskIfFolia(Location location, Runnable task) { public void runTaskIfFolia(Location location, Runnable task) {
if (IS_FOLIA) { if (isFolia) {
runTask(location, task); runTask(location, task);
} else { } else {
task.run(); task.run();
@@ -167,6 +167,10 @@ public class BukkitService implements SettingsDependent {
return getScheduler().runTaskLater(task, delay); return getScheduler().runTaskLater(task, delay);
} }
public MyScheduledTask runTaskLater(Entity entity, Runnable task, long delay) {
return getScheduler().runTaskLater(entity, task, delay);
}
/** /**
* Schedules this task to run asynchronously or immediately executes it based on * Schedules this task to run asynchronously or immediately executes it based on
* AuthMe's configuration. * AuthMe's configuration.
@@ -192,7 +196,7 @@ public class BukkitService implements SettingsDependent {
* @throws IllegalArgumentException if task is null * @throws IllegalArgumentException if task is null
*/ */
public void runTaskAsynchronously(Runnable task) { public void runTaskAsynchronously(Runnable task) {
if (IS_FOLIA) { if (isFolia) {
getScheduler().runTaskAsynchronously(task); getScheduler().runTaskAsynchronously(task);
} else { } else {
Bukkit.getScheduler().runTaskAsynchronously(authMe, task); Bukkit.getScheduler().runTaskAsynchronously(authMe, task);
@@ -144,7 +144,9 @@ public class TeleportationService implements Reloadable {
} else if (settings.getProperty(TELEPORT_UNAUTHED_TO_SPAWN)) { } else if (settings.getProperty(TELEPORT_UNAUTHED_TO_SPAWN)) {
if (settings.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) { if (settings.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
Location location = buildLocationFromAuth(player, auth); Location location = buildLocationFromAuth(player, auth);
if (location.equals(player.getLocation())) return; Location playerLoc = player.getLocation();
if (location.getX() == playerLoc.getX() && location.getY() == location.getY() && location.getZ() == playerLoc.getZ()
&& location.getWorld() == playerLoc.getWorld()) return;
logger.debug("Teleporting `{0}` after login, based on the player auth", player.getName()); logger.debug("Teleporting `{0}` after login, based on the player auth", player.getName());
teleportBackFromSpawn(player, location); teleportBackFromSpawn(player, location);
} else if (limbo != null && limbo.getLocation() != null) { } else if (limbo != null && limbo.getLocation() != null) {
@@ -31,7 +31,17 @@ public final class DatabaseSettings implements SettingsHolder {
public static final Property<String> MYSQL_PORT = public static final Property<String> MYSQL_PORT =
newProperty("DataSource.mySQLPort", "3306"); newProperty("DataSource.mySQLPort", "3306");
@Comment("Connect to MySQL database over SSL") @Comment({"Replacement of Mysql's useSsl (for MariaDB only).",
"- disable: No SSL",
"- trust: Trust blindly (no validation)",
"- verify_ca: Encryption, certificates validation, BUT no hostname verification",
"- verify_full: Encryption, certificate validation and hostname validation",
"Read more: https://bit.ly/mariadb-sslmode"})
public static final Property<String> MARIADB_SSL_MODE =
newProperty("DataSource.MariaDbSslMode", "disabled");
@Comment({"Connect to MySQL database over SSL",
"If you're using MariaDB, use sslMode instead"})
public static final Property<Boolean> MYSQL_USE_SSL = public static final Property<Boolean> MYSQL_USE_SSL =
newProperty("DataSource.mySQLUseSSL", true); newProperty("DataSource.mySQLUseSSL", true);
@@ -42,7 +52,8 @@ public final class DatabaseSettings implements SettingsHolder {
newProperty( "DataSource.mySQLCheckServerCertificate", true); newProperty( "DataSource.mySQLCheckServerCertificate", true);
@Comment({"Authorize client to retrieve RSA server public key.", @Comment({"Authorize client to retrieve RSA server public key.",
"Advanced option, ignore if you don't know what it means."}) "Advanced option, ignore if you don't know what it means.",
"If you are using MariaDB, use MariaDbSslMode instead."})
public static final Property<Boolean> MYSQL_ALLOW_PUBLIC_KEY_RETRIEVAL = public static final Property<Boolean> MYSQL_ALLOW_PUBLIC_KEY_RETRIEVAL =
newProperty( "DataSource.mySQLAllowPublicKeyRetrieval", true); newProperty( "DataSource.mySQLAllowPublicKeyRetrieval", true);
@@ -22,6 +22,12 @@ public final class HooksSettings implements SettingsHolder {
public static final Property<Boolean> VELOCITY = public static final Property<Boolean> VELOCITY =
newProperty("Hooks.velocity", false); newProperty("Hooks.velocity", false);
@Comment({"How many ticks should we wait before sending login info to proxy?",
"Change this to higher if your player has high ping.",
"See: https://www.spigotmc.org/wiki/bukkit-bungee-plugin-messaging-channel/"})
public static final Property<Long> PROXY_SEND_DELAY =
newProperty("Hooks.proxySendDelay", 10L);
@Comment({"Hook into floodgate.", @Comment({"Hook into floodgate.",
"This must be true if you want to use other bedrock features." "This must be true if you want to use other bedrock features."
}) })
@@ -36,7 +36,8 @@ public final class PluginSettings implements SettingsHolder {
@Comment({ @Comment({
"Message language, available languages:", "Message language, available languages:",
"https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/translations.md" "https://github.com/AuthMe/AuthMeReloaded/blob/master/docs/translations.md",
"Example: zhcn, en"
}) })
public static final Property<String> MESSAGES_LANGUAGE = public static final Property<String> MESSAGES_LANGUAGE =
newProperty("settings.messagesLanguage", "en"); newProperty("settings.messagesLanguage", "en");
@@ -46,6 +46,16 @@ public final class RegistrationSettings implements SettingsHolder {
newProperty(RegisterSecondaryArgument.class, "settings.registration.secondArg", newProperty(RegisterSecondaryArgument.class, "settings.registration.secondArg",
RegisterSecondaryArgument.CONFIRMATION); RegisterSecondaryArgument.CONFIRMATION);
@Comment({
"Should we unregister the player when he didn't verify the email?",
"This only works if you enabled email registration."})
public static final Property<Boolean> UNREGISTER_ON_EMAIL_VERIFICATION_FAILURE =
newProperty("settings.registration.email.unregisterOnEmailVerificationFailure", false);
@Comment({"How many minutes should we wait before unregister the player",
"when he didn't verify the email?"})
public static final Property<Long> UNREGISTER_AFTER_MINUTES =
newProperty("settings.registration.email.unregisterAfterMinutes", 10L);
@Comment({ @Comment({
"Do we force kick a player after a successful registration?", "Do we force kick a player after a successful registration?",
"Do not use with login feature below"}) "Do not use with login feature below"})
Binary file not shown.
+1 -1
View File
@@ -4,7 +4,7 @@ website: http://github.com/HaHaWTH/AuthMeReReloaded/
description: A fork of AuthMeReloaded that contains bug fixes description: A fork of AuthMeReloaded that contains bug fixes
main: ${pluginDescription.main} main: ${pluginDescription.main}
folia-supported: true folia-supported: true
version: 5.6.0-FORK-b46 version: 5.6.0-FORK-b49
api-version: 1.13 api-version: 1.13
softdepend: softdepend:
- Vault - Vault