Jump to content
  • 0

Question

Posted (edited)

Hello, I recently added this code, which I adapted for aCis 382.

I compile and run the gameserver without any error. I added the configs and I also tried without configs but by directly adding the rep value or item Id in the code. But once I press the item in game nothing occurs in both situations. 

With some searching I did on the forum I found that it's an issue from registering the handler and adding it to the items XML. I think I've done those though.

I've added these in ItemHandler :

import net.sf.l2j.gameserver.handler.itemhandlers.Calculator;
+import net.sf.l2j.gameserver.handler.itemhandlers.ClanRepsItem;

 

registerHandler(new Calculator());
+registerHandler(new ClanRepsItem());

 

 Added this in the XML of Festival Adena :

<set name="is_stackable" val="true" />
+<set name="handler" val="ClanRepsItem" />

 

Does anyone know what could cause this? Thanks in advance.

 

Edit : Added the code I use. https://pastebin.com/xTeZt9Jf

Edited by Hann1bal

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

Delete lines 78 - 86 and put @Override at the useItem that you have the code. Like this:

 

Quote

 @Override
	public void useItem(Playable playable, ItemInstance item, boolean forceUse)

 

 

Edited by @IcathiaLord
  • 0
Posted
2 hours ago, @IcathiaLord said:

Delete lines 78 - 86 and put @Override at the useItem that you have the code. Like this:

 

 

When I do that I get as possible fix " Create useItem()'in super type IItemHandler' " on that line of the code. 

If I make that fix I get errors on all other classes of ItemHandlers.

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..