mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Merge remote-tracking branch 'origin/master'
Former-commit-id: 60f0c76ff024c92f4e87823206a3f65e5de25002 [formerly fb5c6b9641e2b2b3921c6b06232a4b8436a33055] Former-commit-id: 43b0c374528168c59e450098549b92b16c61de2d
This commit is contained in:
commit
79a0bcb9fe
6 files changed
+14
-8
No files matched your search
@@ -66,7 +66,7 @@ public class SubCommand_Price implements CommandProcesser {
|
||||
return;
|
||||
}
|
||||
|
||||
final boolean format = plugin.getConfig().getBoolean("use-deciaml-format");
|
||||
final boolean format = plugin.getConfig().getBoolean("use-decimal-format");
|
||||
|
||||
if (plugin.getConfig().getBoolean("shop.allow-free-shop")) {
|
||||
if (price != 0 && price < minPrice) {
|
||||
|
||||
@@ -198,14 +198,20 @@ public class Economy_Vault implements EconomyCore, Listener {
|
||||
if (!checkValid()) {
|
||||
return 0.0;
|
||||
}
|
||||
OfflinePlayer p = Bukkit.getOfflinePlayer(name);
|
||||
|
||||
final OfflinePlayer offlinePlayer = Bukkit.getOfflinePlayer(name);
|
||||
|
||||
if (offlinePlayer.getName() == null) {
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
try {
|
||||
return this.vault.getBalance(p);
|
||||
return this.vault.getBalance(offlinePlayer);
|
||||
} catch (Throwable t) {
|
||||
plugin.getSentryErrorReporter().ignoreThrow();
|
||||
t.printStackTrace();
|
||||
plugin.getLogger()
|
||||
.warning("This seems not QuickShop fault, you should cotact with your economy plugin author. (" + getProviderName() + ")");
|
||||
.warning("This seems not QuickShop fault, you should contact with your economy plugin author. (" + getProviderName() + ")");
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1042,7 +1042,7 @@ public class QuickShop extends JavaPlugin {
|
||||
selectedVersion = 66;
|
||||
}
|
||||
if (selectedVersion == 66) {
|
||||
getConfig().set("use-deciaml-format", false);
|
||||
getConfig().set("use-decimal-format", false);
|
||||
getConfig().set("decimal-format", "#,###.##");
|
||||
getConfig().set("shop.show-owner-uuid-in-controlpanel-if-op", false);
|
||||
getConfig().set("config-version", 67);
|
||||
|
||||
@@ -217,7 +217,7 @@ public class ContainerShop implements Shop {
|
||||
String world = this.getLocation().getWorld().getName();
|
||||
int unlimited = this.isUnlimited() ? 1 : 0;
|
||||
try {
|
||||
plugin.getDatabaseHelper().updateShop(ShopModerator.serialize(this.moderator.clone()), this
|
||||
plugin.getDatabaseHelper().updateShop(ShopModerator.serialize(this.moderator), this
|
||||
.getItem(), unlimited, shopType.toID(), this.getPrice(), x, y, z, world);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -226,7 +226,7 @@ public class ShopManager {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean decFormat = plugin.getConfig().getBoolean("use-deciaml-format");
|
||||
boolean decFormat = plugin.getConfig().getBoolean("use-decimal-format");
|
||||
if (plugin.getConfig().getBoolean("shop.allow-free-shop")) {
|
||||
if (price != 0 && price < minPrice) {
|
||||
p.sendMessage(MsgUtil.getMessage("price-too-cheap", p, (decFormat) ? MsgUtil.decimalFormat(minPrice) : "" + minPrice));
|
||||
|
||||
@@ -584,7 +584,7 @@ public class MsgUtil {
|
||||
}
|
||||
// Set Price
|
||||
if (QuickShop.getPermissionManager().hasPermission(sender, "quickshop.other.price") || shop.getOwner().equals(((Player) sender).getUniqueId())) {
|
||||
String text = MsgUtil.getMessage("controlpanel.price", sender, (plugin.getConfig().getBoolean("use-deciaml-format")) ? decimalFormat(shop.getPrice()) : "" + shop.getPrice());
|
||||
String text = MsgUtil.getMessage("controlpanel.price", sender, (plugin.getConfig().getBoolean("use-decimal-format")) ? decimalFormat(shop.getPrice()) : "" + shop.getPrice());
|
||||
String hoverText = MsgUtil.getMessage("controlpanel.price-hover", sender);
|
||||
String clickCommand = MsgUtil.getMessage("controlpanel.commands.price", sender);
|
||||
chatSheetPrinter.printSuggestableCmdLine(text, hoverText, clickCommand);
|
||||
|
||||
Reference in new issue
Block a user