Fixed Money Spam if Amount is 0
This commit is contained in:
parent
66ad927b2f
commit
cd24b053dc
@ -36,6 +36,11 @@ public class CmdMoneyDeposit extends FCommand {
|
||||
public void perform(CommandContext context) {
|
||||
double amount = context.argAsDouble(0, 0d);
|
||||
EconomyParticipator faction = context.argAsFaction(1, context.faction);
|
||||
|
||||
if(amount <= 0){
|
||||
return;
|
||||
}
|
||||
|
||||
if (faction == null) {
|
||||
return;
|
||||
}
|
||||
|
@ -33,6 +33,12 @@ public class CmdMoneyTransferFf extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
double amount = context.argAsDouble(0, 0d);
|
||||
|
||||
if(amount <= 0){
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
EconomyParticipator from = context.argAsFaction(1);
|
||||
if (from == null) {
|
||||
return;
|
||||
|
@ -32,6 +32,11 @@ public class CmdMoneyTransferFp extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
double amount = context.argAsDouble(0, 0d);
|
||||
|
||||
if(amount <= 0){
|
||||
return;
|
||||
}
|
||||
|
||||
EconomyParticipator from = context.argAsFaction(1);
|
||||
if (from == null) {
|
||||
return;
|
||||
|
@ -32,6 +32,11 @@ public class CmdMoneyTransferPf extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
double amount = context.argAsDouble(0, 0d);
|
||||
|
||||
if(amount <= 0){
|
||||
return;
|
||||
}
|
||||
|
||||
EconomyParticipator from = context.argAsBestFPlayerMatch(1);
|
||||
if (from == null) {
|
||||
return;
|
||||
|
@ -39,6 +39,11 @@ public class CmdMoneyWithdraw extends FCommand {
|
||||
@Override
|
||||
public void perform(CommandContext context) {
|
||||
double amount = context.argAsDouble(0, 0d);
|
||||
|
||||
if(amount <= 0){
|
||||
return;
|
||||
}
|
||||
|
||||
EconomyParticipator faction = context.argAsFaction(1, context.faction);
|
||||
if (faction == null) {
|
||||
return;
|
||||
|
@ -451,6 +451,7 @@ public class FactionsPlayerListener implements Listener {
|
||||
case CHIPPED_ANVIL:
|
||||
case DAMAGED_ANVIL:
|
||||
case BREWING_STAND:
|
||||
|
||||
return PermissableAction.CONTAINER;
|
||||
default:
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user