mirror of
https://gitlab.com/phoenix-dvpmt/mmocore.git
synced 2024-11-27 00:45:40 +01:00
Fixed attribute stats display
This commit is contained in:
parent
33b9841182
commit
b125dac155
@ -2,7 +2,6 @@ package net.Indyuce.mmocore.gui;
|
||||
|
||||
import io.lumine.mythic.lib.MythicLib;
|
||||
import io.lumine.mythic.lib.UtilityMethods;
|
||||
import io.lumine.mythic.lib.api.stat.handler.StatHandler;
|
||||
import io.lumine.mythic.lib.api.stat.modifier.StatModifier;
|
||||
import io.lumine.mythic.lib.version.VersionMaterial;
|
||||
import net.Indyuce.mmocore.MMOCore;
|
||||
@ -124,14 +123,14 @@ public class PlayerStats extends EditableInventory {
|
||||
|
||||
public String apply(Player player, String str) {
|
||||
while (str.contains("{") && str.substring(str.indexOf("{")).contains("}")) {
|
||||
String holder = str.substring(str.indexOf("{") + 1, str.indexOf("}"));
|
||||
final String holder = str.substring(str.indexOf("{") + 1, str.indexOf("}"));
|
||||
String replaced;
|
||||
|
||||
if (holder.endsWith("_base")) {
|
||||
StatInfo info = StatInfo.valueOf(UtilityMethods.enumName(holder.substring(0, holder.length() - 5)));
|
||||
replaced = info.format(stats.getBase(info.name));
|
||||
} else if (holder.endsWith("_extra")) {
|
||||
StatInfo info = StatInfo.valueOf(UtilityMethods.enumName(holder.substring(0, holder.length() - 5)));
|
||||
StatInfo info = StatInfo.valueOf(UtilityMethods.enumName(holder.substring(0, holder.length() - 6)));
|
||||
replaced = info.format(MythicLib.plugin.getStats().getTotalValue(info.name, stats.getMap()) - stats.getBase(info.name));
|
||||
} else if (holder.startsWith("attribute_")) {
|
||||
PlayerAttribute attr = MMOCore.plugin.attributeManager.get(holder.substring(10).replace("_", "-").toLowerCase());
|
||||
|
@ -73,8 +73,8 @@ skills:
|
||||
|
||||
attributes:
|
||||
knockback-resistance:
|
||||
base: 15
|
||||
per-level: 1
|
||||
base: .15
|
||||
per-level: .01
|
||||
speed-malus-reduction:
|
||||
base: 10
|
||||
per-level: 2
|
||||
|
@ -60,8 +60,8 @@ skills:
|
||||
|
||||
attributes:
|
||||
knockback-resistance:
|
||||
base: 30
|
||||
per-level: 1
|
||||
base: .3
|
||||
per-level: .01
|
||||
speed-malus-reduction:
|
||||
base: 30
|
||||
per-level: 2
|
||||
|
Loading…
Reference in New Issue
Block a user