Skip to content

Commit

Permalink
fix(folia): use recommended class for detecting folia (#261)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuasing authored Aug 31, 2023
1 parent 160b2a8 commit 52f5a4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ This allows the Git history to be more readable and also allows us to generate c
- `events`, when modifying a file that is related to events.
- `examples`, when modifying an example.
- `extensions`, when modifying a file that is related to extensions.
- `folia`, when modifying a file inside the `platform-folia` module.
- `minestom`, when modifying a file inside the `platform-minestom` module.
- `nukkit`, when modifying a file inside the `platform-nukkit` module.
- `scheduling`, when modifying a file that is related to scheduling.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,15 @@ public final class FoliaChameleon extends BukkitChameleon {
}

/**
* Check if Folia is present.
* Returns whether this server is a Folia server.
*
* @return true if Folia is present.
* @return {@code true} if this server is a Folia server.
*/
private static boolean isFolia() {
try {
// find a better class to use for this?
Class.forName("io.papermc.paper.threadedregions.scheduler.AsyncScheduler");
Class.forName("io.papermc.paper.threadedregions.RegionizedServer");
return true;
} catch (ClassNotFoundException e) {
} catch (ClassNotFoundException ex) {
return false;
}
}
Expand Down

0 comments on commit 52f5a4d

Please sign in to comment.