• Hello Guest! Did you know that ProjectKorra has an official Discord server? A lot of discussion about the official server, development process, and community discussion happens over there. Feel free to join now by clicking the link below.

    Join the Discord Server

CoreAbility.registerPluginAbilities() not working

adairh

Member
I am coding a plugin, it contains some addon skills ( like JedCore ), but when i put

JavaScript:
CoreAbility.registerPluginAbilities(this, "net.wdlvn.pka")
or

JavaScript:
CoreAbility.registerPluginAbilities(this, "net.wdlvn.pka.AddonSkill.Skill")
in main class, it throws

Code:
[21:43:29 ERROR]: Error occurred while enabling PKA v1.0 (Is it up to date?)
java.util.NoSuchElementException: null
        at sun.misc.CompoundEnumeration.nextElement(Unknown Source) ~[?:1.8.0_191]
        at com.projectkorra.projectkorra.ability.util.AbilityLoader.<init>(AbilityLoader.java:43) ~[?:?]
        at com.projectkorra.projectkorra.ability.CoreAbility.registerPluginAbilities(CoreAbility.java:573) ~[?:?]
        at net.wdlvn.pka.main.onEnable(main.java:469) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot.jar:git-Spigot-da42974-8f47214]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot.jar:git-Spigot-da42974-8f47214]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:402) [spigot.jar:git-Spigot-da42974-8f47214]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:384) [spigot.jar:git-Spigot-da42974-8f47214]
        at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:333) [spigot.jar:git-Spigot-da42974-8f47214]
        at net.minecraft.server.v1_12_R1.MinecraftServer.t(MinecraftServer.java:422) [spigot.jar:git-Spigot-da42974-8f47214]
        at net.minecraft.server.v1_12_R1.MinecraftServer.l(MinecraftServer.java:383) [spigot.jar:git-Spigot-da42974-8f47214]
        at net.minecraft.server.v1_12_R1.MinecraftServer.a(MinecraftServer.java:338) [spigot.jar:git-Spigot-da42974-8f47214]
        at net.minecraft.server.v1_12_R1.DedicatedServer.init(DedicatedServer.java:272) [spigot.jar:git-Spigot-da42974-8f47214]
        at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:545) [spigot.jar:git-Spigot-da42974-8f47214]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_191]

this is my project's img:




please help me :((
 

Attachments

Last edited:

Simplicitee

Staff member
Plugin Developer
In order for the ProjectKorra plugin to be able to register abilities from another plugin, the other plugin must be a Maven project.

1. To make your project a Maven project, right click the project folder, go down to Configure, and click Turn into Maven project (or something along those lines).

2. When exporting your project, don't use the export option, use Run As > Maven Install.

Doing this should fix your problem
 

adairh

Member
In order for the ProjectKorra plugin to be able to register abilities from another plugin, the other plugin must be a Maven project.

1. To make your project a Maven project, right click the project folder, go down to Configure, and click Turn into Maven project (or something along those lines).

2. When exporting your project, don't use the export option, use Run As > Maven Install.

Doing this should fix your problem
Code:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project pka: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
i got this when use maven install :((
 

Simplicitee

Staff member
Plugin Developer
Code:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project pka: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
i got this when use maven install :((
If you installed the JDK properly, you should be able to right click your project and go to properties, go to the build path, remove the current Java library and click Add Library, click next, click Add, find your Java folder and then select the jdk folder
 
Top