mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-24 22:26:46 +01:00
Merge branches 'tridentsxbows' and 'master' of github.com:mcMMO-Dev/mcMMO into tridentsxbows
This commit is contained in:
commit
5dc95b1fca
@ -87,6 +87,9 @@ Version 2.2.000
|
||||
Parties got unnecessarily complex in my absence, I have removed many party features in order to simplify parties and bring them closer to my vision. I have also added new features which should improve parties where it matters.
|
||||
About the removed party features, all the features I removed I consider poor quality features and I don't think they belong in mcMMO. Feel free to yell at me in discord if you disagree.
|
||||
I don't know what genius decided to make parties public by default, when I found out that parties had been changed to such a system I could barely contain my disgust. Parties are back to being private, you get invited by a party leader or party officer. That is the only way to join a party.
|
||||
Version 2.1.157
|
||||
Fixed a NPE that prevented mctop (Leaderboards) from working
|
||||
|
||||
Version 2.1.156
|
||||
Added Woodcutting skill 'Knock on Wood' - This ability gives you goodies (saplings, xp orbs, apples, etc) when using Tree Feller
|
||||
Tree Feller no longer gives non-wood items by default, it now requires Knock on Wood for additional loot
|
||||
|
@ -9,12 +9,10 @@ import com.gmail.nossr50.datatypes.player.MMODataSnapshot;
|
||||
import com.gmail.nossr50.datatypes.player.PlayerProfile;
|
||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||
import org.apache.commons.lang.NullArgumentException;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
@ -60,13 +58,14 @@ public interface DatabaseManager {
|
||||
|
||||
/**
|
||||
* Retrieve leaderboard info.
|
||||
* Will never be null but it may be empty
|
||||
*
|
||||
* @param skill The skill to retrieve info on
|
||||
* @param pageNumber Which page in the leaderboards to retrieve
|
||||
* @param statsPerPage The number of stats per page
|
||||
* @return the requested leaderboard information
|
||||
*/
|
||||
@NotNull List<PlayerStat> readLeaderboard(@NotNull PrimarySkillType skill, int pageNumber, int statsPerPage) throws InvalidSkillException;
|
||||
@NotNull List<PlayerStat> readLeaderboard(@Nullable PrimarySkillType skill, int pageNumber, int statsPerPage) throws InvalidSkillException;
|
||||
|
||||
/**
|
||||
* Retrieve rank info into a HashMap from PrimarySkillType to the rank.
|
||||
|
@ -405,11 +405,11 @@ public final class SQLDatabaseManager extends AbstractDatabaseManager {
|
||||
return success;
|
||||
}
|
||||
|
||||
public @NotNull List<PlayerStat> readLeaderboard(@NotNull 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!");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user