3.1.2 bugfixes (see long description)

- add messages in /rank and /rankup for when the configuration has a rankup to a non-existent rank.
- add invalid rankup message
- fix error for placeholders when prestiging is disabled
- add message for when a rank has no requirements
This commit is contained in:
okx-code
2018-10-03 15:43:55 +01:00
parent cad5280006
commit ae52d94fe8
9 changed files with 36 additions and 15 deletions
@@ -32,6 +32,14 @@ public class RanksCommand implements CommandExecutor {
plugin.sendMessage(sender, Message.RANKS_CURRENT, rank, next);
message = Message.RANKS_INCOMPLETE;
} else {
// helpful message to say there is a null rankup
if(next == null) {
plugin.getMessage(Message.INVALID_RANKUP).failIfEmpty().send(sender);
plugin.getLogger().severe("Rankup from " + rank.getName() + " to " + rank.getNext() +
" is defined but " + rank.getNext() + " does not exist.");
return true;
}
plugin.sendMessage(sender, message, rank, next);
}
rank = next;