Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,9 @@ public void setWidgetsOnSlotTimers() {
return;
}

if (accountData.getSlotTimers().size() < 8) {
return;
}
for (int slotIndex = 0; slotIndex < 8; slotIndex++) {
SlotActivityTimer timer = accountData.getSlotTimers().get(slotIndex);
if (timer == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ public Optional<OfferEvent> screenOfferEvent(OfferEvent newOfferEvent) {

Map<Integer, OfferEvent> lastOfferEventForEachSlot = plugin.getDataHandler().getAccountData(plugin.getCurrentlyLoggedInAccount()).getLastOffers();
List<SlotActivityTimer> slotActivityTimers = plugin.getDataHandler().getAccountData(plugin.getCurrentlyLoggedInAccount()).getSlotTimers();
if (slotActivityTimers == null || slotActivityTimers.size() < 8) {
log.warn("slotActivityTimers is missing or undersized ({}), skipping offer screening",
slotActivityTimers == null ? "null" : slotActivityTimers.size());
return Optional.empty();
}
OfferEvent lastOfferEvent = lastOfferEventForEachSlot.get(newOfferEvent.getSlot());

//completely useless updates
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/flippingutilities/model/AccountData.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ private void hydrateRecipeFlipGroups(FlippingPlugin plugin) {
}

private void hydrateSlotTimers(FlippingPlugin plugin) {
if (slotTimers == null) {
if (slotTimers == null || slotTimers.size() != 8) {
slotTimers = setupSlotTimers(plugin);
} else {
slotTimers.forEach(timer -> {
Expand Down