Skip to content

Commit 8361cf0

Browse files
committed
Fix GH actions build
1 parent dbedab0 commit 8361cf0

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ jobs:
1212
- name: Setup java
1313
uses: actions/setup-java@v2
1414
with:
15-
distribution: 'adopt'
15+
distribution: 'temurin'
1616
java-version: '16'
17-
check-latest: true
1817

1918
- name: Run maven build lifecycle
2019
run: mvn --batch-mode clean test package

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,4 +179,5 @@ logs/
179179

180180
.gradle/
181181
build/
182-
logs/
182+
logs/
183+
.java-version

src/test/java/com/comphenix/protocol/BukkitInitialization.java

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,27 @@ private BukkitInitialization() {
4040
private boolean initialized;
4141
private boolean packaged;
4242

43+
/**
44+
* Statically initializes the mock server for unit testing
45+
*/
46+
public static synchronized void initializeAll() {
47+
instance.initialize();
48+
}
49+
50+
/**
51+
* @deprecated - Replaced with initializeAll()
52+
*/
53+
@Deprecated
4354
public static synchronized void initializePackage() {
44-
instance.setPackage();
55+
initializeAll();
4556
}
4657

58+
/**
59+
* @deprecated - Replaced with initializeAll()
60+
*/
61+
@Deprecated
4762
public static synchronized void initializeItemMeta() {
48-
instance.initialize();
63+
initializeAll();
4964
}
5065

5166
/**
@@ -63,7 +78,7 @@ private void initialize() {
6378
ex.printStackTrace();
6479
}
6580

66-
initializePackage();
81+
instance.setPackage();
6782

6883
SharedConstants.a();
6984
DispenserRegistry.init();

0 commit comments

Comments
 (0)