From 6ce0911a1660df4c938260e3fb6c300c471af624 Mon Sep 17 00:00:00 2001 From: Jeroen <48769316+iTwins@users.noreply.github.com> Date: Tue, 5 Dec 2023 22:54:50 +0100 Subject: [PATCH] Add config option for radiation (#3988) --- .../thebusybiscuit/slimefun4/implementation/Slimefun.java | 6 +++++- src/main/resources/config.yml | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/Slimefun.java b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/Slimefun.java index 2b8dd78f02..e8c7b460a1 100644 --- a/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/Slimefun.java +++ b/src/main/java/io/github/thebusybiscuit/slimefun4/implementation/Slimefun.java @@ -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 diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index c77b5463b8..ece2aa3410 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -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