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

Skript on (Ketting) 1.20.1 #6351

Closed
1 task done
C0D3-M4513R opened this issue Jan 20, 2024 · 4 comments
Closed
1 task done

Skript on (Ketting) 1.20.1 #6351

C0D3-M4513R opened this issue Jan 20, 2024 · 4 comments
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. good first issue An issue that would be good for a first-time contributor to make a PR for priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@C0D3-M4513R
Copy link
Contributor

C0D3-M4513R commented Jan 20, 2024

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.
@C0D3-M4513R C0D3-M4513R changed the title Skript on Ketting 1.20.1 Skript on (Ketting) 1.20.1 Jan 20, 2024
@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). good first issue An issue that would be good for a first-time contributor to make a PR for labels Jan 20, 2024
@sovdeeth
Copy link
Member

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.

@C0D3-M4513R

This comment was marked as off-topic.

@BaeFell

This comment was marked as off-topic.

@sovdeeth sovdeeth added the PR available Issues which have a yet-to-be merged PR resolving it label Jan 20, 2024
@C0D3-M4513R

This comment was marked as off-topic.

@APickledWalrus APickledWalrus added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. completed The issue has been fully resolved and the change will be in the next Skript update. good first issue An issue that would be good for a first-time contributor to make a PR for priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

4 participants