Skip to content

Commit 52f5a4d

Browse files
authored
fix(folia): use recommended class for detecting folia (#261)
1 parent 160b2a8 commit 52f5a4d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CONTRIBUTING.md

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ This allows the Git history to be more readable and also allows us to generate c
9191
- `events`, when modifying a file that is related to events.
9292
- `examples`, when modifying an example.
9393
- `extensions`, when modifying a file that is related to extensions.
94+
- `folia`, when modifying a file inside the `platform-folia` module.
9495
- `minestom`, when modifying a file inside the `platform-minestom` module.
9596
- `nukkit`, when modifying a file inside the `platform-nukkit` module.
9697
- `scheduling`, when modifying a file that is related to scheduling.

platform-folia/src/main/java/dev/hypera/chameleon/platform/folia/FoliaChameleon.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,15 @@ public final class FoliaChameleon extends BukkitChameleon {
123123
}
124124

125125
/**
126-
* Check if Folia is present.
126+
* Returns whether this server is a Folia server.
127127
*
128-
* @return true if Folia is present.
128+
* @return {@code true} if this server is a Folia server.
129129
*/
130130
private static boolean isFolia() {
131131
try {
132-
// find a better class to use for this?
133-
Class.forName("io.papermc.paper.threadedregions.scheduler.AsyncScheduler");
132+
Class.forName("io.papermc.paper.threadedregions.RegionizedServer");
134133
return true;
135-
} catch (ClassNotFoundException e) {
134+
} catch (ClassNotFoundException ex) {
136135
return false;
137136
}
138137
}

0 commit comments

Comments
 (0)