xpertx2

make me make a command for pmine people like pmine.<pminenumber> then it will give the person permission to the pmine that is given permission to teleport to

Kodari AI
KodariJul 5 at 10:50 am 1

I’ll create a private mines plugin with permission-based teleportation.

PrivateMines
A private mine plugin that lets players access and teleport to personal numbered mines. Running /pmine &lt;number&gt; grants the player permission and teleports them to that private mine. Supports configurable mine locations, permission-based access control with internal tracking, and admin management commands for granting, revoking, and configuring mines.

Done. Here’s what was created:

/pmine <number> — The core command. Running /pmine 1 will:

  1. Check if mine #1 is configured

  2. Grant the player access to mine #1 (via internal data.yml tracking)

  3. Teleport them to the mine location

Admin commands:

  • /pmine set <number> — Sets the mine teleport location at your current position (requires pmine.admin)

  • /pmine grant <player> <number> — Grant a player access to a mine

  • /pmine revoke <player> <number> — Revoke a player’s access

  • /pmine info [player] — List which mines a player has access to

Access checking checks both Bukkit permission nodes (pmine.access.<number>, pmine.access.*) and the plugin’s internal data.yml tracking — so it works with both permission plugins and standalone.

xpertx2

make it not give perms to the player only when admin gives the perms manually with lp and then they can teleport to the cirtain mine that they bought

Kodari AI
KodariJul 5 at 10:54 am 2

Three changes: remove auto-grant, remove internal data.yml tracking, only check LP permissions.

Now I’ll remove the unused grant/revoke/info subcommands from the command and the dead methods from MineManager.

Clean. Here’s how it works now:

  • /pmine <number> — checks if mine is configured → checks permission node pmine.access.<number> (set via LuckPerms) → teleports or denies

  • /pmine set <number> — admin command to set a mine location (requires pmine.admin)

No auto-granting, no internal access tracking. Admins give the permission node pmine.access.1, pmine.access.2, etc. via LuckPerms. Players can then /pmine 1 to teleport. If they don’t have the node, they get a “no permission” message.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
6 298
src/main/java/com/example/privatemines/PrivateMinesPlugin.java
package com.example.privatemines;

import com.example.privatemines.commands.PmineCommand;
import com.example.privatemines.managers.MineManager;
import org.bukkit.plugin.java.JavaPlugin;

public class PrivateMinesPlugin extends JavaPlugin {

    private MineManager mineManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("config.yml", false);

        this.mineManager = new MineManager(this);

        getCommand("pmine").setExecutor(new PmineCommand(this));

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

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

    public MineManager getMineManager() {
        return mineManager;
    }
}