Bukkit with module support

Discussion in 'Plugin Development' started by RcExtract, Jul 6, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    RcExtract

    Currently Bukkit API does not have an explicitly defined module, so when i have my plugin depending on it, warning occurs, which says that the automatically detected module name for Bukkit API is unstable. Can Bukkit add a module? Since Java 11 should be released soon, and no way Bukkit still is not built on Java 9. Or any other solutions beside suggesting me to use Java 8 or lower?
     
  2. Offline

    timtower Administrator Administrator Moderator

    @RcExtract What would a module do? What would the benefit be of such module? (not following the updates that much)
     
  3. Offline

    RcExtract

    A module basically controls what packages in the library is accessible to public and what modules are depended on. There are much more features. And Bukkit API does not have a module defined so an automatic name is generated by the jar. However, that is unstable. (probably since the jar name may change in the future). Any ideas on fixing this? Plz dont call me not to define module since i dont want to let developers have the same issue when depending on my plugin.
     
  4. Offline

    timtower Administrator Administrator Moderator

    @RcExtract What automatic name for Bukkit? I can change the jar name to my likings, just need to change the build path, the imports stay the same.
    NMS is a different story though.
     
  5. Offline

    RcExtract

    since Bukkit does not have a defined module, a module name is not explicitly declared. Therefore, when using libraries from Bukkit, an automatic name must be used in my module to indicate that i am using Bukkit jar, which the automatic name is unstable probably because it is generated from the Bukkit jar file name. It is like importing packages, but in module it is importing modules for my project.
     
  6. Offline

    timtower Administrator Administrator Moderator

  7. Offline

    RcExtract

    Packages are within modules starting from java 9. With an explicitly defined module u can control which package in ur module is accessible to public, and which module is required (imported). When required, u can use all public packages of a module. What the current problem is, Bukkit does not have a module, so when i require it in my module, i must use an automatic name to reference that module, while the automatic name is generated from the bukkit jar name, so when the bukkit jar name changes, the module reference may not work. Thats why an automatic module name is unstable. The compiler gives me warning about this and there is no quick fixes available. How do i fix this, besides downgrading from java 9 to java 8?
     
Thread Status:
Not open for further replies.

Share This Page