mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
Improved format of exp amount in exp holo message
This commit is contained in:
parent
2d3249b15f
commit
5660a31d86
@ -1,5 +1,6 @@
|
|||||||
package net.Indyuce.mmocore.api.player;
|
package net.Indyuce.mmocore.api.player;
|
||||||
|
|
||||||
|
import io.lumine.mythic.lib.MythicLib;
|
||||||
import io.lumine.mythic.lib.api.player.MMOPlayerData;
|
import io.lumine.mythic.lib.api.player.MMOPlayerData;
|
||||||
import io.lumine.mythic.lib.player.TemporaryPlayerData;
|
import io.lumine.mythic.lib.player.TemporaryPlayerData;
|
||||||
import io.lumine.mythic.lib.player.cooldown.CooldownMap;
|
import io.lumine.mythic.lib.player.cooldown.CooldownMap;
|
||||||
@ -536,10 +537,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Experience hologram
|
|
||||||
if (hologramLocation != null && isOnline())
|
|
||||||
MMOCoreUtils.displayIndicator(hologramLocation, MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", "" + value).message());
|
|
||||||
|
|
||||||
value = MMOCore.plugin.boosterManager.calculateExp(null, value);
|
value = MMOCore.plugin.boosterManager.calculateExp(null, value);
|
||||||
value *= 1 + getStats().getStat(StatType.ADDITIONAL_EXPERIENCE) / 100;
|
value *= 1 + getStats().getStat(StatType.ADDITIONAL_EXPERIENCE) / 100;
|
||||||
|
|
||||||
@ -557,6 +554,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc
|
|||||||
if (event.isCancelled())
|
if (event.isCancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Experience hologram
|
||||||
|
if (hologramLocation != null && isOnline())
|
||||||
|
MMOCoreUtils.displayIndicator(hologramLocation, MMOCore.plugin.configManager.getSimpleMessage("exp-hologram", "exp", String.valueOf(event.getExperience())).message());
|
||||||
|
|
||||||
experience = Math.max(0, experience + event.getExperience());
|
experience = Math.max(0, experience + event.getExperience());
|
||||||
|
|
||||||
// Calculate the player's next level
|
// Calculate the player's next level
|
||||||
|
Loading…
Reference in New Issue
Block a user