Adds a missing insufficient funds message when checking if vehicle passengers can pay for the teleportation
This commit is contained in:
parent
b98aec4a20
commit
91a0316e6e
@ -154,9 +154,13 @@ public class VehicleEventListener implements Listener {
|
||||
return false;
|
||||
}
|
||||
|
||||
//Transfer payment if necessary
|
||||
//Check if the player is able to afford the teleport fee
|
||||
int cost = Stargate.getEconomyConfig().getUseCost(player, entrancePortal, destinationPortal);
|
||||
return cost <= 0 || Stargate.getEconomyConfig().canAffordFee(player, cost);
|
||||
boolean canAffordFee = cost <= 0 || Stargate.getEconomyConfig().canAffordFee(player, cost);
|
||||
if (!canAffordFee) {
|
||||
Stargate.getMessageSender().sendErrorMessage(player, Stargate.getString("ecoInFunds"));
|
||||
}
|
||||
return canAffordFee;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user