Skip to content

Commit

Permalink
Add config option for radiation (#3988)
Browse files Browse the repository at this point in the history
  • Loading branch information
iTwins authored Dec 5, 2023
1 parent dc82173 commit 6ce0911
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,13 @@ private void onPluginStart() {
// Armor Update Task
if (config.getBoolean("options.enable-armor-effects")) {
new SlimefunArmorTask().schedule(this, config.getInt("options.armor-update-interval") * 20L);
new RadiationTask().schedule(this, config.getInt("options.radiation-update-interval") * 20L);
if (config.getBoolean("options.enable-radiation")) {
new RadiationTask().schedule(this, config.getInt("options.radiation-update-interval") * 20L);
}
new RainbowArmorTask().schedule(this, config.getInt("options.rainbow-armor-update-interval") * 20L);
new SolarHelmetTask().schedule(this, config.getInt("options.armor-update-interval"));
} else if (config.getBoolean("options.enable-radiation")) {
logger.log(Level.WARNING, "Cannot enable radiation while armor effects are disabled.");
}

// Starting our tasks
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ options:
chat-prefix: '&a&lSlimefun 4&7> '
armor-update-interval: 10
enable-armor-effects: true
enable-radiation: true
radiation-update-interval: 1
radiation-grace-period: 15
rainbow-armor-update-interval: 3
Expand Down

0 comments on commit 6ce0911

Please sign in to comment.