• 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

(SOLVED) Loading Elements Manually

xNuminousx

Member
So upon converting Spirits to a plugin, I seem to have run into an issue where ProjectKorra will spam the server with this:
Java:
[10:02:44 INFO]: [ProjectKorra] Attempting to load in the following addon elements... [Spirit]
[10:02:44 INFO]: [ProjectKorra] Attempting to load in the following addon elements... [Spirit]
[10:02:45 INFO]: [ProjectKorra] Attempting to load in the following addon elements... [Spirit]
[10:02:46 INFO]: [ProjectKorra] Attempting to load in the following addon elements... [Spirit]
[10:02:47 INFO]: [ProjectKorra] Attempting to load in the following addon elements... [Spirit]
[10:02:48 INFO]: [ProjectKorra] Attempting to load in the following addon elements... [Spirit]
[10:02:49 INFO]: [ProjectKorra] Attempting to load in the following addon elements... [Spirit]
[10:02:50 INFO]: [ProjectKorra] Attempting to load in the following addon elements... [Spirit]
This happens only when there is a player online that has one of the addon elements. If no one online after a reload has an addon element, it won't get spammed. The spam only starts after the pluing tries to register the addon elements.

Basically, what I'm wanting to know is if there is some way I can register the elements I've created manually on my end rather than ProjectKorra seemingly struggle to register it. The only way I've found to stop the spam is if (ingame or in the console) I run the command "/bending display [element name]". That will force Pk to look for the elements and then finally after the command is run it'll say this:
Code:
[10:02:52 INFO]: [ProjectKorra] Successfully loaded in all addon elements!
I understand addon elements is more on the unknown side since it's hardly been done. But plugins and such are on my unknown side. Any detail provided would be much appreciated!
 

OmniCypher

Staff member
Lead Developer
Administrator
Plugin Developer
Can we get a snippet of how you actually register the element?
 

xNuminousx

Member
https://github.com/xNuminousx/Spirits
Although the GitHub version isn’t the plugin version, the way elements are created haven’t changed. The only change regarding the elements or the abilities is the CoreAbility.registerPluginAbilities addition in the Main class that extends JavaPlugin. Other than the creation of the elements in the “element” folder and what I just mentioned nothing was added.
 

xNuminousx

Member
If I’m supposed to directly register the elements now that it’s a plugin, I’m not aware of that and wouldn’t know which method to use to achieve the desired result.
 

xNuminousx

Member
I guess I figured it out, I'm no longer having the issue. I was looking for a ProjectKorra method that would register the elements but I just had to call the class in onEnable
 

StrangeOne101

Staff member
Plugin Developer
Moderator
From memory, you just got to define the element once and it registers in the Element constructor.

(I only just saw this thread)
 
Top