Solved Always returning "LEGACY_Something"

Discussion in 'Plugin Development' started by cdnyassuo34, Sep 2, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    cdnyassuo34

    Hi, I am creating a minecraft plugin using bukkit 1.13.2 and I am creating a command that returns the item in the main hand of the player but it's always returning me LEGACY_[Insert an item name here]"
    I am using this:

    Code:
    else if(cmd.getName().equalsIgnoreCase("getitemname"))
            {
                if(sender instanceof Player)
                {
                    Player player = (Player) sender;
                    player.sendMessage("§lVotre Item: §r§6" + player.getItemInHand().getType());
                }
                else
                {
                    sender.sendMessage("vous devez être un Joueur pour executer cette commande");
                }
            }
    
    is there something wrong that makes it return "LEGACY_SOMETHING" instead of "SOMETHING" in this ?
    if anyone tell me the probs I would be happy ^^
     
  2. Offline

    timtower Administrator Administrator Moderator

  3. Offline

    cdnyassuo34

    oh thanks ^^
     
Thread Status:
Not open for further replies.

Share This Page