Jump to content
  • 0

[Help]Stupid error.


An4rchy
 Share

Question

Guys i am trying to adapt aio item from g. final to interlude, i fixed all errors on console but i have this stupid error i can't understand :S

 

[javac] C:\Documents and Settings\xxx\Desktop\Lineage\Other\workspace\aioitemadapt\gameserver\java\net\sf\l2j\gameserver\handler\itemhandlers\AllInOne.java:34: net.sf.l2j.gameserver.handler.itemhandlers.AllInOne is not abstract and does not override abstract method getItemIds() in net.sf.l2j.gameserver.handler.IItemHandler
    [javac] public class AllInOne implements IItemHandler
    [javac]        ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 1 error

 

please help me

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

can you show me the code?

I think that you missed something

there's nothing i missed, c/p the code from the patch and corrected errors.

 

here:

 /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
* http://www.gnu.org/copyleft/gpl.html
*/
package net.sf.l2j.gameserver.handler.itemhandlers;

import javolution.text.TextBuilder;
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.handler.IItemHandler;
import net.sf.l2j.gameserver.model.L2ItemInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PlayableInstance;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
import net.sf.l2j.gameserver.network.serverpackets.NpcHtmlMessage;

/**
* Beast SoulShot Handler
*
* @author Tempy
*/
public class AllInOne implements IItemHandler
{
public void useItem(L2PlayableInstance playable, L2ItemInstance item) {

	if(playable == null) return;

	if(!Config.ENABLE_AIO) return;

	L2PcInstance player = null;
	if(!(playable instanceof L2PcInstance)) {
		return;
	}
	else {
		player = (L2PcInstance) playable;

		if(player.isInOlympiadMode()) {
			player.sendMessage("Cannot use while in Olympiad");
			return;
		}
		else if(player.getKarma() > 0) {
			player.sendMessage("Cannot use while hava karma");
			return;
		}
		else if(player.isInJail()) {
			player.sendMessage("Cannot use while in Jail");
			return;
		}
		else if(player.isDead()) return;
		else if(player.isInCombat()) {
			player.sendMessage("Cannot use while in combat");
			return;
		}
		else
			showMainHtml(player);
	}
}

private static void showMainHtml(L2PcInstance player)  {
	TextBuilder tb = new TextBuilder();
	tb.append("<html><title>AIO Item</title><body><center><br>");
	tb.append("Hi <font color=LEVEL>"+player.getName()+"</font>!, i can help you out with<br1>");
	tb.append("many useful fuctions, just chose betwen the next<br1>");
	tb.append("avaliable fuctions!<br>");
	if(Config.ENABLE_GATEKEEPER)
		tb.append("<button value=\"Gatekeeper\" action=\"bypass -h Aioitem_showTeleportWindow\" width=150 height=32 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><br1>");
	if(Config.ENABLE_GMSHOP)
		tb.append("<button value=\"Shop\" action=\"bypass -h Aioitem_showShopWindow\" width=150 height=32 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><br1>");
	if(Config.ENABLE_BUFFER)
		tb.append("<button value=\"Buffer\" action=\"bypass -h Aioitem_showBuffWindow\" width=150 height=32 back=\"L2UI_CT1.Button_DF_Down\" fore=\"L2UI_ct1.button_df\"><br1>");
	tb.append("</center></body></html>");

	NpcHtmlMessage msg = new NpcHtmlMessage(5);
	msg.setHtml(tb.toString());
	player.sendPacket(msg);
}
}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • 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