Skript

Skript

743k Downloads

ExprTextOf fails to load on Spigot

ShaneBeee opened this issue ยท 0 comments

commented

Skript/Server Version

[13:26:38] [Server thread/INFO]: [Skript] Server Version: 4406-Spigot-33ece3e-57f48e5 (MC: 1.21.4)
[13:26:38] [Server thread/INFO]: [Skript] Skript Version: 2.9.5 (selfbuilt-unknown)
[13:26:38] [Server thread/INFO]: [Skript] Installed Skript Addons: 
[13:26:38] [Server thread/INFO]: [Skript]  - skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect)
[13:26:38] [Server thread/INFO]: [Skript]  - SkBee v3.6.5 (https://github.com/SkriptHub/SkBee)
[13:26:38] [Server thread/INFO]: [Skript]  - SkBriggy v1.4.3 (https://github.com/ShaneBeee/SkBriggy)
[13:26:38] [Server thread/INFO]: [Skript] Installed dependencies: 
[13:26:38] [Server thread/INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

When loading 2.10 build (from dev/feature) on Spigot, ExprTextOf errors.

I believe its due to this:

if (Skript.classExists("org.bukkit.entity.Display")) {
	serializer = BungeeComponentSerializer.get();
	types += "displays";
}

BungeeComponentSerializer is a Paper/AdventureAPI class, but there is no check for said class before initializing it.

Expected Behavior

No error.

Steps to Reproduce

Load up Skript 2.10 (dev/feature) on a SpigotMC server.

Errors or Screenshots

 #!#! Stack trace:
 #!#! java.lang.NoClassDefFoundError: net/kyori/adventure/text/serializer/ComponentSerializer
 #!#!     at java.base/java.lang.ClassLoader.defineClass1(Native Method)
 #!#!     at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1023)
 #!#!     at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
 #!#!     at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:206)
 #!#!     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
 #!#!     at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:117)
 #!#!     at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:112)
 #!#!     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
 #!#!     at org.skriptlang.skript.bukkit.misc.expressions.ExprTextOf.<clinit>(ExprTextOf.java:36)
 #!#!     at java.base/java.lang.Class.forName0(Native Method)
 #!#!     at java.base/java.lang.Class.forName(Class.java:529)
 #!#!     at java.base/java.lang.Class.forName(Class.java:508)
 #!#!     at ch.njol.skript.util.Utils.getClasses(Utils.java:241)
 #!#!     at ch.njol.skript.SkriptAddon.loadClasses(SkriptAddon.java:82)
 #!#!     at ch.njol.skript.Skript.onEnable(Skript.java:545)
 #!#!     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267)
 #!#!     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342)
 #!#!     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:492)
 #!#!     at org.bukkit.craftbukkit.v1_21_R3.CraftServer.enablePlugin(CraftServer.java:579)
 #!#!     at org.bukkit.craftbukkit.v1_21_R3.CraftServer.enablePlugins(CraftServer.java:493)
 #!#!     at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:656)
 #!#!     at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:441)
 #!#!     at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:268)
 #!#!     at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1032)
 #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329)
 #!#!     at java.base/java.lang.Thread.run(Thread.java:1570)
 #!#! Caused by: java.lang.ClassNotFoundException: net.kyori.adventure.text.serializer.ComponentSerializer
 #!#!     at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:160)
 #!#!     at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:112)
 #!#!     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
 #!#!     at java.base/java.lang.ClassLoader.defineClass1(Native Method)
 #!#!     at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1023)
 #!#!     at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
 #!#!     at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:206)
 #!#!     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:592)
 #!#!     at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:117)
 #!#!     at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:112)
 #!#!     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
 #!#!     at org.skriptlang.skript.bukkit.misc.expressions.ExprTextOf.<clinit>(ExprTextOf.java:36)
 #!#!     at java.base/java.lang.Class.forName0(Native Method)
 #!#!     at java.base/java.lang.Class.forName(Class.java:529)
 #!#!     at java.base/java.lang.Class.forName(Class.java:508)
 #!#!     at ch.njol.skript.util.Utils.getClasses(Utils.java:241)
 #!#!     at ch.njol.skript.SkriptAddon.loadClasses(SkriptAddon.java:82)
 #!#!     at ch.njol.skript.Skript.onEnable(Skript.java:545)
 #!#!     at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267)
 #!#!     at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342)
 #!#!     at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:492)
 #!#!     at org.bukkit.craftbukkit.v1_21_R3.CraftServer.enablePlugin(CraftServer.java:579)
 #!#!     at org.bukkit.craftbukkit.v1_21_R3.CraftServer.enablePlugins(CraftServer.java:493)
 #!#!     at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:656)
 #!#!     at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:441)
 #!#!     at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:268)
 #!#!     at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1032)
 #!#!     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:329)
 #!#!     at java.base/java.lang.Thread.run(Thread.java:1570)
 #!#! 
 #!#! Version Information:
 #!#!   Skript: 2.9.5
 #!#!     Flavor: selfbuilt-unknown
 #!#!     Date: unknown
 #!#!   Bukkit: 1.21.4-R0.1-SNAPSHOT
 #!#!   Minecraft: 1.21.4
 #!#!   Java: 22.0.2 (OpenJDK 64-Bit Server VM 22.0.2+9)
 #!#!   OS: Mac OS X aarch64 15.2
 #!#! 
 #!#! Server platform: Spigot
 #!#! 
 #!#! Current node: null
 #!#! Current item: null
 #!#! 
 #!#! Thread: Server thread
 #!#! 
 #!#! Language: english
 #!#! Link parse mode: DISABLED
 #!#! 
 #!#! End of Error.

Other

No response

Agreement

  • I have read the guidelines above and affirm I am following them with this report.