From b9f26aa0c729fc1fe0864991366f10df3ab4945c Mon Sep 17 00:00:00 2001 From: Genny Date: Thu, 11 Jun 2020 16:23:27 -0500 Subject: Check for only thunder with cover all case --- src/main/java/dev/genbyte/sunfright/Damager.java | 10 ++++------ src/main/java/dev/genbyte/sunfright/Sunfright.java | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/dev/genbyte/sunfright/Damager.java b/src/main/java/dev/genbyte/sunfright/Damager.java index 28420d4..c84de86 100644 --- a/src/main/java/dev/genbyte/sunfright/Damager.java +++ b/src/main/java/dev/genbyte/sunfright/Damager.java @@ -40,15 +40,11 @@ public class Damager extends BukkitRunnable { long time = sunnedWorld.getTime(); boolean storming = sunnedWorld.hasStorm(); boolean thundering = sunnedWorld.isThundering(); - + // Times are pulled from Minecraft Gamepedia page on Light, specifically the internal light // level section. https://minecraft.gamepedia.com/Light // Times correspond to when the light level is over 8. - if (!storming && !thundering) { - if (time >= 13027 && time <= 22973) { - return false; - } - } else if (storming && !thundering) { + if (storming && !thundering) { if (time >= 12734 && time <= 23266) { return false; } @@ -56,6 +52,8 @@ public class Damager extends BukkitRunnable { if (time >= 12300 && time <= 23700) { return false; } + } else if (time >= 13027 && time <= 22973) { + return false; } return true; } diff --git a/src/main/java/dev/genbyte/sunfright/Sunfright.java b/src/main/java/dev/genbyte/sunfright/Sunfright.java index 051ac13..6404360 100644 --- a/src/main/java/dev/genbyte/sunfright/Sunfright.java +++ b/src/main/java/dev/genbyte/sunfright/Sunfright.java @@ -1,7 +1,6 @@ package dev.genbyte.sunfright; import java.util.logging.Level; -import java.util.logging.Logger; import org.bukkit.World; import org.bukkit.plugin.java.JavaPlugin; -- cgit 1.4.1-3-g733a5