mirror of
https://github.com/TuxCoding/FastLogin.git
synced 2025-07-30 10:47:33 +02:00
Only build for main branches to fix duplicate actions with dependabot
This commit is contained in:
62
.github/workflows/maven.yml
vendored
62
.github/workflows/maven.yml
vendored
@ -4,11 +4,15 @@
|
|||||||
# Human readable name in the actions tab
|
# Human readable name in the actions tab
|
||||||
name: Java CI
|
name: Java CI
|
||||||
|
|
||||||
# Build on every push and pull request regardless of the branch
|
# Build on every pull request regardless of the branch
|
||||||
# Wiki: https://help.github.com/en/actions/reference/events-that-trigger-workflows
|
# Wiki: https://help.github.com/en/actions/reference/events-that-trigger-workflows
|
||||||
on:
|
on:
|
||||||
- push
|
push:
|
||||||
- pull_request
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# job id
|
# job id
|
||||||
@ -19,32 +23,32 @@ jobs:
|
|||||||
|
|
||||||
# Run steps
|
# Run steps
|
||||||
steps:
|
steps:
|
||||||
# Pull changes
|
# Pull changes
|
||||||
- uses: actions/checkout@v2.3.4
|
- uses: actions/checkout@v2.3.4
|
||||||
|
|
||||||
# Cache artifacts - however this has the downside that we don't get notified of
|
# Cache artifacts - however this has the downside that we don't get notified of
|
||||||
# artifact resolution failures like invalid repository
|
# artifact resolution failures like invalid repository
|
||||||
# Nevertheless the repositories should be more stable and it makes no sense to pull
|
# Nevertheless the repositories should be more stable and it makes no sense to pull
|
||||||
# a same version every time
|
# a same version every time
|
||||||
# A dry run would make more sense
|
# A dry run would make more sense
|
||||||
- uses: actions/cache@v2.1.4
|
- uses: actions/cache@v2.1.4
|
||||||
with:
|
with:
|
||||||
path: ~/.m2/repository
|
path: ~/.m2/repository
|
||||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-maven-
|
${{ runner.os }}-maven-
|
||||||
|
|
||||||
# Setup Java
|
# Setup Java
|
||||||
- name: Set up JDK
|
- name: Set up JDK
|
||||||
uses: actions/setup-java@v2.1.0
|
uses: actions/setup-java@v2.1.0
|
||||||
with:
|
with:
|
||||||
distribution: 'adopt'
|
distribution: 'adopt'
|
||||||
# Use Java 11, because it's minimum required version
|
# Use Java 11, because it's minimum required version
|
||||||
java-version: 11
|
java-version: 11
|
||||||
|
|
||||||
# Build and test (included in package)
|
# Build and test (included in package)
|
||||||
- name: Build with Maven and test
|
- name: Build with Maven and test
|
||||||
# Run non-interactive, package (with compile+test),
|
# Run non-interactive, package (with compile+test),
|
||||||
# ignore snapshot updates, because they are likely to have breaking changes, enforce checksums to validate
|
# ignore snapshot updates, because they are likely to have breaking changes, enforce checksums to validate
|
||||||
# possible errors in dependencies
|
# possible errors in dependencies
|
||||||
run: mvn test --batch-mode --no-snapshot-updates --strict-checksums --file pom.xml
|
run: mvn test --batch-mode --no-snapshot-updates --strict-checksums --file pom.xml
|
||||||
|
@ -74,7 +74,8 @@ public class NameCheckTask extends JoinManagement<Player, CommandSender, Protoco
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FastLoginPreLoginEvent callFastLoginPreLoginEvent(String username, ProtocolLibLoginSource source, StoredProfile profile) {
|
public FastLoginPreLoginEvent callFastLoginPreLoginEvent(String username, ProtocolLibLoginSource source,
|
||||||
|
StoredProfile profile) {
|
||||||
BukkitFastLoginPreLoginEvent event = new BukkitFastLoginPreLoginEvent(username, source, profile);
|
BukkitFastLoginPreLoginEvent event = new BukkitFastLoginPreLoginEvent(username, source, profile);
|
||||||
plugin.getServer().getPluginManager().callEvent(event);
|
plugin.getServer().getPluginManager().callEvent(event);
|
||||||
return event;
|
return event;
|
||||||
|
Reference in New Issue
Block a user