Boosters now properly shows that they're expired.

Please add " booster-expired: '&cExpired!' "
to your messages.yml
This commit is contained in:
ASangarin 2020-11-01 15:33:02 +01:00
parent 71b8183299
commit 06b3aee9bf
2 changed files with 7 additions and 3 deletions

View File

@ -181,7 +181,9 @@ public class PlayerStats extends EditableInventory {
holders.register("author", boost.hasAuthor() ? boost.getAuthor() : "Server");
holders.register("value", (int) (boost.getExtra() * 100));
holders.register("left", new DelayFormat(2).format(boost.getLeft()));
holders.register("left", boost.isTimedOut() ?
MMOCore.plugin.configManager.getSimpleMessage("booster-expired").message()
: new DelayFormat(2).format(boost.getLeft()));
return holders;
}
@ -199,7 +201,9 @@ public class PlayerStats extends EditableInventory {
holders.register("author", boost.hasAuthor() ? boost.getAuthor() : "Server");
holders.register("profession", boost.getProfession().getName());
holders.register("value", (int) (boost.getExtra() * 100));
holders.register("left", new DelayFormat(2).format(boost.getLeft()));
holders.register("left", boost.isTimedOut() ?
MMOCore.plugin.configManager.getSimpleMessage("booster-expired").message()
: new DelayFormat(2).format(boost.getLeft()));
return holders;
}
@ -274,7 +278,6 @@ public class PlayerStats extends EditableInventory {
@Override
public Placeholders getPlaceholders(PluginInventory inv, int n) {
PlayerData data = inv.getPlayerData();
Placeholders holders = new Placeholders();

View File

@ -25,6 +25,7 @@ booster-skill:
- '&e'
- '&eA &6{multiplier}x&e &6{profession} &eEXP multiplier is now active!'
- '&e'
booster-expired: '&cExpired!'
# Fishing Profession
caught-fish: '&cYou caught a fish!'