diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE/bug_report.md similarity index 74% rename from .github/ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE/bug_report.md index b1a8d413..4b7b130f 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,14 @@ +--- +name: Bug report +about: Something isn't working +title: '' +labels: 'bug' +assignees: '' + +--- + [//]: # (Lines in this format are considered as comments and will not be displayed.) -[//]: # -[//]: # (Before reporting make sure you're running the **latest build** of the plugin and checked for duplicate issues!) +[//]: # (Before reporting make sure you're running the **latest build** of the plugin and checked for existing issues!) ### What behaviour is observed: [//]: # (What happened?) @@ -11,18 +19,21 @@ ### Steps/models to reproduce: [//]: # (The actions that cause the issue. Please explain it in detail) +### Screenshots (if applicable) +[//]: # (You can drop the files here directly) + ### Plugin list: [//]: # (This can be found by running `/pl`) ### Environment description -[//]: # (Server software with exact version number, Minecraft version, SQLite/MySQL, ...) +[//]: # (Server software with exact version number, Minecraft version, SQLite/MySQL/MariaDB, ...) ### Plugin version or build number (don't write latest): [//]: # (This can be found by running `/version plugin-name`.) -### Error Log: +### Server Log: [//]: # (No images please - only the textual representation) -[Hastebin](https://hastebin.com/) / [Gist](https://gist.github.com/) link of the error or stacktrace (if any) +[Hastebin](https://hastebin.com/) / [Gist](https://gist.github.com/) link of the error, stacktrace or the complete log (if any) ### Configuration: [//]: # (No images please - only the textual representation) diff --git a/.github/ISSUE_TEMPLATE/enhancement_request.md b/.github/ISSUE_TEMPLATE/enhancement_request.md new file mode 100644 index 00000000..7ad9b1a5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/enhancement_request.md @@ -0,0 +1,22 @@ +--- +name: Bug report +about: New feature or change request +title: '' +labels: 'enhancement' +assignees: '' + +--- + +[//]: # (Lines in this format are considered as comments and will not be displayed.) + +### Is your feature request related to a problem? Please describe. +[//]: # (A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]) + +### Describe the solution you'd like +[//]: # (A clear and concise description of what you want to happen.) + +### Describe alternatives you've considered +[//]: # (A clear and concise description of any alternative solutions or features you've considered.) + +### Additional context +[//]: # (Add any other context or screenshots about the feature request here.) diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..a0082228 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,10 @@ +--- +name: Question +about: You want to ask something +title: '' +labels: 'question' +assignees: '' + +--- + + diff --git a/.github/PULL_REQUEST_TEMPLATE/bug_fix.md b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md new file mode 100644 index 00000000..96a39a9b --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/bug_fix.md @@ -0,0 +1,17 @@ +--- +name: Bug fix +about: Fixes a bug +title: '' +labels: 'bug' +assignees: '' + +--- + +[//]: # (Lines in this format are considered as comments and will not be displayed.) +[//]: # (If your work is in progress, please consider making a draft pull request.) + +### Summary of your change +[//]: # (Example: motiviation, enhancement) + +### Related issue +[//]: # (Reference it using '#NUMBER'. Ex: Fixes/Related #...) diff --git a/.github/PULL_REQUEST_TEMPLATE/enhancement_change.md b/.github/PULL_REQUEST_TEMPLATE/enhancement_change.md new file mode 100644 index 00000000..940314f9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/enhancement_change.md @@ -0,0 +1,17 @@ +--- +name: Enhancement change +about: New feature(s) or improvement(s) +title: '' +labels: 'enhancement' +assignees: '' + +--- + +[//]: # (Lines in this format are considered as comments and will not be displayed.) +[//]: # (If your work is in progress, please consider making a draft pull request.) + +### Summary of your change +[//]: # (Example: motiviation, enhancement) + +### Related issue +[//]: # (Reference it using '#NUMBER'. Ex: Fixes/Related #...) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 00000000..e3773fae --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,31 @@ +# Human readable name +name: Java CI + +# Build on every push and pull request regardless of the branch +# Wiki: https://help.github.com/en/actions/reference/events-that-trigger-workflows +on: + - push + - pull_request + +jobs: + # job id + build_and_test: + + # Environment image - always newest OS + runs-on: ubuntu-latest + + # Run steps + steps: + # Pull changes + - uses: actions/checkout@v2 + # Setup Java + - name: Set up JDK + uses: actions/setup-java@v1.3 + with: + # Use Java 8, because it's minimum required version + java-version: 8 + # Build and test (included in package) + - name: Build with Maven and test + # Run non-interactive, package (with compile+test), + # ignore snapshot updates, because they are likely to have breaking changes, enforce checksums to validate posssible errors in depdendencies + run: mvn --batch-mode package --no-snapshot-updates --strict-checksums --file pom.xml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9093dd1c..00000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -# Use https://travis-ci.org/ for automatic testing - -# speed up testing https://blog.travis-ci.com/2014-12-17-faster-builds-with-container-based-infrastructure/ -sudo: false - -# This is a java project -language: java - -# Compile the project and run unit tests -script: mvn test -B - -jdk: - - openjdk8 - - openjdk11 - -# Cache Maven dependencies -cache: - directories: - - '$HOME/.m2/repository' diff --git a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BukkitLoginSession.java b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BukkitLoginSession.java index fab8ea7d..b7940b61 100644 --- a/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BukkitLoginSession.java +++ b/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/BukkitLoginSession.java @@ -52,7 +52,7 @@ public class BukkitLoginSession extends LoginSession { * * @return the verify token from the server */ - public byte[] getVerifyToken() { + public synchronized byte[] getVerifyToken() { return verifyToken.clone(); } diff --git a/bungee/src/main/java/com/github/games647/fastlogin/bungee/BungeeLoginSession.java b/bungee/src/main/java/com/github/games647/fastlogin/bungee/BungeeLoginSession.java index 1850462d..2db056d4 100644 --- a/bungee/src/main/java/com/github/games647/fastlogin/bungee/BungeeLoginSession.java +++ b/bungee/src/main/java/com/github/games647/fastlogin/bungee/BungeeLoginSession.java @@ -12,28 +12,28 @@ public class BungeeLoginSession extends LoginSession { super(username, registered, profile); } - public void setRegistered(boolean registered) { + public synchronized void setRegistered(boolean registered) { this.registered = registered; } - public boolean isAlreadySaved() { + public synchronized boolean isAlreadySaved() { return alreadySaved; } - public void setAlreadySaved(boolean alreadySaved) { + public synchronized void setAlreadySaved(boolean alreadySaved) { this.alreadySaved = alreadySaved; } - public boolean isAlreadyLogged() { + public synchronized boolean isAlreadyLogged() { return alreadyLogged; } - public void setAlreadyLogged(boolean alreadyLogged) { + public synchronized void setAlreadyLogged(boolean alreadyLogged) { this.alreadyLogged = alreadyLogged; } @Override - public String toString() { + public synchronized String toString() { return this.getClass().getSimpleName() + '{' + "alreadySaved=" + alreadySaved + ", alreadyLogged=" + alreadyLogged +