Skip to content

Commit e3d2eb5

Browse files
committed
feat: add auto-sell and XP claim feature on spawner break, enhance configuration loading
1 parent 40c929d commit e3d2eb5

7 files changed

Lines changed: 202 additions & 135 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,3 @@ local.properties
8080
*.log
8181
javac.*.args
8282
*.backup
83-
LOCK_STRATEGY.md

AGENTS.md

Lines changed: 0 additions & 90 deletions
This file was deleted.

core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ tasks.shadowJar {
9999
exclude("org/slf4j/**")
100100
mergeServiceFiles()
101101

102-
// destinationDirectory.set(file("C:\\Users\\USER\\Desktop\\26_2_TestServer\\plugins"))
102+
// destinationDirectory.set(file("C:\\Users\\USER\\Desktop\\TestServer\\plugins"))
103103
}
104104

105105
tasks.build {

core/src/main/java/github/nighter/smartspawner/SmartSpawner.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,9 @@ public void reload() {
514514
// reload services
515515
integrationManager.reload();
516516
spawnerMenuAction.reload();
517+
if (spawnerBreakListener != null) {
518+
spawnerBreakListener.loadConfig();
519+
}
517520
timeFormatter.clearCache();
518521

519522
// Reload spawner settings config (includes mob heads and loot)

core/src/main/java/github/nighter/smartspawner/spawner/gui/stacker/SpawnerStackerHandler.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,12 @@ private void handleAddAll(Player player, SpawnerData spawner) {
481481
return;
482482
}
483483

484+
if (scanResult.availableSpawners == 0) {
485+
messageService.sendMessage(player, "spawner_insufficient_quantity",
486+
Map.of("amountChange", "1", "amountAvailable", "0"));
487+
return;
488+
}
489+
484490
int actualChange = Math.min(spaceLeft, scanResult.availableSpawners);
485491

486492
if (SpawnerStackEvent.getHandlerList().getRegisteredListeners().length != 0) {

0 commit comments

Comments
 (0)