mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-24 17:39:52 -05:00
[BETA]Unlimited shop nolonger calc in limits
Former-commit-id: b92d67f7a1dbaff360fd7e27533577214751ba13 [formerly 5b4fe1fbb24de417219b32ebdccba4878db617c7] Former-commit-id: 11d057f67c512156abb889fa42988f44bd324366
This commit is contained in:
1 parent
3cdf69d0dc
commit
bc84f3418e
1 file changed
+13
-4
@@ -253,12 +253,21 @@ public class ShopManager {
|
||||
|
||||
if (plugin.limit) {
|
||||
int owned = 0;
|
||||
Iterator<Shop> it = getShopIterator();
|
||||
while (it.hasNext()) {
|
||||
if (it.next().getOwner().equals(p.getUniqueId())) {
|
||||
owned++;
|
||||
for (HashMap<ShopChunk, HashMap<Location, Shop>> shopmap : getShops().values()) {
|
||||
for (HashMap<Location, Shop> shopLocs : shopmap.values()) {
|
||||
for (Shop shop : shopLocs.values()) {
|
||||
if (shop.getOwner().equals(p.getUniqueId())&&shop.isUnlimited()) {
|
||||
owned++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Iterator<Shop> it = getShopIterator();
|
||||
// while (it.hasNext()) {
|
||||
// if (it.next().getOwner().equals(p.getUniqueId())) {
|
||||
// owned++;
|
||||
// }
|
||||
// }
|
||||
int max = plugin.getShopLimit(p);
|
||||
if (owned + 1 > max) {
|
||||
//p.sendMessage(ChatColor.RED + "You have already created a maximum of " + owned + "/" + max + " shops!");
|
||||
|
||||
Reference in new issue
Block a user