new features

Former-commit-id: b273256e70266fb4964eccc87db09057e5afd097 [formerly b9955715d38b9a8d25a3dbe3744a59c4049990da]
Former-commit-id: 937de372c04ffda8a0d5c29c25662792256ad9e8
This commit is contained in:
Ghost_chu committed 2018-11-22 21:01:10 +08:00
1 parent a1266abafb
commit 2dd60de397
4 files changed
+10 -4

No files matched your search

@@ -815,6 +815,7 @@ public class QuickShop extends JavaPlugin {
getConfig().set("shop.pay-player-from-unlimited-shop-owner", false);
getConfig().set("plugin.ProtocolLib", false);
getConfig().set("plugin.Multiverse-Core", true);
getConfig().set("shop.ignore-unlimited",false);
getConfig().set("config-version", 9);
selectedVersion = 9;
saveConfig();
@@ -441,7 +441,7 @@ public class ShopManager {
msg += "\n" + MsgUtil.getMessage("shop-out-of-stock", "" + shop.getLocation().getBlockX(),
"" + shop.getLocation().getBlockY(), "" + shop.getLocation().getBlockZ(),
MsgUtil.getDisplayName(shop.getItem()));
MsgUtil.send(shop.getOwner(), msg);
MsgUtil.send(shop.getOwner(), msg,shop.isUnlimited());
} else {
String msg = MsgUtil.getMessage("player-bought-from-your-store", p.getName(), "" + amount,
MsgUtil.getDisplayName(shop.getItem()));
@@ -449,7 +449,7 @@ public class ShopManager {
msg += "\n" + MsgUtil.getMessage("shop-out-of-stock", "" + shop.getLocation().getBlockX(),
"" + shop.getLocation().getBlockY(), "" + shop.getLocation().getBlockZ(),
shop.getDataName());
MsgUtil.send(shop.getOwner(), msg);
MsgUtil.send(shop.getOwner(), msg,shop.isUnlimited());
}
}
// Transfers the item from A to B
@@ -541,7 +541,7 @@ public class ShopManager {
if (space == amount)
msg += "\n" + MsgUtil.getMessage("shop-out-of-space", "" + shop.getLocation().getBlockX(),
"" + shop.getLocation().getBlockY(), "" + shop.getLocation().getBlockZ());
MsgUtil.send(shop.getOwner(), msg);
MsgUtil.send(shop.getOwner(), msg,shop.isUnlimited());
} else {
if (p.getUniqueId().equals(shop.getOwner())
&& !plugin.getConfig().getBoolean("shop.bypass-owner-check")) {
@@ -613,7 +613,9 @@ public class MsgUtil {
* they're online. Else, if they're not online, queues it for
* them in the database.
*/
public static void send(UUID player, String message) { //TODO Converted to UUID
public static void send(UUID player, String message,boolean isUnlimited) { //TODO Converted to UUID
if(plugin.getConfig().getBoolean("shop.ignore-unlimited-shop-messages")&&isUnlimited)
return; //Ignore unlimited shops messages.
OfflinePlayer p = Bukkit.getOfflinePlayer(player);
if (p == null || !p.isOnline()) {
LinkedList<String> msgs = player_messages.get(player);
+3
View File
@@ -120,6 +120,9 @@ shop:
#If vault not return coins symbol, QuickShop will use this symbol to replace it.
alternate-currency-symbol: '$'
#Ignore trade messages if shop is unlimited
ignore-unlimited-shop-messages: false
#List of items to disallow selling of. Anyone with quickshop.bypass.<itemID> can bypass it
blacklist: