Skip to content
This repository was archived by the owner on Dec 5, 2021. It is now read-only.

Commit 02eae8e

Browse files
Merge remote-tracking branch 'origin/master'
Former-commit-id: 435647d
2 parents f8efdd6 + cc77b69 commit 02eae8e

34 files changed

Lines changed: 336 additions & 316 deletions

src/main/java/org/maxgamer/quickshop/shop/ContainerShop.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1001,7 +1001,7 @@ public String toString() {
10011001
sb.append(" Unlimited: true");
10021002
}
10031003
sb.append(" Price: ").append(getPrice());
1004-
sb.append(" Item: ").append(getItem());
1004+
//sb.append(" Item: ").append(getItem());
10051005
return sb.toString();
10061006
}
10071007

src/main/java/org/maxgamer/quickshop/shop/ShopLoader.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.google.gson.JsonSyntaxException;
2424
import lombok.Getter;
2525
import lombok.Setter;
26+
import lombok.ToString;
2627
import org.bukkit.Bukkit;
2728
import org.bukkit.Location;
2829
import org.bukkit.Material;
@@ -383,7 +384,9 @@ public class ShopDatabaseInfo {
383384

384385
@Getter
385386
@Setter
387+
@ToString
386388
public class ShopDatabaseInfoOrigin {
389+
@ToString.Exclude
387390
private String item;
388391

389392
private String moderators;
@@ -430,11 +433,6 @@ public class ShopDatabaseInfoOrigin {
430433
this.unlimited = unlimited;
431434
}
432435

433-
@Override
434-
public String toString() {
435-
return new Gson().toJson(this);
436-
}
437-
438436
}
439437

440438
}

src/main/java/org/maxgamer/quickshop/shop/ShopManager.java

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -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

src/main/java/org/maxgamer/quickshop/util/paste/Paste.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020
package org.maxgamer.quickshop.util.paste;
2121

