diff --git a/pom.xml b/pom.xml
index c76f8c973..96a26cfe9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.maxgamer
QuickShop
- Reremake 1.3.5.6
+ Reremake 1.3.5.7
diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java
index fe731449f..12c84d4d9 100644
--- a/src/main/java/org/maxgamer/quickshop/QuickShop.java
+++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java
@@ -760,6 +760,14 @@ public class QuickShop extends JavaPlugin {
saveConfig();
reloadConfig();
}
+ if (selectedVersion == 18) {
+ getConfig().set("shop.disable-vault-format", false);
+ getConfig().set("config-version", 19);
+ selectedVersion = 19;
+ saveConfig();
+ reloadConfig();
+ }
+
}
/** Reloads QuickShops config */
diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ContainerShop.java b/src/main/java/org/maxgamer/quickshop/Shop/ContainerShop.java
index 07e1a4b62..49521046a 100644
--- a/src/main/java/org/maxgamer/quickshop/Shop/ContainerShop.java
+++ b/src/main/java/org/maxgamer/quickshop/Shop/ContainerShop.java
@@ -176,14 +176,15 @@ public class ContainerShop implements Shop {
}
/**
- * Sets the price of the shop. Does not update it in the database. Use
- * shop.update() for that.
+ * Sets the price of the shop.
*
* @param price
* The new price of the shop.
*/
public void setPrice(double price) {
this.price = price;
+ update();
+ Util.debugLog("New price is applyed to shop: "+String.valueOf(price));
}
/**
@@ -422,11 +423,11 @@ public class ContainerShop implements Shop {
* Changes the owner of this shop to the given player.
*
* @param owner
- * The name of the owner. You must do shop.update() after to save
- * it after a reboot.
*/
public void setOwner(UUID owner) {
this.owner = owner;
+ update();
+ Util.debugLog("New owner is applyed to shop: "+owner.toString());
}
/**
@@ -440,6 +441,8 @@ public class ContainerShop implements Shop {
public void setUnlimited(boolean unlimited) {
this.unlimited = unlimited;
+ update();
+ Util.debugLog("New unlimited mode is applyed to shop: "+String.valueOf(unlimited));
}
public boolean isUnlimited() {
@@ -467,6 +470,8 @@ public class ContainerShop implements Shop {
public void setShopType(ShopType shopType) {
this.shopType = shopType;
this.setSignText();
+ update();
+ Util.debugLog("New shopType is applyed to shop: "+shopType.toString());
}
/**
@@ -496,6 +501,8 @@ public class ContainerShop implements Shop {
lines[2] = MsgUtil.getMessage("signs.item", Util.getNameForSign(this.item));
lines[3] = MsgUtil.getMessage("signs.price", Util.format(this.getPrice()));
this.setSignText(lines);
+ Util.debugLog("New sign was setuped.");
+ Util.debugLog(lines.toString());
}
/**
diff --git a/src/main/java/org/maxgamer/quickshop/Util/Util.java b/src/main/java/org/maxgamer/quickshop/Util/Util.java
index 99d125690..d988a9519 100644
--- a/src/main/java/org/maxgamer/quickshop/Util/Util.java
+++ b/src/main/java/org/maxgamer/quickshop/Util/Util.java
@@ -447,6 +447,9 @@ public class Util {
* @return The formatted string.
*/
public static String format(double n) {
+ if(plugin.getConfig().getBoolean("shop.disable-vault-format")) {
+ return plugin.getConfig().getString("shop.alternate-currency-symbol") + n;
+ }
try {
String formated = plugin.getEcon().format(n);
if (formated == null || formated.isEmpty()) {
diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml
index cca819343..466ced509 100644
--- a/src/main/resources/config.yml
+++ b/src/main/resources/config.yml
@@ -1,7 +1,7 @@
#Default config: https://github.com/Ghost-chu/QuickShop-Reremake/blob/master/src/main/resources/config.yml
#Do not touch if you not clear know about this
-config-version: 18
+config-version: 19
#Do not touch if you not know what is this
dev-mode: false
@@ -110,6 +110,10 @@ shop:
#If vault not return coins symbol, QuickShop will use this symbol to replace it.
alternate-currency-symbol: '$'
+ #It should can fix Vault or economy not correctly process the price and return "0" result problem.
+ #If you turn on this option, plugin will force use "alternate-currency-symbol" option.
+ disable-vault-format: false
+
#Ignore trade messages if shop is unlimited
ignore-unlimited-shop-messages: false
@@ -121,6 +125,7 @@ shop:
auto-fetch-shop-messages: true
#Ignore cancel chat event, maybe can improve compatibility with other chat plugin.
ignore-cancel-chat-event: false
+
#List of items to disallow selling of. Anyone with quickshop.bypass. can bypass it