loot tracker: add remember loot option

This commit is contained in:
Adam
2022-03-15 18:24:01 -04:00
parent e953631a08
commit 4f8991dc7e
2 changed files with 15 additions and 1 deletions

View File

@@ -81,6 +81,16 @@ public interface LootTrackerConfig extends Config
return false;
}
@ConfigItem(
keyName = "syncPanel",
name = "Remember loot",
description = "Saves loot between client sessions"
)
default boolean syncPanel()
{
return true;
}
@ConfigItem(
keyName = "ignoredEvents",
name = "Ignored Loot Sources",

View File

@@ -414,7 +414,6 @@ public class LootTrackerPlugin extends Plugin
return;
}
log.debug("Profile changed to {}", profileKey);
switchProfile(profileKey);
}
@@ -429,6 +428,11 @@ public class LootTrackerPlugin extends Plugin
log.debug("Switched to profile {}", profileKey);
if (!config.syncPanel())
{
return;
}
int drops = 0;
List<ConfigLoot> loots = new ArrayList<>();
Instant old = Instant.now().minus(MAX_AGE);