[BUG] /jobsadmin reload won't whitelist blocks that are not a part of any existing whitelists
RphCos opened this issue ยท 2 comments
Describe the bug
/jobsadmin reload won't whitelist blocks that are not a part of any existing whitelists.
Let's say you want to create a farmer job, of type "break" with a whitelist on wheat (or its crop block id which is 59).
As wheat is not part of any existing whitelist (e.g. the miner, digger or wood cutter whitelist), change will only be applied after a reboot. But you could add "dirt" to the whitelist, and as it is in an other job's whitelist, it will work for dirt.
I believe it is a bug and not intended behavior since after a reload, all the others aspect of the job config are indeed reloaded (name, gui, salary, work message)
To Reproduce
The easiest way to reproduce this bug is to try to add the SPRUCE_LOG and SPRUCE_WOOD to the woodcutter whitelist which is missing from the latest release default jobs.
- Add "SPRUCE_LOG","SPRUCE_WOOD","DIRT" in the whitelist of the woodcutter job
- Reload the plugin with jobsadmin reload from the server CLI
- Now Dirt blocks will count for job progression while Spruce_Log still won't.
Expected behavior
Either a reload should add whitelists too, or it should be clear that we should restart the server for any change of whitelist for a job.
Software Details:
- Server Software: Paper
- Server Software Version: git-pPaper-187(MC: 1.18.1)
- Plugin Version v1.0-beta-5
- Java Version: Java 17 (Java HotSpot(TM) 64-Bit Server VM 17.0.2+8-LTS-86)