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
@@ -29,8 +29,12 @@ public class RankupExpansion extends PlaceholderExpansion {
Rank nextRank = rank == null ? null : rankups.next(rank);
Prestiges prestiges = plugin.getPrestiges();
Prestige prestige = prestiges.getByPlayer(player);
Prestige nextPrestige = prestiges.next(prestige);
Prestige prestige = null;
Prestige nextPrestige = null;
if(prestiges != null) {
prestige = prestiges.getByPlayer(player);
nextPrestige = prestiges.next(prestige);
}
if (params.startsWith("requirement_")) {
String[] parts = params.split("_", 3);