Comments (20)
Might have time this weekend. We'll see
from headsweeper.
Confirmed fixed in release 1.7.2. Thanks.
from headsweeper.
I am working around this, temporarily, by
- Delete plugins/HeadSweeper/sweeperGames.json
- Create sweeper instance by command
on server start-up.
from headsweeper.
I do love the new null pointer exception messages :D
Did you change any world names per chance? And what were the contents of that json file when the issue happened?
from headsweeper.
I did not change world name. Besides, the JSON file uses world UUID, not world name.
{"sweeperGames":[{"x":-468,"y":64,"z":-20,"game":{"knownField":{"tiles":[[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2]],"width":8,"height":8},"hiddenField":{"tiles":[[1,2,2,1,2,-1,2,0],[2,-1,-1,1,2,-1,3,1],[-1,4,4,2,2,2,4,-1],[3,-1,4,-1,2,3,-1,-1],[2,-1,-1,4,-1,3,-1,3],[1,3,-1,3,2,3,2,1],[0,1,1,1,1,-1,1,0],[0,0,0,0,1,1,1,0]],"width":8,"height":8},"width":8,"height":8,"totalBombCount":16,"lost":false,"won":false},"world":"8506768f-0337-475a-957e-1e77da01425f"}]}
For reference
>mv info city
[13:20:49] [Server thread/INFO]: --- General Info ---
[13:20:49] [Server thread/INFO]: World Name: world_city
[13:20:49] [Server thread/INFO]: World UID: 8506768f-0337-475a-957e-1e77da01425f
from headsweeper.
Any progress on this issue?
from headsweeper.
I haven't been able to reproduce the issue.
from headsweeper.
What do you need from me? The issue persists with updated/current versions of the relevant components.
Paper 1.19-60
HeadsPluginAPI 3.0.3
HeadSweeper 1.7.1
HeadsInventory 1.11.0
As before, on server start-up
[06:08:48] [Server thread/INFO]: [HeadsPluginAPI] Loading HeadsPluginAPI v3.0.3
[06:08:48] [Server thread/INFO]: [HeadSweeper] Loading HeadSweeper v1.7.1
[06:08:48] [Server thread/INFO]: [HeadsInventory] Loading HeadsInventory v1.11.0
[06:09:13] [Server thread/INFO]: [HeadsPluginAPI] Enabling HeadsPluginAPI v3.0.3
[06:09:18] [Server thread/INFO]: [com.github.cc007.headsplugin.business.services.heads.CategoryUpdaterImpl] All categories updates are now scheduled (asynchronously).
[06:09:18] [Server thread/INFO]: [HeadSweeper] Enabling HeadSweeper v1.7.1
[06:09:18] [Server thread/INFO]: [HeadSweeper] Check if data folder exists...
[06:09:18] [Server thread/INFO]: [HeadSweeper] Data folder already exists
[06:09:18] [Server thread/INFO]: [HeadSweeper] Initializing minesweeper heads...
[06:09:19] [Server thread/INFO]: [com.github.cc007.headsplugin.business.services.heads.HeadSearcherImpl] Use cached heads for: Minesweeper
[06:09:19] [Server thread/INFO]: [com.github.cc007.headsplugin.business.services.ProfilerImpl] Heads for Minesweeper found in 0.494s.
[06:09:19] [Server thread/INFO]: [com.github.cc007.headsplugin.business.services.heads.HeadSearcherImpl] Use cached heads for: TNT
[06:09:19] [Server thread/INFO]: [com.github.cc007.headsplugin.business.services.ProfilerImpl] Heads for TNT found in 0.081s.
[06:09:19] [Server thread/INFO]: [HeadSweeper] Sweeperheads initialized
[06:09:19] [Server thread/INFO]: [HeadSweeper] Loading games...
[06:09:19] [Server thread/INFO]: [HeadSweeper] Create controller...
[06:09:19] [Server thread/ERROR]: Error occurred while enabling HeadSweeper v1.7.1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.World.getBlockAt(int, int, int)" because the return value of "com.github.cc007.headsweeper.controller.HeadSweeperGame.getWorld()" is null
at com.github.cc007.headsweeper.controller.HeadSweeperGame.initMetaData(HeadSweeperGame.java:254) ~[HeadSweeper-1.7.1.jar:?]
at com.github.cc007.headsweeper.controller.HeadSweeperGame.<init>(HeadSweeperGame.java:90) ~[HeadSweeper-1.7.1.jar:?]
at com.github.cc007.headsweeper.controller.HeadSweeperController.<init>(HeadSweeperController.java:59) ~[HeadSweeper-1.7.1.jar:?]
at com.github.cc007.headsweeper.HeadSweeper.loadGames(HeadSweeper.java:213) ~[HeadSweeper-1.7.1.jar:?]
at com.github.cc007.headsweeper.HeadSweeper.onEnable(HeadSweeper.java:89) ~[HeadSweeper-1.7.1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:536) ~[paper-api-1.19-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:563) ~[paper-1.19.jar:git-Paper-60]
at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:477) ~[paper-1.19.jar:git-Paper-60]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:633) ~[paper-1.19.jar:git-Paper-60]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:419) ~[paper-1.19.jar:git-Paper-60]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:306) ~[paper-1.19.jar:git-Paper-60]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1121) ~[paper-1.19.jar:git-Paper-60]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:302) ~[paper-1.19.jar:git-Paper-60]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
[06:09:19] [Server thread/INFO]: [HeadSweeper] Disabling HeadSweeper v1.7.1
After the failure, plugins/HeadSweeper/sweeperGames.json
contains
{"sweeperGames":[{"x":-468,"y":64,"z":-20,"game":{"knownField":{"tiles":[[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2],[-2,-2,-2,-2,-2,-2,-2,-2]],"width":8,"height":8},"hiddenField":{"tiles":[[-1,1,0,0,0,0,1,-1],[1,1,0,0,0,0,2,2],[1,1,0,0,0,1,2,-1],[-1,1,0,0,0,1,-1,2],[2,2,0,0,1,2,2,1],[-1,2,2,1,2,-1,1,0],[2,-1,3,-1,3,3,3,2],[1,2,-1,3,-1,2,-1,-1]],"width":8,"height":8},"width":8,"height":8,"totalBombCount":13,"lost":false,"won":false},"world":"8506768f-0337-475a-957e-1e77da01425f"}]}
The world_city
UUID is verified correct.
from headsweeper.
The issue is that at the point of game creation, world_city
has not yet been loaded. Your server probably does not have so many worlds (my servers have 18 worlds), so the timing is different. In addition, world_city
is created by CityWorld
, so it may be loaded later than expected, although it is not the last world loaded. Since load
is not specified in plugin.yml
, HeadSweeper should load after the worlds, but clearly it does not. In fact, only world
, world_nether
, and world_the_end
were loaded when HeadsSweeper attempted to create the game in world_city
, which was loaded 90 seconds after the attempt was made. In the event
[07:50:44] [Server thread/INFO]: [HeadSweeper] Enabling HeadSweeper v1.7.1
[07:50:44] [Server thread/INFO]: [HeadSweeper] Check if data folder exists...
[07:50:44] [Server thread/INFO]: [HeadSweeper] Data folder already exists
[07:50:44] [Server thread/INFO]: [HeadSweeper] Initializing minesweeper heads...
[07:50:45] [Server thread/INFO]: [com.github.cc007.headsplugin.business.services.heads.HeadSearcherImpl] Use cached heads for: Minesweeper
[07:50:45] [Server thread/INFO]: [com.github.cc007.headsplugin.business.services.ProfilerImpl] Heads for Minesweeper found in 0.488s.
[07:50:45] [Server thread/INFO]: [HeadSweeper] Sweeperheads initialized
[07:50:45] [Server thread/INFO]: [HeadSweeper] Loading games...
[07:50:45] [Server thread/INFO]: [HeadSweeper] Create controller...
[07:50:45] [Server thread/ERROR]: Error occurred while enabling HeadSweeper v1.7.1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "org.bukkit.World.getBlockAt(int, int, int)" because the return value of "com.github.cc007.headsweeper.controller.HeadSweeperGame.getWorld()" is null
at com.github.cc007.headsweeper.controller.HeadSweeperGame.initMetaData(HeadSweeperGame.java:254) ~[HeadSweeper-1.7.1.jar:?]
at com.github.cc007.headsweeper.controller.HeadSweeperGame.<init>(HeadSweeperGame.java:90) ~[HeadSweeper-1.7.1.jar:?]
at com.github.cc007.headsweeper.controller.HeadSweeperController.<init>(HeadSweeperController.java:59) ~[HeadSweeper-1.7.1.jar:?]
at com.github.cc007.headsweeper.HeadSweeper.loadGames(HeadSweeper.java:213) ~[HeadSweeper-1.7.1.jar:?]
at com.github.cc007.headsweeper.HeadSweeper.onEnable(HeadSweeper.java:89) ~[HeadSweeper-1.7.1.jar:?]
[07:50:45] [Server thread/INFO]: [HeadSweeper] Disabling HeadSweeper v1.7.1
[07:50:51] [Server thread/INFO]: -------- World Settings For [world_yellowdog] --------
[07:50:51] [Server thread/INFO]: -------- World Settings For [world_blackdog_the_end] --------
[07:50:58] [Server thread/INFO]: -------- World Settings For [world_blackdog_nether] --------
[07:50:59] [Server thread/INFO]: -------- World Settings For [world_whitedog] --------
[07:51:00] [Server thread/INFO]: -------- World Settings For [world_skyblock_the_end] --------
[07:51:18] [Server thread/INFO]: -------- World Settings For [world_westeros] --------
[07:51:18] [Server thread/INFO]: -------- World Settings For [world_whitedog_nether] --------
[07:51:27] [Server thread/INFO]: -------- World Settings For [world_void] --------
[07:51:27] [Server thread/INFO]: -------- World Settings For [world_skyblock_nether] --------
[07:51:46] [Server thread/INFO]: -------- World Settings For [world_luckyblock] --------
[07:51:47] [Server thread/INFO]: -------- World Settings For [world_skyblock] --------
[07:51:56] [Server thread/INFO]: -------- World Settings For [world_yellowdog_nether] --------
[07:52:13] [Server thread/INFO]: -------- World Settings For [world_lobby] --------
[07:52:13] [Server thread/INFO]: [Minecraft.CityWorld] CityWorld creating world 'world_city'
[07:52:13] [Server thread/INFO]: -------- World Settings For [world_city] --------
[07:52:22] [Server thread/INFO]: Preparing start region for dimension minecraft:world_city
[07:52:23] [Server thread/INFO]: [Minecraft.CityWorld] CityWorld creating world 'world_city'
[07:52:23] [Server thread/INFO]: -------- World Settings For [world_blackdog] --------
from headsweeper.
Per https://hub.spigotmc.org/jira/browse/SPIGOT-7103, Spigot (and Paper) load only the default worlds. Other worlds are loaded by plugins. So HeadsSweeper needs to softdepend
on plugins that load worlds it might use, or delay sufficiently to ensure that they are loaded. Recommended addition to plugin.yml
softdepend: [Multiverse-Core, MultiWorld, CityWorld]
and maybe other world generators for worlds that might contain sweeper games.
from headsweeper.
I confirm that the above addition to plugin.yml
works correctly in my environment.
from headsweeper.
Oh sorry, I didn't read your reply correctly. I'll add that and send you a snapshot version to see if it worked.
from headsweeper.
Just to be clear, I confirmed it by unzipping the JAR file, editing plugin.yml
, then re-generating the JAR file.
from headsweeper.
New HeadsPluginAPI and HeadsInventory today. Thanks.
Is this fix going to get released?
from headsweeper.
I think that I'm going to fix it in a slightly different way, so that I don't depend on specific plugins but fix it in general. We don't want another worlds plugin to come around and ruin the day, now do we? :D
from headsweeper.
Sure.
from headsweeper.
Can you check this version and see if it fixes the problem?
HeadSweeper-1.7.2-SNAPSHOT.zip
(I had to zip it, because I can't just upload .jar files here)
from headsweeper.
HeadSweeper 1.72-SNAPSHOT loaded correctly and maintained board functionality in my rather limited environment. Thanks.
from headsweeper.
Ok, I'll make a release later
You can keep using this version until then.
from headsweeper.
Thanks.
from headsweeper.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from headsweeper.