Uses depositPlayer for negative economy transactions
This commit is contained in:
@@ -182,7 +182,11 @@ public final class EconomyHelper {
|
|||||||
if (!economy.has(player, amount)) {
|
if (!economy.has(player, amount)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (amount > 0) {
|
||||||
economy.withdrawPlayer(player, amount);
|
economy.withdrawPlayer(player, amount);
|
||||||
|
} else {
|
||||||
|
economy.depositPlayer(player, -amount);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user