Workaround from player-exploiting the latest suggested config

This commit is contained in:
SvenjaReißaus
2019-03-14 10:00:48 -05:00
parent 0af0416235
commit 22670ddb15
6 changed files with 32 additions and 9 deletions

View File

@@ -42,7 +42,10 @@ public class CmdMoneyTransferFf extends FCommand {
if (to == null) {
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
if (success && Conf.logMoneyTransactions) {

View File

@@ -42,6 +42,10 @@ public class CmdMoneyTransferFp extends FCommand {
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
if (success && Conf.logMoneyTransactions) {

View File

@@ -42,6 +42,10 @@ public class CmdMoneyTransferPf extends FCommand {
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to transfer money like this");
return;
}
boolean success = Econ.transferMoney(fme, from, to, amount);
if (success && Conf.logMoneyTransactions) {

View File

@@ -1,6 +1,7 @@
package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Conf;
import com.massivecraft.factions.Faction;
import com.massivecraft.factions.SavageFactions;
import com.massivecraft.factions.iface.EconomyParticipator;
import com.massivecraft.factions.integration.Econ;
@@ -45,6 +46,11 @@ public class CmdMoneyWithdraw extends FCommand {
return;
}
if (Conf.econFactionStartingBalance != 0 && (System.currentTimeMillis() - myFaction.getFoundedDate()) <= (Conf.econDenyWithdrawWhenMinutesAgeLessThan * 6000)) {
msg("Your faction is too young to withdraw money like this");
return;
}
boolean success = Econ.transferMoney(fme, faction, fme, amount);
if (success && Conf.logMoneyTransactions) {