Fixed reselling with negative prices (#280)

Prevents setting a negative resell price,. Some economy plugins accept a withdraw with a negative number, which has bad consequences (for example EssentialsEco does not accept it).
This commit is contained in:
leNic 2017-01-28 20:25:24 +01:00 committed by Thijs Wiefferink
parent fab415bf19
commit 89ae8b9b4a

View File

@ -46,6 +46,12 @@ public class ResellCommand extends CommandAreaShop {
plugin.message(sender, "resell-wrongPrice", args[1]);
return;
}
if(price < 0) {
plugin.message(sender, "resell-wrongPrice", args[1]);
return;
}
BuyRegion buy;
if(args.length <= 2) {
if (sender instanceof Player) {