Zrips / Jobs

Jobs
Apache License 2.0
172 stars 213 forks source link

Explorer job not remembering explored chunks after restart. #1329

Closed Momshroom closed 2 years ago

Momshroom commented 2 years ago

*Detailed description of the issue: Explored chunks are not getting saved to the database on restart so every restart all chunks count as unexplored and give full explorer job xp and money.

The exploreData table looks like this:
https://prnt.sc/21fbu81

Shutdown log showing Jobs saying it is saving explorer entries:

[10:47:40] [Server thread/INFO]: [Jobs] Disabling Jobs v5.0.1.0
[10:47:40] [Server thread/INFO]: ------------- Jobs -------------
[10:47:41] [Server thread/INFO]: [Jobs] Saved 6 new explorer entries.
[10:47:41] [Server thread/INFO]: [Jobs] Updated 30 explorer entries.
[10:47:41] [Jobs-DatabaseSaveTask/INFO]: Database save task shutdown!
[10:47:41] [Jobs-BufferedPaymentThread/INFO]: Buffered payment thread shutdown.
[10:47:41] [Server thread/INFO]: ------------------------------------

Startup log showing the explorer db is loading:

[20:14:39] [Server thread/INFO]: ------------- Jobs -------------
[20:14:39] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: jobsr
[20:14:39] [Server thread/INFO]: PlaceholderAPI hooked.
[20:14:39] [Server thread/INFO]: Connected to database (SqLite)
[20:14:39] [Server thread/INFO]: Loaded 8 titles
[20:14:39] [Server thread/INFO]: Loaded 19 protected blocks timers
[20:14:40] [Server thread/INFO]: Loaded 1228 custom item names
[20:14:40] [Server thread/INFO]: Loaded 75 custom entity names
[20:14:40] [Server thread/INFO]: Loaded 2 custom MythicMobs names
[20:14:40] [Server thread/INFO]: Loaded 38 custom enchant names
[20:14:40] [Server thread/INFO]: Loaded 16 custom color names
[20:14:40] [Server thread/INFO]: Loaded 25 shop items
[20:14:40] [Server thread/INFO]: Loaded 10 quests for Builder
[20:14:40] [Server thread/INFO]: Loaded 1 quests for Farmer
[20:14:40] [Server thread/INFO]: Loaded 7 quests for Miner
[20:14:40] [Server thread/INFO]: Loaded 10 jobs
[20:14:40] [Server thread/INFO]: Loaded 0 boosted items
[20:14:40] [Server thread/INFO]: Loaded 1554 furnace for reassigning.
[20:14:40] [Server thread/INFO]: Loaded 233 brewing for reassigning.
[20:14:40] [Jobs-DatabaseSaveTask/INFO]: Started database save task.
[20:14:40] [Jobs-BufferedPaymentThread/INFO]: Started buffered payment thread.
[20:14:40] [Server thread/INFO]: [Jobs] Loaded 15 schedulers!
[20:14:40] [Server thread/INFO]: Preloaded 693 players data in 0.02
[20:14:40] [Server thread/INFO]: [Jobs] mcMMO2.1.205 was found - Enabling capabilities.
[20:14:40] [Server thread/INFO]: [Jobs] Registered McMMO 2.x listener
[20:14:40] [Server thread/INFO]: [Jobs] WorldGuard detected.
[20:14:40] [Server thread/INFO]: [Jobs] MythicMobs detected.
[20:14:40] [Server thread/INFO]: [Jobs] MythicMobs was found - Enabling capabilities.
[20:14:40] [Server thread/INFO]: [Jobs] Loaded 1 block protection entries. 1ms
[20:14:40] [Server thread/INFO]: Loading explorer data
[20:14:40] [Server thread/INFO]: Loaded explorer data (31120)
[20:14:40] [Server thread/INFO]: Plugin has been enabled successfully.
[20:14:40] [Server thread/INFO]: ------------------------------------```

---

**CONFIG SECTION (DELETE IF NOT RELEVANT):**

Explore:

By setting this to true when there is max amount of players explored a chunk then it will be marked as fully explored and exact players who explored it will not be saved to save some memory

Compact: true

enable-pay-for-exploring-when-flying: true

Option to allow payment to be made for exploring when player gliding.

enable-pay-for-exploring-when-gliding: true

Disables the payment when the player riding on an entity.

disablePaymentIfRiding: false


explorer.yml:
https://paste.gg/p/Momshroom/cb8a0051d81646248980aa23bd6cb680)
---

**Jobs version:** 
It happens on both 5.0.0.9 and 5.0.1.0

**Server Type (Spigot/Paper/etc):** 
Paper

**Server Version (using `/ver`):** 
Paper version git-Paper-381 (MC: 1.17.1)
Zrips commented 2 years ago

Should be resolved with latest builds