Skript

Skript

743k Downloads

Skript on (Ketting) 1.20.1

C0D3-M4513R opened this issue ยท 4 comments

commented

Skript/Server Version

Running Ketting 1.20.1 (dev version) [I am a dev]
Running Skript 2.8.0

Bug Description

String isRunningMethod = Skript.isRunningMinecraft(1, 19) ? "u" : Skript.isRunningMinecraft(1, 18) ? "v" :"isRunning";
contains the method handle to MinecraftServer.isRunning().

Instead it points to MinecraftServer.getLocalIp(), which results in an error, when calling Skript.isServerRunning(), because IS_RUNNING.invoke(MC_SERVER) returns a java.lang.String, not a boolean.

This is because Minecraft's 1.20.1 mangled name for MinecraftServer.isRunning is back to v.

Expected Behavior

The plugin shuts down cleanly, without needing to provide boolean isStopping(); in org.bukkit.Server.

Steps to Reproduce

Build ketting and remove the boolean isStopping(); method in org.bukkit.Server.
Put Skript into the plugin folder.
Run and stop the server.
Observe an error whilst shutting the Server down.

Errors or Screenshots

No response

Other

image
(yeah, this shows 2.7.3, but I also validated, that this happens on 2.8.0)
image

Agreement

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

Should be simply adding a case for 1.20. Probably should refactor to a switch instead of a bunch of ternaries.
Feel free to make the pr yourself.

Do note that Skript doesn't support Forge servers so you may encounter other issues while running Skript that we can't or won't fix.

commented

Yeah. I am aware of that. e.g. this here. dunno why this happens or whose issue it is...
image

commented

Yeah. I am aware of that. e.g. this here. dunno why this happens or whose issue it is... image

You need to update skript-reflect and Skript to the latest versions.

commented

Yeah. I am aware of that. e.g. this here. dunno why this happens or whose issue it is... image

You need to update skript-reflect and Skript to the latest versions.

let's move this to #6353