EpicEricEE / ShopChest

ShopChest - Spigot/Bukkit Plugin
MIT License
45 stars 57 forks source link

1.17 to 1.18.1 support #379

Open Flowsqy opened 2 years ago

Flowsqy commented 2 years ago
EpicEricEE commented 2 years ago

This is amazing! However, I'm not sure if I should merge this. It would probably be better if you were to more or less take over the project if you want to.

Flowsqy commented 2 years ago

Thanks ! First of all, sorry to answer this late. I did not plan do take over the project and I only done this work for a little server which use it. I don't know if it's a good idea to leave the whole project to me, I'm yet a student and I can't ensure that I will have the time to answer to every issues. I've developped my fork a way to not touch to original code and only update 'nms part' to guarantee the plugin can still run in future version with minimal effort. However if you will not update this project anymore, I can take over it to keep it running for the community as there is a lot of people who use it. I leave the decision to you: to keep updating the project or if you prefer that I update it my way. If you want to leave it, please tell me at which level (fork, original github repo, spigot page etc...) do you want me to take over it.

PS: Sorry for my english, hope my comment is not painfull to read. By the way, Happy New Year depending on when you will read this x).

Niko302 commented 2 years ago

Thanks ! First of all, sorry to answer this late. I did not plan do take over the project and I only done this work for a little server which use it. I don't know if it's a good idea to leave the whole project to me, I'm yet a student and I can't ensure that I will have the time to answer to every issues. I've developped my fork a way to not touch to original code and only update 'nms part' to guarantee the plugin can still run in future version with minimal effort. However if you will not update this project anymore, I can take over it to keep it running for the community as there is a lot of people who use it. I leave the decision to you: to keep updating the project or if you prefer that I update it my way. If you want to leave it, please tell me at which level (fork, original github repo, spigot page etc...) do you want me to take over it.

PS: Sorry for my english, hope my comment is not painfull to read. By the way, Happy New Year depending on when you will read this x).

Hey, question did you manage to merge this in any way and get a working jar file with 1.18.1 ?. If so it would be amazing if you shared it.

Flowsqy commented 2 years ago

Hello ! I did not manage to merge this and I'm currently working on another projet, so this pull request is waiting, calmly and gently. I will probably continue the development of ShopChest after, in two or three weeks. I created a release in my repo to get the jar file. Note that it's a pre-release and it can contains some bugs that I did not see during basic tests.

tooop4u commented 2 years ago

Hello @Flowsqy and thank you for keeping this project alive!

Running your build, I'm getting an error when creating new shops (probably due to Nashorn engine being removed in newer Java versions). Here's the full error:

[03:16:25] [pool-49-thread-1/WARN]: Exception in thread "pool-49-thread-1" java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.eval(String)" because "this.engine" is null
[03:16:25] [pool-49-thread-1/WARN]:     at ShopChest-1.14.0-SNAPSHOT.jar//de.epiceric.shopchest.config.HologramFormat.evalRequirement(HologramFormat.java:196)
[03:16:25] [pool-49-thread-1/WARN]:     at ShopChest-1.14.0-SNAPSHOT.jar//de.epiceric.shopchest.config.HologramFormat.getFormat(HologramFormat.java:68)
[03:16:25] [pool-49-thread-1/WARN]:     at ShopChest-1.14.0-SNAPSHOT.jar//de.epiceric.shopchest.shop.Shop.getHologramText(Shop.java:302)
[03:16:25] [pool-49-thread-1/WARN]:     at ShopChest-1.14.0-SNAPSHOT.jar//de.epiceric.shopchest.shop.Shop.createHologram(Shop.java:228)
[03:16:25] [pool-49-thread-1/WARN]:     at ShopChest-1.14.0-SNAPSHOT.jar//de.epiceric.shopchest.shop.Shop.lambda$create$1(Shop.java:141)
[03:16:25] [pool-49-thread-1/WARN]:     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[03:16:25] [pool-49-thread-1/WARN]:     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[03:16:25] [pool-49-thread-1/WARN]:     at java.base/java.lang.Thread.run(Thread.java:833)

Running Minecraft 1.18.1 on Java 17.

Thanks

Flowsqy commented 2 years ago

Hello ! First, I opened 'issues' and 'discussion' in my repository to avoid using this pull request thread. For future people that wants to report an issue or ask about something, make it there. This said, for the nashorn engine I don't know what to do. I resumed my problem here. I encourage people to give their opinion in the discussion, so I can figure out what I will do with this. To avoid getting this error with the actual build, you can avoid the use of the script feature. It's not a perfect solution at all, but it will allow you to keep running the plugin until I fix it. I wanted to answer you faster, but I needed to check every usage of the nashorn engine and it took me more time than I expected.

ken-kentan commented 2 years ago

Thank you for creatring 1.18 support PR! About Nashorn Engine error. It was already fixed in https://github.com/EpicEricEE/ShopChest/pull/372. But the PR isn't merged yet 😢 .

Flowsqy commented 2 years ago

Yeah, I saw your pr but as I said in the discussion, I don't want to shade the nashorn engine unless it's absolutely needed.