!back to 1.9

This commit is contained in:
Jules 2022-02-06 21:36:26 +01:00
parent b9fab32f88
commit d0a64850fe
2 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>net.Indyuce</groupId>
<artifactId>MMOCore</artifactId>
<version>1.9.1-SNAPSHOT</version>
<version>1.9-SNAPSHOT</version>
<name>MMOCore</name>
<description>Offer your players a brand new RPG experience!!</description>

View File

@ -66,8 +66,8 @@ public class AttributeModifier extends PlayerModifier {
Validate.notNull(str, "String cannot be null");
Validate.notEmpty(str, "String cannot be empty");
type = str.toCharArray()[str.length() - 1] == '%' ? io.lumine.mythic.lib.player.modifier.ModifierType.RELATIVE : io.lumine.mythic.lib.player.modifier.ModifierType.FLAT;
value = Double.parseDouble(type == io.lumine.mythic.lib.player.modifier.ModifierType.RELATIVE ? str.substring(0, str.length() - 1) : str);
type = str.toCharArray()[str.length() - 1] == '%' ? ModifierType.RELATIVE : ModifierType.FLAT;
value = Double.parseDouble(type == ModifierType.RELATIVE ? str.substring(0, str.length() - 1) : str);
this.attribute = attribute;
}
@ -76,7 +76,7 @@ public class AttributeModifier extends PlayerModifier {
this.attribute = object.getString("attribute");
this.value = object.getDouble("value");
type = object.getBoolean("multiplicative", false) ? io.lumine.mythic.lib.player.modifier.ModifierType.RELATIVE : io.lumine.mythic.lib.player.modifier.ModifierType.FLAT;
type = object.getBoolean("multiplicative", false) ? ModifierType.RELATIVE : ModifierType.FLAT;
}
public String getAttribute() {