NPE on Skript enable
SlimeDog opened this issue ยท 4 comments
Skript/Server Version
> skript info
[18:25:40 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[18:25:40 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[18:25:40 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[18:25:40 INFO]: [Skript] Server Version: 1.20.6-101-f0bd0cc (MC: 1.20.6)
[18:25:40 INFO]: [Skript] Skript Version: 2.9.0-beta1 (skriptlang-github)
[18:25:40 INFO]: [Skript] Installed Skript Addons: None
[18:25:40 INFO]: [Skript] Installed dependencies:
[18:25:40 INFO]: [Skript] - Vault v1.7.3-b131
[18:25:40 INFO]: [Skript] - WorldGuard v7.0.11-SNAPSHOT+2274-ead1e1b
### Bug Description
NPE on server start-up. This was exposed by a change in Paper since 1.20.6-98.
### Expected Behavior
Clean start-up
### Steps to Reproduce
- Update Paper to 1.20.6-99 or later
- Start server
- Read console/log
### Errors or Screenshots
[18:07:51] [Server thread/INFO]: [Skript] Enabling Skript v2.9.0-beta1
[18:07:51] [Server thread/INFO]: [Skript] The updater is disabled, so a check for the latest version of Skript was not performed.
[18:07:55] [Server thread/ERROR]: Error occurred while enabling Skript v2.9.0-beta1 (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.equals(Object)" because "this.color" is null
at org.bukkit.craftbukkit.inventory.CraftMetaColorableArmor.equalsCommon(CraftMetaColorableArmor.java:118) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at org.bukkit.craftbukkit.inventory.CraftItemFactory.equals(CraftItemFactory.java:415) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at org.bukkit.craftbukkit.inventory.CraftItemFactory.equals(CraftItemFactory.java:402) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at org.bukkit.craftbukkit.inventory.CraftMetaItem.equals(CraftMetaItem.java:1544) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.ItemData.compareItemMetas(ItemData.java:447) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.ItemData.matchAlias(ItemData.java:355) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.AliasesMap.exactMatch(AliasesMap.java:215) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.AliasesProvider.addAlias(AliasesProvider.java:322) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.AliasesParser.loadSingleAlias(AliasesParser.java:705) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.AliasesParser.loadAlias(AliasesParser.java:614) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.AliasesParser.load(AliasesParser.java:121) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.Aliases.load(Aliases.java:506) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.Aliases.load(Aliases.java:492) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.Aliases.lambda$loadDirectory$1(Aliases.java:475) ~[Skript-2.9.0-beta1.jar:?]
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[?:?]
at java.base/java.util.ArrayList.forEach(ArrayList.java:1597) ~[?:?]
at java.base/java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:395) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:557) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:546) ~[?:?]
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[?:?]
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[?:?]
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265) ~[?:?]
at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:611) ~[?:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.Aliases.loadDirectory(Aliases.java:468) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.Aliases.loadInternal(Aliases.java:433) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.aliases.Aliases.load(Aliases.java:389) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.Skript.onEnable(Skript.java:508) ~[Skript-2.9.0-beta1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[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-101-f0bd0cc]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:519) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:604) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:553) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:675) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:323) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1136) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]
[18:07:55] [Server thread/INFO]: [Skript] Disabling Skript v2.9.0-beta1
[18:07:55] [Server thread/ERROR]: Error occurred while disabling Skript v2.9.0-beta1
java.lang.ExceptionInInitializerError: null
at Skript-2.9.0-beta1.jar/ch.njol.skript.Skript.beforeDisable(Skript.java:1192) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.Skript.onDisable(Skript.java:1204) ~[Skript-2.9.0-beta1.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:290) ~[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-101-f0bd0cc]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.disablePlugin(PaperPluginManagerImpl.java:114) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:549) ~[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-101-f0bd0cc]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:519) ~[paper-api-1.20.6-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:604) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:553) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:675) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:437) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:323) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1136) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:323) ~[paper-1.20.6.jar:1.20.6-101-f0bd0cc]
at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]
Caused by: ch.njol.skript.SkriptAPIException: Registration can only be done during plugin initialization
at Skript-2.9.0-beta1.jar/ch.njol.skript.Skript.checkAcceptRegistrations(Skript.java:1299) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.Skript.registerEvent(Skript.java:1501) ~[Skript-2.9.0-beta1.jar:?]
at Skript-2.9.0-beta1.jar/ch.njol.skript.events.EvtSkript.(EvtSkript.java:39) ~[Skript-2.9.0-beta1.jar:?]
... 17 more
### Other
_No response_
### Agreement
- [X] I have read the guidelines above and affirm I am following them with this report.
this is a paper bug:
PaperMC/Paper#10789
you're welcome... just wanted to let you know they fixed it, just waiting for the update to show up on the paper download page