diff --git a/src/main/java/org/maxgamer/quickshop/QuickShop.java b/src/main/java/org/maxgamer/quickshop/QuickShop.java index 3dc64697c..399618a69 100644 --- a/src/main/java/org/maxgamer/quickshop/QuickShop.java +++ b/src/main/java/org/maxgamer/quickshop/QuickShop.java @@ -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(); diff --git a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java index 709a6e103..ba7911e4f 100644 --- a/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java +++ b/src/main/java/org/maxgamer/quickshop/Shop/ShopManager.java @@ -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")) { diff --git a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java index 5cbf6fa1e..220057408 100644 --- a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java +++ b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java @@ -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 msgs = player_messages.get(player); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index fae996133..79d1b3451 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -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. can bypass it blacklist: