Jump to content
  • 0

[Help]Stupid error.


Question

Posted

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

4 answers to this question

Recommended Posts

  • 0
Posted

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);
}
}

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


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