mirror of
https://github.com/Auxilor/EcoSkills.git
synced 2026-01-01 13:26:30 +00:00
API: Changed int to double
This commit is contained in:
@@ -19,7 +19,7 @@ public class ItemStatModifier implements StatModifier {
|
||||
/**
|
||||
* The amount.
|
||||
*/
|
||||
private final int amount;
|
||||
private final double amount;
|
||||
|
||||
/**
|
||||
* The slots.
|
||||
@@ -59,7 +59,7 @@ public class ItemStatModifier implements StatModifier {
|
||||
*/
|
||||
public ItemStatModifier(@NotNull final NamespacedKey key,
|
||||
@NotNull final Stat stat,
|
||||
final int amount,
|
||||
final double amount,
|
||||
@NotNull final ModifierOperation operation,
|
||||
@NotNull final EquipmentSlot... slot) {
|
||||
this.key = key;
|
||||
@@ -80,7 +80,7 @@ public class ItemStatModifier implements StatModifier {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAmount() {
|
||||
public double getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public class PlayerStatModifier implements StatModifier {
|
||||
/**
|
||||
* The amount.
|
||||
*/
|
||||
private final int amount;
|
||||
private final double amount;
|
||||
|
||||
/**
|
||||
* The operation.
|
||||
@@ -50,7 +50,7 @@ public class PlayerStatModifier implements StatModifier {
|
||||
*/
|
||||
public PlayerStatModifier(@NotNull final NamespacedKey key,
|
||||
@NotNull final Stat stat,
|
||||
final int amount,
|
||||
final double amount,
|
||||
@NotNull final ModifierOperation operation) {
|
||||
this.key = key;
|
||||
this.stat = stat;
|
||||
@@ -69,7 +69,7 @@ public class PlayerStatModifier implements StatModifier {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAmount() {
|
||||
public double getAmount() {
|
||||
return amount;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ public interface StatModifier {
|
||||
*
|
||||
* @return The amount.
|
||||
*/
|
||||
int getAmount();
|
||||
double getAmount();
|
||||
|
||||
/**
|
||||
* Get the operation.
|
||||
|
||||
@@ -142,7 +142,7 @@ fun OfflinePlayer.getStatLevel(stat: Stat): Int {
|
||||
}
|
||||
|
||||
fun Player.getBonusStatLevel(stat: Stat): Int {
|
||||
var i = 0
|
||||
var i = 0.0
|
||||
for (modifier in this.getStatModifiers()) {
|
||||
if (modifier.stat == stat) {
|
||||
if (modifier.operation == ModifierOperation.ADD) {
|
||||
@@ -157,7 +157,7 @@ fun Player.getBonusStatLevel(stat: Stat): Int {
|
||||
}
|
||||
}
|
||||
}
|
||||
return i
|
||||
return i.toInt()
|
||||
}
|
||||
|
||||
fun OfflinePlayer.getBaseStatLevel(stat: Stat): Int {
|
||||
|
||||
Reference in New Issue
Block a user