few questions, is the java version of the game going to remain active even though it will not be updated? as in will it still be playable online? even if the game itself will not be updated will the plugin API ever get updates from API requests? i would still like to learn to make my own plugins for the java version.
Java API
-
- English
- james1bow
- Thread is marked as Resolved.
-
-
The API in the Java version will still be available and active in the future (because it's part of the game). However, probably it won't get any new features, since every new addition also requires changes to the game...
Having that said, the API for the new version will be very similar to the API in the Java version (except a few minor differences). This means that Java plugins require little to no effort to become compatible with the new version. So if you start working with the Java API now, this definitely wouldn't be a waste of time because the vast majority of your code will still be compatible with the new version (>>this<< is probably the only "breaking" change - if you keep that in mind [which is recommendable even in the Java version anyway], you won't have much trouble to upgrade your plugin to the new version in the future)
-
as im new to java and programming in general, when timers finish a Runable do they stay in memory or do i need to kill the timers? also im wanting to create a custom crafting station but i havnt seen anything in the api about it?
thanks in advance
-
Java has a so called garbage collector an it frees memory when objects are not used anymore. So you don't need to kill the timers by yourself.
-
If it's a finite timer (i.e. if the "repetitions" parameter in constructor is >= 0), then it gets disposed automatically if there are no more pending executions (the game removes the references it holds to the timer automatically so the object gets garbage collected if you don't hold any references to it either, as mentioned by Desmagu). However, if it's an infinite timer (i.e. repetitions parameter is -1), you have to kill the timer manually of course
About creating custom crafting stations, unfortunately there is no API for that yet =/ The API only has methods to create custom items or to load static models, but unfortunately no way yet to define a custom crafting station...
-
thank you both for the replies , was worried about a high use item holding a few thousand timers into memory.
as for the custom crafting station's i presume i could interact with said static object to craft custom item's? tbh i would like this approach better from a learning standpoint.
Nice work on the new unity update as well.
-
as for the custom crafting station's i presume i could interact with said static object to craft custom item's? tbh i would like this approach better from a learning standpoint.
In theory that's possible, but it's a lot of of work since you would basically have to implement a custom crafting menu through the API
Nice work on the new unity update as well.
Thanks!
Participate now!
Don’t have an account yet? Create a new account now and be part of our community!