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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user