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

Fix start issues on 1.20.x and 1.21 #280

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

r59q
Copy link
Contributor

@r59q r59q commented Jun 24, 2024

Fixes an issue where the Bukkit.getServer().getClass().getPackage().getName() function no longer shows the minecraft version number required by the onEnable method in FactionsPlugin.java.

The log that has been fixed

[11:46:16 INFO]: [SaberFactions] Enabling Factions v1.6.9.5-4.1.6-BETA
[11:46:16 ERROR]: Error occurred while enabling Factions v1.6.9.5-4.1.6-BETA (Is it up to date?)
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
        at SaberFactions.jar/com.massivecraft.factions.FactionsPlugin.onEnable(FactionsPlugin.java:141) ~[SaberFactions.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:626) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:575) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:675) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:323) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1136) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[11:46:16 INFO]: [SaberFactions] Disabling Factions v1.6.9.5-4.1.6-BETA
[11:46:16 INFO]: [SaberFactions] ===== Shutdown Start =====
[11:46:16 ERROR]: Error occurred while disabling Factions v1.6.9.5-4.1.6-BETA
java.lang.NullPointerException: Cannot invoke "com.massivecraft.factions.zcore.util.Persist.saveSync(Object)" because "com.massivecraft.factions.FactionsPlugin.instance.persist" is null
        at SaberFactions.jar/com.massivecraft.factions.Conf.saveSync(Conf.java:653) ~[SaberFactions.jar:?]
        at SaberFactions.jar/com.massivecraft.factions.zcore.util.ShutdownParameter.initShutdown(ShutdownParameter.java:18) ~[SaberFactions.jar:?]
        at SaberFactions.jar/com.massivecraft.factions.FactionsPlugin.onDisable(FactionsPlugin.java:288) ~[SaberFactions.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:291) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.disablePlugin(PaperPluginInstanceManager.java:237) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:114) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:550) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:206) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
        at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:626) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:575) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:675) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:323) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1136) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-147-e41d44f]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

This is just a fix for papermc, haven't tried any other servers

@Driftay Driftay merged commit bce0ee9 into SaberLLC:1.6.x Jun 28, 2024
@r59q r59q deleted the fix-start-issues branch June 28, 2024 20:35
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

Successfully merging this pull request may close these issues.

2 participants