Help in plugin - new item and teleport

Discussion in 'Plugin Development' started by RoiyAk, Jun 3, 2013.

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


    I make a new metiral for the clock but i want a new item. (new clock with new name)
    I do not know how to do it.

    One more thing I want to make plugin to teleport two people at random.
    player one type /tp req <name> and player tow type /tp accept.

    Can anyone help me?
    Thank you!
  2. Offline


    I have many errors:

    Code (Text):
    1. package BookTelepot;
    3. import java.util.ArrayList;
    4. import java.util.logging.Logger;
    5. import;
    6. import org.bukkit.ChatColor;
    7. import org.bukkit.Location;
    8. import org.bukkit.Material;
    9. import org.bukkit.World;
    10. import org.bukkit.command.Command;
    11. import org.bukkit.command.CommandSender;
    12. import;
    13. import org.bukkit.entity.Player;
    14. import org.bukkit.event.inventory.PrepareItemCraftEvent;
    15. import org.bukkit.inventory.ItemStack;
    16. import org.bukkit.inventory.meta.ItemMeta;
    17. public class BookTelepot extends JavaPlugin
    18. {
    19.     private static final World World = null;
    20.     public final Logger log = Logger.getLogger("minecraft");
    21.     public static BookTelepot plugin;
    22.         public void onEnable()
    23.         {
    24.   "Hello");
    25.         }
    26.         public void onDisable() {
    27.   "Gosa Is BH");
    28.         }
    30.         ItemStack item = new ItemStack(Material.GOLDENHOE);
    31.         ItemMeta meta = item.getItemMeta();
    32.         meta.setDisplayName("LockPick");
    33.         ArrayList<String> description = new ArrayList<String>();
    34.         description.add("Test");
    35.         meta.setLore(description);
    36.         item.setItemMeta(meta);
    37.         player.getInventory().addItem(item);
    38.       }
    You can fix it for me please?
  3. RoiyAk it's Material.GOLD_HOE.
  4. Offline


    It is still with errors.
    Can you get me the full code?


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 2, 2016
  5. Offline

    timtower Ninja on the waves Moderator

    RoiyAk You are creating things outside an function, it is useful if you have an player to add items to
Thread Status:
Not open for further replies.

Share This Page