mirror of
https://github.com/kiranhart/Auction-House.git
synced 2025-02-17 19:31:20 +01:00
fix bundles not saving all items (stopped using a hashset)
Took 25 seconds
This commit is contained in:
parent
7acef89912
commit
7e41834d7d
@ -31,7 +31,7 @@ import lombok.NonNull;
|
|||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.ArrayList;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public final class GUISellPlaceItem extends AbstractPlaceholderGui {
|
public final class GUISellPlaceItem extends AbstractPlaceholderGui {
|
||||||
@ -89,7 +89,7 @@ public final class GUISellPlaceItem extends AbstractPlaceholderGui {
|
|||||||
.lore(Settings.GUI_SELL_PLACE_ITEM_ITEMS_CONTINUE_LORE.getStringList())
|
.lore(Settings.GUI_SELL_PLACE_ITEM_ITEMS_CONTINUE_LORE.getStringList())
|
||||||
.make(), click -> {
|
.make(), click -> {
|
||||||
|
|
||||||
final HashSet<ItemStack> items = gatherSellableItems();
|
final ArrayList<ItemStack> items = gatherSellableItems();
|
||||||
|
|
||||||
if (items.isEmpty())
|
if (items.isEmpty())
|
||||||
return;
|
return;
|
||||||
@ -126,8 +126,8 @@ public final class GUISellPlaceItem extends AbstractPlaceholderGui {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private HashSet<ItemStack> gatherSellableItems() {
|
private ArrayList<ItemStack> gatherSellableItems() {
|
||||||
final HashSet<ItemStack> items = new HashSet<>();
|
final ArrayList<ItemStack> items = new ArrayList<>();
|
||||||
|
|
||||||
for (int i = this.viewMode == ViewMode.SINGLE_ITEM ? 13 : 0; i < (this.viewMode == ViewMode.SINGLE_ITEM ? 14 : 36); i++) {
|
for (int i = this.viewMode == ViewMode.SINGLE_ITEM ? 13 : 0; i < (this.viewMode == ViewMode.SINGLE_ITEM ? 14 : 36); i++) {
|
||||||
final ItemStack item = getItem(i);
|
final ItemStack item = getItem(i);
|
||||||
|
Loading…
Reference in New Issue
Block a user