Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to load worlds #6

Open
dan28000 opened this issue Oct 13, 2024 · 0 comments
Open

unable to load worlds #6

dan28000 opened this issue Oct 13, 2024 · 0 comments

Comments

@dan28000
Copy link

dan28000 commented Oct 13, 2024

when using bukkit flag to move server.properties from default location while having custom default name of worlds it causes this error to ocure
(the flag has been there since at least 1.8)
due to having hardcoded server properties path here

try(final InputStream input = Files.newInputStream(new File(PhantomWorlds.instance().getDataFolder(), "../../server.properties").toPath())) {

[12:19:46] [Server thread/ERROR]: Could not pass event WorldInitEvent to PhantomWorlds v2.0.12
java.lang.NullPointerException: Cannot invoke "String.length()" because "prefix" is null
	at java.base/java.lang.String.startsWith(String.java:2285) ~[?:?]
	at java.base/java.lang.String.startsWith(String.java:2327) ~[?:?]
	at PhantomWorlds-2.0.12.jar/me.lokka30.phantomworlds.managers.WorldManager.loadManagedWorlds(WorldManager.java:66) ~[PhantomWorlds-2.0.12.jar:?]
	at PhantomWorlds-2.0.12.jar/me.lokka30.phantomworlds.PhantomWorlds.loadWorlds(PhantomWorlds.java:242) ~[PhantomWorlds-2.0.12.jar:?]
	at PhantomWorlds-2.0.12.jar/me.lokka30.phantomworlds.listeners.world.WorldInitListener.onInit(WorldInitListener.java:45) ~[PhantomWorlds-2.0.12.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor36.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[basiclandmc-api-1.21.1-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:72) ~[basiclandmc-api-1.21.1-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:60) ~[basiclandmc-1.21.1.jar:1.21.1-DEV-d08a3cb]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[basiclandmc-1.21.1.jar:1.21.1-DEV-d08a3cb]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:630) ~[basiclandmc-api-1.21.1-R0.1-SNAPSHOT.jar:?]
	at net.minecraft.server.MinecraftServer.initWorld(MinecraftServer.java:773) ~[basiclandmc-1.21.1.jar:1.21.1-DEV-d08a3cb]
	at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:724) ~[basiclandmc-1.21.1.jar:1.21.1-DEV-d08a3cb]
	at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:516) ~[basiclandmc-1.21.1.jar:1.21.1-DEV-d08a3cb]
	at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:374) ~[basiclandmc-1.21.1.jar:1.21.1-DEV-d08a3cb]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1226) ~[basiclandmc-1.21.1.jar:1.21.1-DEV-d08a3cb]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[basiclandmc-1.21.1.jar:1.21.1-DEV-d08a3cb]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant