AtriusX / Waystones

A small plugin that brings long-distance teleportation to Minecraft survival mode!
https://www.spigotmc.org/resources/waystones.93917/
11 stars 6 forks source link

Changes to the Java Random Implementation #57

Open PhilippCl opened 2 years ago

PhilippCl commented 2 years ago

This uses the java random implementation instead of the kotlin one. The Plugin is now useable with Minecraft Spigot/Paper 1.19.2

The Error before: https://gist.github.com/PhilippCl/4209b1cfd6ba600ad86fd47ad565a059

AtriusX commented 2 years ago

Personally I'd check and see if you can figure out a way to get the Kotlin implementation working again rather than relying on the JVM implementation as that can get a bit confusing with imports. The way you're using Random in this case isn't ideal either as you would be instancing a new Random object every time you call teleport, whereas before it was just calling a static instance.

Lastly I'd recommend breaking up this into a couple smaller PRs, one for the fix and another to update the API version of the plugin. Would help to keep PRs from getting a bit too messy and hard to track. Should also avoid bumping the version number in this PR too. Thank you!

PhilippCl commented 2 years ago

This was more like a quick fix for yesterday. Sorry its really messy. I will try to find a solution with the Kotlin Random Implementation and remove the version bumps from this pr after work today. Thanks for the answer and for the nice plugin :+1:

AtriusX commented 2 years ago

No problem and thank you for your interest! I've marked this as a draft for now so it doesn't accidentally get merged in until you're ready. Just convert it back to a regular PR once its done. 👍🏼

AtriusX commented 2 years ago

Just checking back in, any updates on this?