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) {
|
public void perform(CommandContext context) {
|
||||||
double amount = context.argAsDouble(0, 0d);
|
double amount = context.argAsDouble(0, 0d);
|
||||||
EconomyParticipator faction = context.argAsFaction(1, context.faction);
|
EconomyParticipator faction = context.argAsFaction(1, context.faction);
|
||||||
|
|
||||||
|
if(amount <= 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (faction == null) {
|
if (faction == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -33,6 +33,12 @@ public class CmdMoneyTransferFf extends FCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void perform(CommandContext context) {
|
public void perform(CommandContext context) {
|
||||||
double amount = context.argAsDouble(0, 0d);
|
double amount = context.argAsDouble(0, 0d);
|
||||||
|
|
||||||
|
if(amount <= 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
EconomyParticipator from = context.argAsFaction(1);
|
EconomyParticipator from = context.argAsFaction(1);
|
||||||
if (from == null) {
|
if (from == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -32,6 +32,11 @@ public class CmdMoneyTransferFp extends FCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void perform(CommandContext context) {
|
public void perform(CommandContext context) {
|
||||||
double amount = context.argAsDouble(0, 0d);
|
double amount = context.argAsDouble(0, 0d);
|
||||||
|
|
||||||
|
if(amount <= 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EconomyParticipator from = context.argAsFaction(1);
|
EconomyParticipator from = context.argAsFaction(1);
|
||||||
if (from == null) {
|
if (from == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -32,6 +32,11 @@ public class CmdMoneyTransferPf extends FCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void perform(CommandContext context) {
|
public void perform(CommandContext context) {
|
||||||
double amount = context.argAsDouble(0, 0d);
|
double amount = context.argAsDouble(0, 0d);
|
||||||
|
|
||||||
|
if(amount <= 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EconomyParticipator from = context.argAsBestFPlayerMatch(1);
|
EconomyParticipator from = context.argAsBestFPlayerMatch(1);
|
||||||
if (from == null) {
|
if (from == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -39,6 +39,11 @@ public class CmdMoneyWithdraw extends FCommand {
|
|||||||
@Override
|
@Override
|
||||||
public void perform(CommandContext context) {
|
public void perform(CommandContext context) {
|
||||||
double amount = context.argAsDouble(0, 0d);
|
double amount = context.argAsDouble(0, 0d);
|
||||||
|
|
||||||
|
if(amount <= 0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
EconomyParticipator faction = context.argAsFaction(1, context.faction);
|
EconomyParticipator faction = context.argAsFaction(1, context.faction);
|
||||||
if (faction == null) {
|
if (faction == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -451,6 +451,7 @@ public class FactionsPlayerListener implements Listener {
|
|||||||
case CHIPPED_ANVIL:
|
case CHIPPED_ANVIL:
|
||||||
case DAMAGED_ANVIL:
|
case DAMAGED_ANVIL:
|
||||||
case BREWING_STAND:
|
case BREWING_STAND:
|
||||||
|
|
||||||
return PermissableAction.CONTAINER;
|
return PermissableAction.CONTAINER;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user