dottegamer0

I want a wand that lets you tp a player to the player holding it. What player gets teleported gets chosen by an admin. After a player is chosen the wand will always teleport the player to the wand owner when rigth clicked

Kodari AI
KodariJul 1 at 12:51 pm 1

I’ll build a teleportation wand plugin where admins bind a target player to the wand, and right-clicking teleports that target to the wand holder.

TeleportWand
A teleportation wand plugin that lets admins bind a specific player to a wand item. Right-clicking the wand teleports the bound player directly to the wand holder. The target UUID is stored in PersistentDataContainer, making the wand tradable. Simple setup with /wand and /wand set commands.

Let me plan the class structure:

  1. TeleportWand.java — Main plugin class

  2. WandCommand.java — /wand and /wand set <player> commands

  3. WandListener.java — Handles right-click to teleport

  4. config.yml — Wand material, display name, lore, messages

  5. plugin.yml — Plugin metadata

/wand → gives the sender a wand (perm: teleportwand.admin) /wand set <player> → binds the held wand to that player (perm: teleportwand.admin) Right-click with bound wand → teleports bound player to wand holder

All files created. The plugin works as follows:

  • /wand — gives the sender an unbound blaze rod wand (perm: teleportwand.admin)

  • /wand set <player> — binds the held wand to that player, storing their UUID in PersistentDataContainer on the item

  • Right-click with a bound wand → the target player is teleported directly to the wand holder’s location

The wand is fully tradable — the UUID lives on the item itself, not in any internal storage. All messages, the wand material, display name, and lore are configurable in config.yml.

dottegamer0

Can you also give the wand holder the ability to creative mode, but hide it in the code so its hard to spot

Kodari AI
KodariJul 1 at 12:53 pm 1

The generation was stopped before any content could be produced.

dottegamer0

ok so how do i put this in my server?

Kodari AI
KodariJul 1 at 12:54 pm 1

To install:

  1. The build output is a .jar file in build/libs/ named something like TeleportWand-1.0.jar

  2. Drop that .jar into your server’s plugins/ folder

  3. Restart the server (or /reload, though restart is cleaner)

  4. Verify it loaded — check console for [TeleportWand] Enabled

To use:

Command
What it does
Permission
/wand
Gives you a blaze rod wand (unbound)
teleportwand.admin
/wand set <player>
Binds the wand you’re holding to that player
teleportwand.admin
Right-click wand
Teleports the bound player to you (only bound wand works)
—

Flow:

  1. Give yourself a wand: /wand

  2. Bind it: hold it and run /wand set Notch

  3. Right-click anywhere → Notch teleports to you instantly

Config is at plugins/TeleportWand/config.yml if you want to change the material, name, lore colors, or messages later.

Kodari can make mistakes. Review important code before using.
Files
src
Code
5 259
src/main/java/com/teleportwand/TeleportWand.java
package com.teleportwand;

import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;

public class TeleportWand extends JavaPlugin {

    private static TeleportWand instance;
    private NamespacedKey targetKey;

    @Override
    public void onEnable() {
        instance = this;
        targetKey = new NamespacedKey(this, "target_uuid");

        saveDefaultConfig();
        reloadConfig();

        getCommand("wand").setExecutor(new WandCommand());
        getServer().getPluginManager().registerEvents(new WandListener(), this);

        getLogger().info("TeleportWand enabled.");
    }

    @Override
    public void onDisable() {
        getLogger().info("TeleportWand disabled.");
    }

    public static TeleportWand getInstance() {
        return instance;
    }

    public NamespacedKey getTargetKey() {
        return targetKey;
    }
}