Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8472657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:08:13+00:00 2026-06-10T17:08:13+00:00

Possible Duplicate: eclipse 3.4 (ganymede) package collision with type I’m new in java, but

  • 0

Possible Duplicate:
eclipse 3.4 (ganymede) package collision with type

I’m new in java, but i tried to write a script for a game Lineage2.

heres a code:

package ZergZ.ZTeleport;
import javolution.util.FastMap;
import com.l2jserver.Config;
import com.l2jserver.gameserver.handler.IVoicedCommandHandler;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.handler.VoicedCommandHandler;

public class ZTeleport implements IVoicedCommandHandler
{
    private static final String[] VOICED_COMMANDS =
    {
        "teleport"
    };
    @Override
    public boolean useVoicedCommand(String command, L2PcInstance activeChar, String params)
    {
        if (activeChar == null)
            return false;

        if (params.equalsIgnoreCase("aden"))
        {
            activeChar.teleToLocation(147736,-56243,-2781);
        }
        if (params.equalsIgnoreCase("gracia"))
        {
            activeChar.teleToLocation(-186742,244167,2675);
        }
        if (params.equalsIgnoreCase("pvp1"))
        {
            activeChar.teleToLocation(147736,-56243,-2781);
        }
        if (params.equalsIgnoreCase("pvp2"))
        {
            activeChar.teleToLocation(179337,221937,4475);
        }

    }
    @Override
    public String[] getVoicedCommandList()
    {
        return VOICED_COMMANDS;
    }


}

when server starts java says:
1. ERROR in \ZTeleport.java (at line 17)
package ZergZ.ZTeleport;
               ^^^^^^^^^^^^^^^^^^^^
The package ZergZ.ZTeleport collides with a type

the script is situated in ZergZ/ZTeleport.java

I’ll give you another script which works fine:

package custom.HeroCirclet;

import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.quest.QuestState;

public class HeroCirclet extends Quest
{
______
}

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:08:15+00:00Added an answer on June 10, 2026 at 5:08 pm

    You say “the script is situated in ZergZ/ZTeleport.java”. This implies that the class ZTeleport belongs to the package ZergZ. But you have declared it as belonging to a different package, ZergZ.ZTeleport.

    In your second example, I would bet that the source file is located in custom/HeroCirclet/HeroCirclet.java, which matches its package declaration, and does not create a naming conflict.

    You either need to move the source file (people normally don’t call java source files “scripts”, btw) into a directory that matches its declared package, or change the package declaration to match its location.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Developing for Android in Eclipse: R.java not generating what to do if
Possible Duplicate: Build Eclipse Java Project from Command Line I want to compile my
Possible Duplicate: Why are Exceptions not Checked in .NET? Coming from Eclipse/Java, I noticed
Possible Duplicate: Android Unknown Command 'crunch' I have been using eclipse just fine but
Possible Duplicate: Java Generics In Eclipse, I am given warnings for using 'rawtypes' and
Possible Duplicate: Developing for Android in Eclipse: R.java not generating I cleaned my project
Possible Duplicate: Best Java obfuscator ? For my example I know that eclipse offers
Possible Duplicate: Do you really use your reverse domain for package naming in java?
Possible Duplicate: Eclipse CDT C++11/C++0x support I tried everything to compile C++11 code namely
Possible Duplicate: Eclipse's project clean This might be a foolish question but any way,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.