Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6450696
FFS
andrei1058 Mar 26, 2022
3fc764e
uhm. ok
andrei1058 Mar 26, 2022
dd6df34
rename workflow
andrei1058 Mar 26, 2022
572b9df
remove markdown thing
andrei1058 Mar 26, 2022
779f7a9
update pom
andrei1058 Mar 26, 2022
c13d90d
remove dependency
andrei1058 Mar 26, 2022
8d1d355
var rename
andrei1058 Mar 26, 2022
3d6a8e5
Update all Maven plugins and move from find-bugs to newer spot bugs
JT122406 Apr 11, 2022
bf3afc0
Add PlaceHolderAPI as softdepend
JT122406 Apr 11, 2022
2060f84
Build with less errors
JT122406 Apr 27, 2022
4f0634e
Merge pull request #37 from JT122406/development
andrei1058 Apr 27, 2022
c3cf884
PAF Fixes
JT122406 Apr 27, 2022
93708cc
Update annotations to 23.0.0
JT122406 Apr 27, 2022
ea589b5
Merge pull request #39 from JT122406/PAFFix
andrei1058 Apr 28, 2022
85394f8
added spectator check to `PlayerArenaJoinEvent`
MherZaqaryan May 4, 2022
76a530d
This fixes the API access. The class BedWars is registered as a Bukki…
reussy May 20, 2022
45b68c7
API improvement
andrei1058 Aug 16, 2022
ade8d1d
Merge pull request #40 from MherZaqaryan/more-events
andrei1058 Jun 18, 2023
76f1148
Merge pull request #44 from reussy/fix-api-access
andrei1058 Jun 18, 2023
76ad965
Fix softdepend
Simonsator Jul 13, 2023
ec1126a
Merge pull request #59 from Simonsator/development
andrei1058 Dec 4, 2023
c671c7b
Update dependency versions and repository URLs in pom.xml
andrei1058 Jul 13, 2025
0e41d30
Add unit tests for BedWarsProxy and update Maven dependencies
andrei1058 Jul 13, 2025
0de72fc
Add compatibility tests for Spigot versions 1.21.1 to 1.21.7
andrei1058 Jul 13, 2025
0092118
Update plugin version to 1.2.4 and simplify imports in BedWarsProxy.java
andrei1058 Jul 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy snapshot with Maven

on:
push:
branches-ignore:
- production
pull_request:
branches-ignore:
- production

jobs:
build:
runs-on: ubuntu-latest
environment:
name: development
url: https://repo.andrei1058.dev
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17.0.2
uses: actions/setup-java@v2
with:
java-version: '17.0.2'
distribution: 'adopt'
- name: Deploy snapshot with Maven
env:
MVN_REPO_USER: ${{ secrets.MVN_REPO_USER }}
MVN_REPO_PASS: ${{ secrets.MVN_REPO_PASS }}
ANDEV_RES_ID: 2
run: |
sudo apt install jq -y
curl -X GET https://api.andrei1058.dev/v1/resources/$ANDEV_RES_ID/versioning/current -H "Accept: application/json" >> version.json
export UPDATE_VERSION=`jq '.version' version.json | tr -d '"'`
mvn versions:set -DnewVersion=$UPDATE_VERSION-SNAPSHOT
mvn versions:update-child-modules
mvn clean deploy -s ci_settings.xml
echo "UPDATE_VERSION=$UPDATE_VERSION" >> $GITHUB_ENV
45 changes: 28 additions & 17 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven
name: Compile with Maven

on:
push:
branches: [ development ]
branches-ignore:
- production
- master
pull_request:
branches: [ development ]
branches-ignore:
- production

jobs:
build:

runs-on: ubuntu-latest

environment:
name: development
url: https://repo.andrei1058.dev
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17.0.2
uses: actions/setup-java@v2
with:
java-version: '17.0.2'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
- uses: actions/checkout@v2
- name: Set up JDK 17.0.2
uses: actions/setup-java@v2
with:
java-version: '17.0.2'
distribution: 'adopt'
- name: Compile with Maven
env:
MVN_REPO_USER: ${{ secrets.MVN_REPO_USER }}
MVN_REPO_PASS: ${{ secrets.MVN_REPO_PASS }}
ANDEV_RES_ID: 2
run: |
sudo apt install jq -y
curl -X GET https://api.andrei1058.dev/v1/resources/$ANDEV_RES_ID/versioning/current -H "Accept: application/json" >> version.json
export UPDATE_VERSION=`jq '.version' version.json | tr -d '"'`
mvn versions:set -DnewVersion=$UPDATE_VERSION-SNAPSHOT
mvn versions:update-child-modules
mvn clean install -s ci_settings.xml
echo "UPDATE_VERSION=$UPDATE_VERSION" >> $GITHUB_ENV
45 changes: 25 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.andrei1058.bedwars</groupId>
<artifactId>proxy</artifactId>
<version>1.2.4</version>
<version>1.2.6</version>
<modules>
<module>proxy-api</module>
<module>proxy-plugin</module>
Expand All @@ -23,32 +23,24 @@
<id>spigot-repo</id>
<url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
</repository>
<repository>
<id>placeholderapi</id>
<url>https://repo.extendedclip.com/releases/</url>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
</dependency>
</dependencies>

<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>3.4.1</version>
<version>3.5.1</version>
</extension>
</extensions>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.9.0</version>
<version>3.10.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
Expand All @@ -63,34 +55,47 @@
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-eclipse</artifactId>
<version>2.8.8</version>
<version>2.11.1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.0.0-M2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.5.3.0</version>
<dependencies>
<!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs</artifactId>
<version>4.6.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.3-SNAPSHOT</version>
</plugin>
</plugins>
</reporting>
Expand All @@ -105,4 +110,4 @@
<url>ftp://andrei1058.dev/snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>
</project>
8 changes: 4 additions & 4 deletions proxy-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<parent>
<artifactId>proxy</artifactId>
<groupId>com.andrei1058.bedwars</groupId>
<version>1.2.4</version>
<version>1.2.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>proxy-api</artifactId>
<version>${parent.version}</version>
<version>${project.parent.version}</version>

<repositories>
<repository>
Expand Down Expand Up @@ -47,15 +47,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.3.2</version>
<configuration>
<show>private</show> <!--javadoc shows all classes and members-->
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<version>3.0.0-M2</version>
</plugin>
</plugins>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class PlayerArenaJoinEvent extends Event implements Cancellable {
private boolean cancelled;
private Player player;
private CachedArena arena;
private boolean spectator = false;

/**
* Called when a player joins an arena.
Expand All @@ -26,6 +27,11 @@ public PlayerArenaJoinEvent(Player player, CachedArena arena) {
this.arena = arena;
}

public PlayerArenaJoinEvent(Player player, CachedArena arena, boolean spectator) {
this(player, arena);
this.spectator = spectator;
}

/**
* Get player.
*
Expand All @@ -44,6 +50,15 @@ public CachedArena getArena() {
return arena;
}

/**
* Check if the player has joined as spectator.
*
* @return true if the player is a spectator, otherwise false.
*/
public boolean isSpectator() {
return spectator;
}

/**
* Bukkit stuff.
*
Expand Down
Loading