mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-24 16:15:27 +02:00
2.1.157
This commit is contained in:
@@ -17,6 +17,8 @@ import com.gmail.nossr50.util.Misc;
|
||||
import org.apache.tomcat.jdbc.pool.DataSource;
|
||||
import org.apache.tomcat.jdbc.pool.PoolProperties;
|
||||
import org.bukkit.scheduler.BukkitRunnable;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
@@ -344,11 +346,11 @@ public final class SQLDatabaseManager implements DatabaseManager {
|
||||
return success;
|
||||
}
|
||||
|
||||
public List<PlayerStat> readLeaderboard(PrimarySkillType skill, int pageNumber, int statsPerPage) throws InvalidSkillException {
|
||||
public @NotNull List<PlayerStat> readLeaderboard(@Nullable PrimarySkillType skill, int pageNumber, int statsPerPage) throws InvalidSkillException {
|
||||
List<PlayerStat> stats = new ArrayList<>();
|
||||
|
||||
//Fix for a plugin that people are using that is throwing SQL errors
|
||||
if(skill.isChildSkill()) {
|
||||
if(skill != null && skill.isChildSkill()) {
|
||||
mcMMO.p.getLogger().severe("A plugin hooking into mcMMO is being naughty with our database commands, update all plugins that hook into mcMMO and contact their devs!");
|
||||
throw new InvalidSkillException("A plugin hooking into mcMMO that you are using is attempting to read leaderboard skills for child skills, child skills do not have leaderboards! This is NOT an mcMMO error!");
|
||||
}
|
||||
|
Reference in New Issue
Block a user