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...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock