-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Ectoplasmator reminder #7326
base: master
Are you sure you want to change the base?
Ectoplasmator reminder #7326
Conversation
Updated commit version Was using @ConfigGroup("example") - cause an issue, @ConfigGroup has been renamed
Added Varlamore Part 2 Creatures. Frost Nagua & Amoxilatl boss
Changed the structure of the plugin to fetch a list of NPC names from another branch, and compare the name of the NPC targets (Instead of IDs). This is to set up a structure for future updates, where only the text file on the other branch needs to be updated with new Spectral NPCs, and no changes need to be made to the function or structure of the code on main.
|
You're not closing this reader: staytheknight/ectoplasmator-reminder@7b8c959...staytheknight:830e603cfc5589c707a37a6db21d5cd1a3073e12#diff-10693da25e57a0233faf318338fc9fb18252e411e8edc6a852d65756c8fdc750R53-R54 Also you should not block the EDT while it downloads these files on plugin start up. You can inject the OkHttpClient and use that which has support for async operations built-in. |
Great, thank you for the feedback, I will look into fixing these issues, and trying to async this process. |
Changed URL Reader to Async OkHTTP calls
Please use the version of okhttp already provided by the runelite client rather than depending on |
Thanks for the heads up, first time using OkHTTP for me, had a lot to figure out :) |
Changed OkHTTP calls from using a gradle / maven import, to an @Inject to call built in plugins. First time using OkHTTP so I did not know what I was doing.
Looks like it didn't like me calling 'new OkHttpClient()'. |
just inject and then you can use it, you do not need to call |
Thank you very much for the examples, examples help me tremendously. Looking more closely at the differences between our code, I found out the class storing my OkHTTPClient inject was 'abstract' and my IDE kept telling me to add static in front of a lot of my function calls. Removing Abstract and Static modifiers and changing how the SpectralCreature URL reader is called in the Plugin seems to have fixed my issues on my side of things after testing, we'll now see if the automatic checks on GitHub like it or not. Java is not a language I use often if at all, so this has been quite the adventure. |
Removed abstract class modifier from SpectralCreatures class so the @ Inject for OkHTTPClient could work. While the class was abstract, my IDE kept telling me to make everything static. I had to go change how SpectralCreatures is called in the plugin using an @ Inject. This seems to have fixed all the issues on my side for testing, now we will see if the automatic GitHub checks pass
Changed console prints to logger
Changed the structure of the plugin to fetch a list of NPC names from another branch, and compare the name of the NPC targets (Instead of IDs).
This is to set up a structure for future updates, where only the text file on the other branch needs to be updated with new Spectral NPCs, and no changes need to be made to the function or structure of the code on main.