Compare commits
31 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 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
|
||||
|
||||
jobs:
|
||||
build_and_test:
|
||||
Build:
|
||||
strategy:
|
||||
matrix:
|
||||
jdkversion: [11]
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-java@v3
|
||||
@@ -19,5 +19,6 @@ jobs:
|
||||
distribution: 'temurin'
|
||||
java-version: ${{ matrix.jdkversion }}
|
||||
cache: 'maven'
|
||||
- name: Build with Maven
|
||||
- name: 使用Maven构建
|
||||
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
|
||||
!.idea/codeStyleSettings.xml
|
||||
|
||||
/target/class/
|
||||
# File-based project format:
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# AuthMeReloaded
|
||||
**"The best authentication plugin for the Bukkit modding API!"**
|
||||
|
||||
# AuthMeReReloaded
|
||||
**"A Fork of Authme that contains many bug fixes!"**
|
||||
**请前往Releases下载最新版本**
|
||||
<img src="wallpaper.png?raw=true" alt="AuthMeLogo"/>
|
||||
|
||||
| Type | Badges |
|
||||
|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| **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)  |
|
||||
| **Other CIs:** | [](https://www.travis-ci.com/AuthMe/AuthMeReloaded) |
|
||||
|
||||
|
||||
@@ -598,11 +598,26 @@
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</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>
|
||||
|
||||
<dependencies>
|
||||
<!-- Java Libraries -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.geysermc.floodgate</groupId>
|
||||
<artifactId>api</artifactId>
|
||||
<version>2.2.0-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<!-- Jalu Injector -->
|
||||
<dependency>
|
||||
<groupId>ch.jalu</groupId>
|
||||
|
||||
@@ -52,6 +52,7 @@ import org.bukkit.event.player.PlayerRespawnEvent;
|
||||
import org.bukkit.event.player.PlayerShearEntityEvent;
|
||||
import org.bukkit.event.player.PlayerSwapHandItemsEvent;
|
||||
import org.bukkit.inventory.InventoryView;
|
||||
import org.geysermc.floodgate.api.FloodgateApi;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.util.Locale;
|
||||
@@ -93,7 +94,7 @@ public class PlayerListener implements Listener {
|
||||
private PermissionsManager permissionsManager;
|
||||
@Inject
|
||||
private QuickCommandsProtectionManager quickCommandsProtectionManager;
|
||||
|
||||
FloodgateApi Floodgate = org.geysermc.floodgate.api.FloodgateApi.getInstance();
|
||||
// Lowest priority to apply fast protection checks
|
||||
@EventHandler(priority = EventPriority.LOWEST)
|
||||
public void onAsyncPlayerPreLoginEventLowest(AsyncPlayerPreLoginEvent event) {
|
||||
@@ -112,7 +113,9 @@ public class PlayerListener implements Listener {
|
||||
if (validationService.isUnrestricted(name)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (settings.getProperty(RestrictionSettings.HOOK_FLOODGATE_PLAYER) && Floodgate.isFloodgateId(event.getUniqueId())){
|
||||
return;
|
||||
}
|
||||
// Non-blocking checks
|
||||
try {
|
||||
onJoinVerifier.checkIsValidName(name);
|
||||
@@ -120,6 +123,7 @@ public class PlayerListener implements Listener {
|
||||
event.setKickMessage(messages.retrieveSingle(name, e.getReason(), e.getArgs()));
|
||||
event.setLoginResult(AsyncPlayerPreLoginEvent.Result.KICK_OTHER);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -125,6 +125,9 @@ public final class RestrictionSettings implements SettingsHolder {
|
||||
public static final Property<String> ALLOWED_NICKNAME_CHARACTERS =
|
||||
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({
|
||||
"How far can unregistered players walk?",
|
||||
"Set to 0 for unlimited radius"
|
||||
|
||||
@@ -15,6 +15,7 @@ softdepend:
|
||||
- Essentials
|
||||
- EssentialsSpawn
|
||||
- ProtocolLib
|
||||
- floodgate
|
||||
commands:
|
||||
authme:
|
||||
description: AuthMe op commands
|
||||
|
||||
Reference in New Issue
Block a user