@@ -714,73 +714,6 @@ private void actionCreate(@NotNull Player p, @NotNull Map<UUID, Info> actions2,
714714 return ;
715715 }
716716
717-
718- // double minPrice = plugin.getConfig().getDouble("shop.minimum-price");
719- // try {
720- // if (plugin.getConfig().getBoolean("whole-number-prices-only")) {
721- // try {
722- // price = Integer.parseInt(message);
723- // } catch (NumberFormatException ex2) {
724- // // input is number, but not Integer
725- // Util.debugLog(ex2.getMessage());
726- // MsgUtil.sendMessage(p,MsgUtil.getMessage("not-a-integer", p, message));
727- // return;
728- // }
729- // } else {
730- // price = Double.parseDouble(message);
731- // String strFormat = new DecimalFormat("#.#########").format(Math.abs(price)).replace(",", ".");
732- // String[] processedDouble = strFormat.split(".");
733- // if (processedDouble.length > 1) {
734- // int maximumDigitsLimit = plugin.getConfig().getInt("maximum-digits-in-price", -1);
735- // if (processedDouble[1].length() > maximumDigitsLimit && maximumDigitsLimit != -1) {
736- // MsgUtil.sendMessage(p,MsgUtil.getMessage("digits-reach-the-limit", p, String.valueOf(maximumDigitsLimit)));
737- // return;
738- // }
739- // }
740- // }
741- //
742- // } catch (NumberFormatException ex) {
743- // // No number input
744- // Util.debugLog(ex.getMessage());
745- // MsgUtil.sendMessage(p,MsgUtil.getMessage("not-a-number", p, message));
746- // return;
747- // }
748- //
749- //
750- // boolean decFormat = plugin.getConfig().getBoolean("use-decimal-format");
751- // if (plugin.getConfig().getBoolean("shop.allow-free-shop")) {
752- // if (price != 0 && price < minPrice) {
753- // MsgUtil.sendMessage(p,MsgUtil.getMessage("price-too-cheap", p, (decFormat) ? MsgUtil.decimalFormat(minPrice) : "" + minPrice));
754- // return;
755- // }
756- // } else {
757- // if (price < minPrice) {
758- // MsgUtil.sendMessage(p,MsgUtil.getMessage("price-too-cheap", p, (decFormat) ? MsgUtil.decimalFormat(minPrice) : "" + minPrice));
759- // return;
760- // }
761- // }
762- //
763- // double maximumPrice = plugin.getConfig().getInt("shop.maximum-price");
764- // if (maximumPrice != -1) {
765- // if (price > maximumPrice) {
766- // MsgUtil.sendMessage(p,MsgUtil.getMessage("price-too-high", p, (decFormat) ? MsgUtil.decimalFormat(maximumPrice) : "" + maximumPrice));
767- // return;
768- // }
769- // }
770- // // Check price restriction
771- // Map.Entry<Double, Double> priceRestriction = Util.getPriceRestriction(info.getItem().getType());
772- // if (priceRestriction != null) {
773- // if (price < priceRestriction.getKey() || price > priceRestriction.getValue()) {
774- // // MsgUtil.sendMessage(p,ChatColor.RED+"Restricted prices for
775- // // "+info.getItem().getType()+": min "+priceRestriction.getKey()+", max
776- // // "+priceRestriction.getValue());
777- // MsgUtil.sendMessage(p,MsgUtil.getMessage("restricted-prices", p, Util.getItemStackName(info.getItem()), String.valueOf(priceRestriction.getKey()), String.valueOf(priceRestriction.getValue())));
778- // }
779- // }
780-
781- // if (plugin.getConfig().getBoolean("shop.allow-stacks") && info.getItem().getAmount() > 1) {//FIXME: need a better impl
782- // price = CalculateUtil.divide(price,info.getItem().getAmount());
783- // }
784717 double createCost = plugin .getConfig ().getDouble ("shop.cost" );
785718 // Create the sample shop.
786719
0 commit comments