2222
import com.google.gson.Gson;
23-
import lombok.AllArgsConstructor;
24-
import lombok.Getter;
25-
import lombok.Setter;
26-
import lombok.SneakyThrows;
23+
import lombok.*;
2724
import org.bukkit.Bukkit;
2825
import org.bukkit.World;
2926
import org.bukkit.configuration.ConfigurationSection;
@@ -445,7 +442,9 @@ public String paste(@NotNull String content, int type) {
445442
}
446443
@Getter
447444
@Setter
445+
@ToString
448446
public class ShopDatabaseInfoOrigin {
447+
@ToString.Exclude
449448
private String item;
450449

451450
private String moderators;

src/main/resources/lang/af-ZA/messages.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"translation-version": "Support Version: Reremake",
44
"translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
55
"translation-country": "Language Zone: English (en_US)",
6-
"language-version": "39",
6+
"language-version": "40",
77
"not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.",
88
"no-anythings-in-your-hand": "&cThere is nothing in your hand.",
99
"no-permission": "&cYou do not have permission to do that.",
@@ -114,7 +114,9 @@
114114
"unlimited": "&aShop is now unlimited",
115115
"limited": "&aShop is now limited"
116116
},
117-
"some-shops-removed": "&e{0} &ashop removed",
117+
"transfer-success": "&aTransferred &e{0} &ashop(s) to &e{1}",
118+
"transfer-success-other": "&aTransferred &e{0} {1}&a's shop(s) to &e{2}",
119+
"some-shops-removed": "&e{0} &ashop(s) removed",
118120
"no-owner-given": "&cNo owner provided",
119121
"new-owner": "&aNew owner: &e{0}",
120122
"now-buying": "&aNow &dBUYING &e{0}",
@@ -159,7 +161,8 @@
159161
"size": "&eChange per bulk amount of a shop",
160162
"supercreate": "&eCreate a shop while bypassing all protection checks",
161163
"language": "&eChange the currently used language",
162-
"removeall": "&eRemove ALL shops of a specified player"
164+
"removeall": "&eRemove ALL shops of a specified player",
165+
"transfer": "&eTransfer someone's ALL shops to other"
163166
}
164167
},
165168
"signs": {

src/main/resources/lang/ar-SA/messages.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"translation-version": "Support Version: Reremake",
44
"translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
55
"translation-country": "Language Zone: English (en_US)",
6-
"language-version": "39",
6+
"language-version": "40",
77
"not-looking-at-shop": "&cCould not find a QuickShop. You need to look at one.",
88
"no-anythings-in-your-hand": "&cThere is nothing in your hand.",
99
"no-permission": "&cYou do not have permission to do that.",
@@ -114,7 +114,9 @@
114114
"unlimited": "&aShop is now unlimited",
115115
"limited": "&aShop is now limited"
116116
},
117-
"some-shops-removed": "&e{0} &ashop removed",
117+
"transfer-success": "&aTransferred &e{0} &ashop(s) to &e{1}",
118+
"transfer-success-other": "&aTransferred &e{0} {1}&a's shop(s) to &e{2}",
119+
"some-shops-removed": "&e{0} &ashop(s) removed",
118120
"no-owner-given": "&cNo owner provided",
119121
"new-owner": "&aNew owner: &e{0}",
120122
"now-buying": "&aNow &dBUYING &e{0}",
@@ -159,7 +161,8 @@
159161
"size": "&eChange per bulk amount of a shop",
160162
"supercreate": "&eCreate a shop while bypassing all protection checks",
161163
"language": "&eChange the currently used language",
162-
"removeall": "&eRemove ALL shops of a specified player"
164+
"removeall": "&eRemove ALL shops of a specified player",
165+
"transfer": "&eTransfer someone's ALL shops to other"
163166
}
164167
},
165168
"signs": {

src/main/resources/lang/ca-ES/messages.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"translation-version": "Versiò suportada: Reremake",
44
"translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
55
"translation-country": "Zona de l'idioma: Català (ca_ES)",
6-
"language-version": "1",
6+
"language-version": "40",
77
"not-looking-at-shop": "No s'ha trobat cap QuickShop. Has de mirar a una.",
88
"no-anythings-in-your-hand": "Ni hi ha res a la teva mà.",
99
"no-permission": "No tens permisos per a fer això.",
@@ -114,7 +114,9 @@
114114
"unlimited": "&aLa botiga ara és il·limitada.",
115115
"limited": "&aLa butiga ara és limitada."
116116
},
117-
"some-shops-removed": "&e{0} &abotiga el·liminada.",
117+
"transfer-success": "&aTransferred &e{0} &ashop(s) to &e{1}",
118+
"transfer-success-other": "&aTransferred &e{0} {1}&a's shop(s) to &e{2}",
119+
"some-shops-removed": "&e{0} &ashop(s) removed",
118120
"no-owner-given": "&cNo s'ha proporcionat cap amo.",
119121
"new-owner": "&aNou amo: &e{0}&a.",
120122
"now-buying": "&aAra &dCOMPRANT &e{0}&a.",
@@ -159,7 +161,8 @@
159161
"size": "&eChange per bulk amount of a shop",
160162
"supercreate": "&eCreate a shop while bypassing all protection checks",
161163
"language": "&eChange the currently used language",
162-
"removeall": "&eRemove ALL shops of a specified player"
164+
"removeall": "&eRemove ALL shops of a specified player",
165+
"transfer": "&eTransfer someone's ALL shops to other"
163166
}
164167
},
165168
"signs": {

src/main/resources/lang/cs-CZ/messages.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"translation-version": "Verze: Reremake",
44
"translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
55
"translation-country": "Language Zone: Czech (cs_CZ)",
6-
"language-version": "39",
6+
"language-version": "40",
77
"not-looking-at-shop": "&cNelze najít QuickShop. Musíš se na něj podívat.",
88
"no-anythings-in-your-hand": "&cNemáš v ruce žádný předmět.",
99
"no-permission": "&cNa tuto akci nemáš práva.",
@@ -114,7 +114,9 @@
114114
"unlimited": "&aShop is now unlimited",
115115
"limited": "&aShop is now limited"
116116
},
117-
"some-shops-removed": "&e{0} &ashop removed",
117+
"transfer-success": "&aTransferred &e{0} &ashop(s) to &e{1}",
118+
"transfer-success-other": "&aTransferred &e{0} {1}&a's shop(s) to &e{2}",
119+
"some-shops-removed": "&e{0} &ashop(s) removed",
118120
"no-owner-given": "&cNo owner provided",
119121
"new-owner": "&aNew owner: &e{0}",
120122
"now-buying": "&aNow &dBUYING &e{0}",
@@ -159,7 +161,8 @@
159161
"size": "&eChange per bulk amount of a shop",
160162
"supercreate": "&eCreate a shop while bypassing all protection checks",
161163
"language": "&eChange the currently used language",
162-
"removeall": "&eRemove ALL shops of a specified player"
164+
"removeall": "&eRemove ALL shops of a specified player",
165+
"transfer": "&eTransfer someone's ALL shops to other"
163166
}
164167
},
165168
"signs": {

src/main/resources/lang/da-DK/messages.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"translation-version": "Support Version: Reremake",
44
"translation-contributors": "Contributors: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken and Andre_601",
55
"translation-country": "Language Zone: English (en_US)",
6-
"language-version": "39",
6+
"language-version": "40",
77
"not-looking-at-shop": "&cKunne ikke finde en QuickShop. Du skal kigge på en.",
88
"no-anythings-in-your-hand": "&cDer er intet i din hånd.",
99
"no-permission": "&cDu har ikke rettighederne til at gøre dette.",
@@ -114,7 +114,9 @@
114114
"unlimited": "&aShop is now unlimited",
115115
"limited": "&aShop is now limited"
116116
},
117-
"some-shops-removed": "&e{0} &ashop removed",
117+
"transfer-success": "&aTransferred &e{0} &ashop(s) to &e{1}",
118+
"transfer-success-other": "&aTransferred &e{0} {1}&a's shop(s) to &e{2}",
119+
"some-shops-removed": "&e{0} &ashop(s) removed",
118120
"no-owner-given": "&cNo owner provided",
119121
"new-owner": "&aNew owner: &e{0}",
120122
"now-buying": "&aNow &dBUYING &e{0}",
@@ -159,7 +161,8 @@
159161
"size": "&eChange per bulk amount of a shop",
160162
"supercreate": "&eCreate a shop while bypassing all protection checks",
161163
"language": "&eChange the currently used language",
162-
"removeall": "&eRemove ALL shops of a specified player"
164+
"removeall": "&eRemove ALL shops of a specified player",
165+
"transfer": "&eTransfer someone's ALL shops to other"
163166
}
164167
},
165168
"signs": {

src/main/resources/lang/de-DE/messages.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"translation-version": "Unterstütze Version: Reremake",
44
"translation-contributors": "Mitwirkende: Timtower, Netherfoam, KaiNoMood, Mgazul, JackTheChicken und Andre_601",
55
"translation-country": "Sprache: Deutsch (de_DE)",
6-
"language-version": "39",
6+
"language-version": "40",
77
"not-looking-at-shop": "&cKonnte keinen QuickShop finden. Du musst auf einen schauen.",
88
"no-anythings-in-your-hand": "&cEs befindet sich kein Gegenstand in deiner Hand.",
99
"no-permission": "&cDu hast keine Berechtigung für diesen Befehl!",
@@ -114,7 +114,9 @@
114114
"unlimited": "&aDer Shop ist nun unlimitiert",
115115
"limited": "&aDer Shop ist nun limitiert"
116116
},
117-
"some-shops-removed": "&e{0} &aShop entfernt",
117+
"transfer-success": "&aTransferred &e{0} &ashop(s) to &e{1}",
118+
"transfer-success-other": "&aTransferred &e{0} {1}&a's shop(s) to &e{2}",
119+
"some-shops-removed": "&e{0} &ashop(s) removed",
118120
"no-owner-given": "&cKein Eigentümer angegeben",
119121
"new-owner": "&aNeuer Besitzer: &e{0}",
120122
"now-buying": "&e{0} &awerden jetzt &dANGEKAUFT",
@@ -159,7 +161,8 @@
159161
"size": "&eÄndert die Mengenanzahl eines Shops",
160162
"supercreate": "&eErstellen eines Shops, während alle Schutzprüfungen umgangen werden",
161163
"language": "&eÄndert die derzeitig verwendete Sprache",
162-
"removeall": "&eEntferne ALLE Shops eines bestimmten Spielers"
164+
"removeall": "&eEntferne ALLE Shops eines bestimmten Spielers",
165+
"transfer": "&eTransfer someone's ALL shops to other"
163166
}
164167
},
165168
"signs": {

0 commit comments

Comments
 (0)