Luohuayu / CatServer

高性能和高兼容性的1.12.2/1.16.5/1.18.2版本Forge+Bukkit+Spigot服务端 (A high performance and high compatibility 1.12.2/1.16.5/1.18.2 version Forge+Bukkit+Spigot server)
https://catmc.org
GNU Lesser General Public License v3.0
1.98k stars 211 forks source link

[1.16.5] Skript v2.6.3 Cannot get key of Legacy Material Error #543

Closed tkwhd123 closed 2 years ago

tkwhd123 commented 2 years ago

Environment

Minecraft version(1.12.2/1.16.5/1.18.2): Build version(Get from /version command): Mods/Plugins: Skript 1.16.5 - v2.6.3

Describe the bug (If there is an error, please attach the pastebin link) Script plugin not normally available When using the /script command, help should appear, and script files should work. If you want to use any of the /script command Only the /script help message is displayed. If other server programs are used, normal operation is performed.

Expected behavior Disable script function

To Reproduce

  1. Apply the script plugin.
  2. Run the server.
  3. Try any script command. For general commands, separate explanations are indicated according to the commands.

Screenshot/Video (If it doesn't exist you can ignore it)

[20:52:28] [Server thread/ERROR] [Minecraft]: Error occurred while enabling Skript v2.6.3 (Is it up to date?) java.lang.IllegalArgumentException: Cannot get key of Legacy Material at org.apache.commons.lang.Validate.isTrue(Validate.java:136) ~[commons-lang-2.6.jar:2.6] at org.bukkit.Material.getKey(Material.java:3646) ~[forge:?] at ch.njol.skript.aliases.Aliases.loadMissingAliases(Aliases.java:408) ~[?:?] at ch.njol.skript.aliases.Aliases.loadInternal(Aliases.java:438) ~[?:?] at ch.njol.skript.aliases.Aliases.load(Aliases.java:393) ~[?:?] at ch.njol.skript.Skript.onEnable(Skript.java:472) ~[?:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[forge:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:351) ~[forge:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[forge:?] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:412) ~[forge:1.16.5-d691d2f4] at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:323) ~[forge:1.16.5-d691d2f4] at net.minecraft.server.MinecraftServer.func_240787a(MinecraftServer.java:439) ~[?:?] at net.minecraft.server.MinecraftServer.func_240800_l__(MinecraftServer.java:345) ~[?:?] at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:218) ~[?:?] at net.minecraft.server.MinecraftServer.func_240802v(MinecraftServer.java:739) ~[?:?] at net.minecraft.server.MinecraftServer.func_240783a(MinecraftServer.java:265) ~[?:?] at java.lang.Thread.run(Thread.java:831) [?:?]

tkwhd123 commented 2 years ago

Plugins: Skript 1.16.5 - v2.6.3 - Error ▼ Plugins: Skript 1.16.5 - v2.5.3 - OK

Other operating programs support version 2.6.3, but I don't think there's a big difference between version 2.5.3 and version 2.6.3, so this problem is solved.

EdoEquin0x commented 2 years ago

Hello ! I would like to point out that the 2.6.x versions of skript have better support for modded items (they are directly instantiated in the materials file of skript, that's basically where the error come from) which allows them to be used much more easily in skripts, it would be very advantageous to make catserver and script 2.6 compatible imo