mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 05:06:44 +01:00
Bug through last Economy PR - Withdrawn money for non-affordable plots (#3036)
* Replaced economy supported (Vault) check within cost condition with a pre-eliminating if-guard * Negate mob-place flag debug message * Actually prevent purchase of plots if they can't afford it (whoops) Co-authored-by: NotMyFault <mc.cache@web.de>
This commit is contained in:
parent
24eebe6711
commit
eb9d7e97d9
@ -315,7 +315,7 @@ public class EntityEventListener implements Listener {
|
|||||||
PlotArea area = location.getPlotArea();
|
PlotArea area = location.getPlotArea();
|
||||||
if (area != null) {
|
if (area != null) {
|
||||||
Plot plot = area.getOwnedPlot(location);
|
Plot plot = area.getOwnedPlot(location);
|
||||||
if (plot != null && plot.getFlag(MobPlaceFlag.class)) {
|
if (plot != null && !plot.getFlag(MobPlaceFlag.class)) {
|
||||||
plot.debug(e.getType() + " could not change block because mob-place = false");
|
plot.debug(e.getType() + " could not change block because mob-place = false");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -323,6 +323,7 @@ public class Auto extends SubCommand {
|
|||||||
Template.of("money", this.econHandler.format(cost)),
|
Template.of("money", this.econHandler.format(cost)),
|
||||||
Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player)))
|
Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player)))
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
this.econHandler.withdrawMoney(player, cost);
|
this.econHandler.withdrawMoney(player, cost);
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
|
@ -161,6 +161,7 @@ public class Claim extends SubCommand {
|
|||||||
Template.of("money", this.econHandler.format(cost)),
|
Template.of("money", this.econHandler.format(cost)),
|
||||||
Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player)))
|
Template.of("balance", this.econHandler.format(this.econHandler.getMoney(player)))
|
||||||
);
|
);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
this.econHandler.withdrawMoney(player, cost);
|
this.econHandler.withdrawMoney(player, cost);
|
||||||
player.sendMessage(
|
player.sendMessage(
|
||||||
|
Loading…
Reference in New Issue
Block a user