From c81e558d4c891be37c5237e92901ee43ff7dadc5 Mon Sep 17 00:00:00 2001 From: Tomachi <8929706+book000@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:00:07 +0900 Subject: [PATCH] =?UTF-8?q?fix(DailyOnlineTime):=20#916=20Map=E3=81=AB?= =?UTF-8?q?=E5=AF=BE=E8=B1=A1=E3=81=AEUUID=E3=82=AD=E3=83=BC=E3=81=8C?= =?UTF-8?q?=E3=81=AA=E3=81=84=E5=A0=B4=E5=90=88=E3=81=AB=E3=82=A8=E3=83=A9?= =?UTF-8?q?=E3=83=BC=E3=81=8C=E5=87=BA=E3=82=8B=E4=B8=8D=E5=85=B7=E5=90=88?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=20(#919)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jaoafa/mymaid4/event/Event_DailyOnlineTime.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/jaoafa/mymaid4/event/Event_DailyOnlineTime.java b/src/main/java/com/jaoafa/mymaid4/event/Event_DailyOnlineTime.java index 7fe41ba4b..89ce9f9d0 100644 --- a/src/main/java/com/jaoafa/mymaid4/event/Event_DailyOnlineTime.java +++ b/src/main/java/com/jaoafa/mymaid4/event/Event_DailyOnlineTime.java @@ -78,6 +78,10 @@ void recordDailyOnlineTime(Player player) { } UUID uuid = player.getUniqueId(); + if (!this.onlineTime.containsKey(uuid)) { + return; + } + long time = System.currentTimeMillis(); long loginTime = this.onlineTime.get(uuid); long diffSec = (time - loginTime) / 1000L;