4ndraselectric

Develop a comprehensive TPA (Teleport Ask) and Friends plugin for Paper that includes commands such as /tpa, /tpahere, and /tpaccept, allowing players to request teleportation to each other. Integrate a user-friendly in-game GUI for managing friends, where players can easily add friends and set auto-accept options for specific friends or all friends. Additionally, implement a /home command with configurable settings that enable players to invite friends to their homes, alongside a configuration file for adjusting parameters like maximum homes, maximum friends, and other customizable features.

Kodari AI
KodariSep 22 at 8:59 pm 13
TeleportCompanion
A comprehensive Paper plugin combining TPA and friend management. Players use /tpa, /tpahere, and /tpaccept to request and accept teleportation. An in-game GUI manages friends, allowing add/remove and per-friend or global auto-accept settings. A /home system supports configurable max homes and friend invitations to homes. Configuration file adjusts maximum homes, maximum friends, teleport request timeouts, and other customizable parameters for full server control.
  1. Create the Paper plugin, configuration, and persistent player data.

  2. Add TPA requests, friendships, per-friend auto-accept, and the friends GUI.

  3. Add configurable homes and friend-only home invitations.

Created the Paper TPA and Friends plugin with /tpa, /tpahere, /tpaccept, and /tpdeny; friendship requests and a paginated friends GUI; per-friend or all-friends auto-accept; and configurable homes with friend invitations. Player data is saved across restarts.

The project files are in place, but the plugin has not been compiled or tested in a Paper server.

4ndraselectric

does it work on paper

Kodari AI
KodariSep 22 at 9:03 pm 2

Not as a standalone build yet. It targets Paper 1.21.4 with Java 21, but FriendsMenu uses XSeries and build.gradle does not declare it, so a standard Gradle build needs that dependency supplied. I also haven’t compiled or tested the plugin on a Paper server, so I can’t confirm it works in-game.

4ndraselectric

can you make it work on 26.2

Kodari AI
KodariSep 22 at 9:03 pm 1

Yes, I can update it for Paper 26.2, but I won’t change any code while this is chat-only. Do you mean Minecraft/Paper 1.26.2, or a Paper build numbered 26.2?

4ndraselectric

i mean mineacraft version 26.2

Kodari AI
KodariSep 22 at 9:04 pm 1

You mean Minecraft 26.2, running a matching Paper 26.2 server. The plugin currently targets Paper 1.21.4, so I can’t confirm it works on 26.2. It would need its API and build settings updated, then a build and in-game test. I won’t change any files while this is chat-only.

4ndraselectric

make it work on 26.2

Kodari AI
KodariSep 22 at 9:05 pm 13

I’ll check Paper’s published 26.2 API and Java requirements, then update the build and plugin metadata for that version.

Paper publishes a stable 26.2 API and requires Java 25. I’ll target that API, update XSeries to a release that supports 26.2, and have Paper load it at runtime so the friends GUI can open.

Updated the plugin to target Paper 26.2: the build now uses the 26.2 API and Java 25, plugin.yml declares api-version: '26.2', and XSeries is updated to a release with 26.2 support and configured to load at runtime.

I couldn’t compile or run it on a Paper server here, so in-game compatibility is not yet verified.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
10 908
src/main/java/com/kodari/tpafriends/TpaFriendsPlugin.java
package com.kodari.tpafriends;

import org.bukkit.ChatColor;
import org.bukkit.command.PluginCommand;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public final class TpaFriendsPlugin extends JavaPlugin {
    private ProfileStore profiles;
    private FriendService friends;
    private TeleportService teleports;
    private FriendsMenu menu;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        profiles = new ProfileStore(this);
        friends = new FriendService(this, profiles);
        teleports = new TeleportService(this, profiles);
        menu = new FriendsMenu(this, profiles, friends);
        PluginCommands commands = new PluginCommands(this, profiles, friends, teleports, menu);
        for (String name : new String[] {"tpa", "tpahere", "tpaccept", "tpdeny", "friend", "friends",
                "home", "homes", "sethome", "delhome", "homeinvite", "homeuninvite"}) {
            PluginCommand command = getCommand(name);
            if (command != null) {
                command.setExecutor(commands);
                command.setTabCompleter(commands);
            }
        }
        getServer().getPluginManager().registerEvents(menu, this);
    }

    public void tell(Player player, String message) {
        player.sendMessage(ChatColor.translateAlternateColorCodes('&', "&6[TpaFriends] &r" + message));
    }
}