From ddc1706c3c9b32554fe356be3325f176ec6df4d9 Mon Sep 17 00:00:00 2001
From: 7sat <49030779+7sat@users.noreply.github.com>
Date: Fri, 1 Apr 2022 19:42:53 +0900
Subject: [PATCH] null check
---
pom.xml | 2 +-
src/main/java/me/sat7/dynamicshop/utilities/ShopUtil.java | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 21af921..2fd976b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
me.sat7
DynamicShop
- 3.6.3
+ 3.6.4
jar
DynamicShop
diff --git a/src/main/java/me/sat7/dynamicshop/utilities/ShopUtil.java b/src/main/java/me/sat7/dynamicshop/utilities/ShopUtil.java
index eb2de88..bce2c1b 100644
--- a/src/main/java/me/sat7/dynamicshop/utilities/ShopUtil.java
+++ b/src/main/java/me/sat7/dynamicshop/utilities/ShopUtil.java
@@ -929,7 +929,12 @@ public static int StockStabilizing(Boolean isLegacyMode, Random generator,int st
public static boolean CheckShopHour(String shopName, Player player)
{
CustomConfig shopData = ShopUtil.shopConfigFiles.get(shopName);
+ if (shopData == null)
+ return true;
+
ConfigurationSection shopConf = shopData.get().getConfigurationSection("Options");
+ if (shopConf == null)
+ return true;
if (shopConf.contains("shophours"))
{