mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
applied config option toggle decimal format
Former-commit-id: 6c8e72a557c1fde1a19c21cf846a83501ba9f3e7 [formerly 2d7ac86cf43e9a54e49beeb1f553b02f993a55df] Former-commit-id: dd7e3255607da59f34545c9a2c9291795b301cc2
This commit is contained in:
1 parent
c69125869b
commit
0247829a69
1 file changed
+4
-4
@@ -58,22 +58,22 @@ public class SubCommand_Price implements CommandProcesser {
|
||||
p.sendMessage(MsgUtil.getMessage("not-a-number", p, cmdArg[0]));
|
||||
return;
|
||||
}
|
||||
|
||||
boolean format = plugin.getConfig().getBoolean("use-deciaml-format");
|
||||
if (plugin.getConfig().getBoolean("shop.allow-free-shop")) {
|
||||
if (price != 0 && price < minPrice) {
|
||||
p.sendMessage(MsgUtil.getMessage("price-too-cheap", p, MsgUtil.decimalFormat(minPrice)));
|
||||
p.sendMessage(MsgUtil.getMessage("price-too-cheap", p, (format) ? MsgUtil.decimalFormat(minPrice) : "" + minPrice));
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (price < minPrice) {
|
||||
p.sendMessage(MsgUtil.getMessage("price-too-cheap", p, "" + MsgUtil.decimalFormat(minPrice)));
|
||||
p.sendMessage(MsgUtil.getMessage("price-too-cheap", p, (format) ? MsgUtil.decimalFormat(minPrice) : "" + minPrice));
|
||||
return;
|
||||
}
|
||||
}
|
||||
double price_limit = plugin.getConfig().getDouble("shop.maximum-price");
|
||||
if (price_limit != -1) {
|
||||
if (price > price_limit) {
|
||||
p.sendMessage(MsgUtil.getMessage("price-too-high", p, MsgUtil.decimalFormat(price_limit)));
|
||||
p.sendMessage(MsgUtil.getMessage("price-too-high", p, (format) ? MsgUtil.decimalFormat(price_limit) : "" + price_limit));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user