From bdac5573904cbfd7200f92f0cba4dca442305f40 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Thu, 1 Apr 2021 00:08:26 +0200 Subject: [PATCH 1/3] =?UTF-8?q?Fixing=20April=C3=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java index d01d75d..ab53db7 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java @@ -42,6 +42,8 @@ import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; +import java.time.Instant; +import java.time.temporal.ChronoField; import java.util.Date; import java.util.logging.Level; @@ -146,7 +148,7 @@ public class FightSystem extends JavaPlugin { Fight.getBlueTeam().setSchem(Schematic.getSchemFromDB(Config.PrepareSchemID)); } - ISAPRIL = new Date().getDay() == 1 && new Date().getMonth() == 4; + ISAPRIL = Instant.now().get(ChronoField.DAY_OF_MONTH) == 1 && Instant.now().get(ChronoField.MONTH_OF_YEAR) == 4; } @Override From 30fc66b19e13be9aa8818f80f99a89311ce26727 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Thu, 1 Apr 2021 00:08:48 +0200 Subject: [PATCH 2/3] =?UTF-8?q?Fixing=20April=C3=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../de/steamwar/fightsystem/listener/DenyWorldInteraction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java b/FightSystem_Main/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java index a75990b..dcbfde4 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/listener/DenyWorldInteraction.java @@ -94,7 +94,7 @@ public class DenyWorldInteraction implements Listener { } } - @EventHandler() + @EventHandler public void onPlayerJoin(PlayerJoinEvent event) { if(FightSystem.ISAPRIL) { PacketContainer demo = ProtocolLibrary.getProtocolManager().createPacket(PacketType.Play.Server.GAME_STATE_CHANGE); From 29e9a56f1f7c3e20a1a458d7cfd821fb92265ec0 Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Thu, 1 Apr 2021 00:11:31 +0200 Subject: [PATCH 3/3] =?UTF-8?q?Fixing=20April=C3=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java | 1 - 1 file changed, 1 deletion(-) diff --git a/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java b/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java index ab53db7..c64fbf7 100644 --- a/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java +++ b/FightSystem_Main/src/de/steamwar/fightsystem/FightSystem.java @@ -44,7 +44,6 @@ import org.bukkit.plugin.java.JavaPlugin; import java.time.Instant; import java.time.temporal.ChronoField; -import java.util.Date; import java.util.logging.Level; public class FightSystem extends JavaPlugin {