Skip to content

Commit 4ec200a

Browse files
committed
Use Bukkit.class instead of Class.forName
1 parent 08826c7 commit 4ec200a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/java/com/extendedclip/papi/expansion/server/ServerUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ public double[] getTps() {
106106
private void resolveTPSHandler() {
107107
try {
108108
// If this throws is the server not a fork...
109-
Class.forName("org.bukkit.Bukkit").getMethod("getTPS");
109+
Bukkit.class.getMethod("getTPS");
110110
hasTpsMethod = true;
111-
} catch (ClassNotFoundException | NoSuchMethodException ignored) {
111+
} catch (NoSuchMethodException ignored) {
112112
final String mcVersion = Bukkit.getServer().getClass().getPackage().getName().split("\\.")[3];
113113

114114
try {

0 commit comments

Comments
 (0)