Updated build.gradle with spigot 1.8

This commit is contained in:
OmerBenGera 2021-08-31 20:43:45 +03:00
parent 10539d632b
commit 17f8e72b2a
2 changed files with 2 additions and 2 deletions

View File

@ -58,7 +58,7 @@ dependencies {
implementation 'com.bgsoftware.common.reflection:ReflectionUtils:latest'
// Spigot jars
compileOnly "org.spigotmc:v1_7_R3:latest"
compileOnly "org.spigotmc:v1_8_R3:latest"
compileOnly 'org.spigotmc:v1_16_R3-Tuinity:latest'
// Plugin Hooks

View File

@ -236,7 +236,7 @@ public class Metrics {
? ((Collection<?>) onlinePlayersMethod.invoke(Bukkit.getServer())).size()
: ((Player[]) onlinePlayersMethod.invoke(Bukkit.getServer())).length;
} catch (Exception e) {
playerAmount = Bukkit.getOnlinePlayers().length; // Just use the new method if the Reflection failed
playerAmount = Bukkit.getOnlinePlayers().size(); // Just use the new method if the Reflection failed
}
int onlineMode = Bukkit.getOnlineMode() ? 1 : 0;
String bukkitVersion = Bukkit.getVersion();