Ghost-chu / QuickShop-Reremake

QuickShop is a shop plugin that allows players to easily sell/buy any items from a chest without any commands. In fact, none of the commands that QuickShop provides are ever needed by a player.
GNU General Public License v3.0
103 stars 147 forks source link

Some of shops cannot be loaded at startup #1518

Closed RuofengX closed 2 years ago

RuofengX commented 2 years ago

Some of shops cannot be loaded at startup in some unknow cases. It happened sereval times, but not every time. Here is full log. I am using PaperMC1.16 and QuickShop v4.0.9.2.

[08:37:03] [Server thread/INFO]: [QuickShop] Enabling QuickShop v4.0.9.2
[08:37:03] [Server thread/INFO]: [QuickShop] QuickShop Reremake
[08:37:03] [Server thread/INFO]: [QuickShop] Starting plugin self-test, please wait...
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] Signature Verify
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] EnvChecker SelfTest
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] Java Runtime Environment Version Test
[08:37:03] [Server thread/INFO]: [QuickShop] Running QuickShop-Reremake on NMS version v1_16_R3 For Minecraft version 1.16.5
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] Spigot Based Server Test
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] Old QuickShop Test
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] ModdedServer Based Test
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] CoreSupport Test
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] Virtual DisplayItem Support Test
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] PersistentStorageApi Support Test
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] GameVersion supporting Test
[08:37:03] [Server thread/INFO]: [QuickShop] [OK] PacketListenerAPI Conflict Test
[08:37:03] [Server thread/INFO]: [QuickShop] Reading the configuration...
[08:37:03] [Server thread/INFO]: [QuickShop] Loading plugin translations files...
[08:37:03] [Server thread/INFO]: [QuickShop] Developers: PotatoCraft Studio, Netherfoam, Timtower, KaiNoMood, Ghost_chu, Mgazul, TiaraRinne, sandtechnology, Starmism, Chris6ix
[08:37:03] [Server thread/INFO]: [QuickShop] Original author: Netherfoam, Timtower, KaiNoMood
[08:37:03] [Server thread/INFO]: [QuickShop] Let's start loading the plugin
[08:37:03] [Server thread/INFO]: [QuickShop] Chat processor selected: BUNGEECHAT
[08:37:03] [Server thread/INFO]: [QuickShop] Loading plugin translations files...
[08:37:04] [Server thread/INFO]: [QuickShop] Loading items translations...
[08:37:04] [Server thread/INFO]: [QuickShop] Loading enchantments translations...
[08:37:04] [Server thread/INFO]: [QuickShop] Loading potions translations...
[08:37:04] [Server thread/INFO]: [QuickShop] Successfully loaded OpenInv support!
[08:37:04] [Server thread/INFO]: [QuickShop] Successfully loaded PlaceHolderAPI support!
[08:37:04] [Server thread/INFO]: [QuickShop] Setting up database...
[08:37:04] [Server thread/INFO]: [QuickShop] Selected permission provider: Bukkit
[08:37:04] [Server thread/INFO]: [QuickShop] Registering commands...
[08:37:04] [Server thread/INFO]: [QuickShop] EventManager selected: BukkitEventManager
[08:37:04] [Server thread/INFO]: [QuickShop] Loading shops from the database...
[08:37:04] [Server thread/INFO]: [QuickShop] Used 1ms to fetch all shops from the database.
[08:37:04] [Server thread/WARN]: [QuickShop] ##########FAILED TO LOAD SHOP##########
[08:37:04] [Server thread/WARN]: [QuickShop]   >> Error Info:
[08:37:04] [Server thread/WARN]: [QuickShop] Cannot invoke "java.lang.Double.doubleValue()" because the return value of "java.util.Map.get(Object)" is null
[08:37:04] [Server thread/WARN]: [QuickShop]   >> Error Trace
[08:37:04] [Server thread/WARN]: java.lang.NullPointerException: Cannot invoke "java.lang.Double.doubleValue()" because the return value of "java.util.Map.get(Object)" is null
[08:37:04] [Server thread/WARN]:        at org.maxgamer.quickshop.shop.ShopLoader.calcTimeCost(ShopLoader.java:195)
[08:37:04] [Server thread/WARN]:        at org.maxgamer.quickshop.shop.ShopLoader.loadShops(ShopLoader.java:124)
[08:37:04] [Server thread/WARN]:        at org.maxgamer.quickshop.shop.ShopLoader.loadShops(ShopLoader.java:77)
[08:37:04] [Server thread/WARN]:        at org.maxgamer.quickshop.QuickShop.onEnable(QuickShop.java:871)
[08:37:04] [Server thread/WARN]:        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[08:37:04] [Server thread/WARN]:        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370)
[08:37:04] [Server thread/WARN]:        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500)
[08:37:04] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:518)
[08:37:04] [Server thread/WARN]:        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:432)
[08:37:04] [Server thread/WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:594)
[08:37:04] [Server thread/WARN]:        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:298)
[08:37:04] [Server thread/WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1069)
[08:37:04] [Server thread/WARN]:        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291)
[08:37:04] [Server thread/WARN]:        at java.base/java.lang.Thread.run(Thread.java:831)
[08:37:04] [Server thread/WARN]: [QuickShop]   >> Target Location Info
[08:37:04] [Server thread/WARN]: [QuickShop] Location: NULL
[08:37:04] [Server thread/WARN]: [QuickShop] Block: NULL
[08:37:04] [Server thread/WARN]: [QuickShop] #######################################
[08:37:04] [Server thread/INFO]: [QuickShop] Registering listeners...
[08:37:04] [Server thread/INFO]: [QuickShop] Registering DisplayCheck task....
[08:37:04] [Server thread/INFO]: [QuickShop] Cleaning MsgUtils...
[08:37:04] [Server thread/INFO]: [QuickShop] Cleaning purchase messages from the database that are over a week old...
[08:37:04] [Server thread/INFO]: [QuickShop] Log actions is enabled, actions will log in the qs.log file!
[08:37:04] [Server thread/INFO]: [QuickShop] QuickShop Loaded! 928 ms.
[08:37:04] [Server thread/INFO]: [Multiverse-Core] Enabling Multiverse-Core v4.3.0-b846
[08:37:04] [Server thread/WARN]: [Multiverse-Core] "Multiverse-Core v4.3.0-b846" has registered a listener for org.bukkit.event.entity.EntityCreatePortalEvent on method "public void com.onarandombox.MultiverseCore.listeners.MVPortalListener.entityPortalCreate(org.bukkit.event.entity.EntityCreatePortalEvent)", but the event is Deprecated. "Server performance will be affected"; please notify the authors [dumptruckman, Rigby, fernferret, lithium3141, main--].
[08:37:04] [Server thread/INFO]: [Multiverse-Core] We are aware of the warning about the deprecated event. There is no alternative that allows us to do what we need to do and performance impact is negligible. It is safe to ignore.
[08:37:04] [Server thread/INFO]: Preparing start region for dimension minecraft:earth_nether
[08:37:05] [Server thread/INFO]: Preparing spawn area: 0%
[08:37:05] [Dynmap Render Thread/INFO]: [dynmap] Finish marker initialization
[08:37:05] [Server thread/INFO]: Preparing spawn area: 49%
[08:37:05] [Server thread/INFO]: Time elapsed: 637 ms
[08:37:05] [Server thread/INFO]: [dynmap] Loaded 0 maps of world 'earth_nether'.
[08:37:05] [Server thread/INFO]: [QuickShop] Loading shops from the database...
[08:37:05] [Server thread/INFO]: [QuickShop] Used 0ms to fetch all shops from the database.
[08:37:05] [Server thread/INFO]: [QuickShop] Successfully loaded 304 shops! (Used 3ms, Avg 0ms per shop)
[08:37:05] [Server thread/INFO]: [QuickShop] 0 shops will load after chunk have loaded, 0 shops will load after the world has loaded.
[08:37:05] [Server thread/INFO]: Preparing start region for dimension minecraft:transhub
[08:37:05] [Server thread/INFO]: Preparing spawn area: 0%
[08:37:05] [Server thread/INFO]: Time elapsed: 96 ms
[08:37:05] [Server thread/INFO]: [dynmap] Loaded 0 maps of world 'transhub'.
[08:37:05] [Server thread/INFO]: [QuickShop] Loading shops from the database...
[08:37:05] [Server thread/INFO]: [QuickShop] Used 0ms to fetch all shops from the database.
[08:37:05] [Server thread/INFO]: [QuickShop] Successfully loaded 497 shops! (Used 4ms, Avg 0ms per shop)
[08:37:05] [Server thread/INFO]: [QuickShop] 0 shops will load after chunk have loaded, 0 shops will load after the world has loaded.
[08:37:05] [Server thread/INFO]: Preparing start region for dimension minecraft:earth
[08:37:05] [Server thread/INFO]: Preparing spawn area: 0%
[08:37:06] [Server thread/INFO]: Preparing spawn area: 64%
[08:37:06] [Server thread/INFO]: Time elapsed: 758 ms
[08:37:06] [Server thread/INFO]: [dynmap] Loaded 3 maps of world 'earth'.
[08:37:06] [Server thread/INFO]: [QuickShop] Loading shops from the database...
[08:37:06] [Server thread/INFO]: [QuickShop] Used 0ms to fetch all shops from the database.
[08:37:06] [Server thread/INFO]: [QuickShop] Successfully loaded 690 shops! (Used 3ms, Avg 0ms per shop)
[08:37:06] [Server thread/INFO]: [QuickShop] 0 shops will load after chunk have loaded, 0 shops will load after the world has loaded.
sandtechnology commented 2 years ago

Please updated to the latest version, it has been fixed