Skip to content

Commit e65a96e

Browse files
committed
update reload command to load config for existing spawners
1 parent 3831441 commit e65a96e

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

core/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jar {
4444
from { project(':NMS:v1_21_4').sourceSets.main.output }
4545
from { project(':NMS:v1_21_6').sourceSets.main.output }
4646

47-
// destinationDirectory = file('C:\\Users\\ADMIN\\OneDrive\\Desktop\\Paper\\plugins\\')
47+
// destinationDirectory = file('C:\\Users\\ADMIN\\OneDrive\\Desktop\\Paper1_21_6\\plugins\\')
4848
from sourceSets.main.output
4949

5050
duplicatesStrategy = DuplicatesStrategy.EXCLUDE

core/src/main/java/github/nighter/smartspawner/commands/reload/ReloadSubCommand.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ private void reloadSpawnerLootConfigs() {
101101
List<SpawnerData> allSpawners = plugin.getSpawnerManager().getAllSpawners();
102102
for (SpawnerData spawner : allSpawners) {
103103
try {
104+
spawner.loadConfigurationValues();
104105
spawner.reloadLootConfig();
105106
} catch (Exception e) {
106107
plugin.getLogger().warning("Failed to reload loot config for spawner " +

core/src/main/java/github/nighter/smartspawner/spawner/properties/SpawnerData.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ private void initializeDefaults() {
122122
this.lastSpawnTime = System.currentTimeMillis();
123123
}
124124

125-
private void loadConfigurationValues() {
125+
public void loadConfigurationValues() {
126126
int baseMaxStoredExp = plugin.getConfig().getInt("spawner_properties.default.max_stored_exp", 1000);
127127
int baseMinMobs = plugin.getConfig().getInt("spawner_properties.default.min_mobs", 1);
128128
int baseMaxMobs = plugin.getConfig().getInt("spawner_properties.default.max_mobs", 4);

0 commit comments

Comments
 (0)