<commit_before>package org.royaldev.royalcommands.rcommands;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.royaldev.royalcommands.RUtils;
import org.royaldev.royalcommands.RoyalCommands;

public class TpAccept implements CommandExecutor {

    RoyalCommands plugin;

    public TpAccept(RoyalCommands plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender cs, Command cmd, String label,
                             String[] args) {
        if (cmd.getName().equalsIgnoreCase("tpaccept")) {
            if (!plugin.isAuthorized(cs, "rcmds.tpaccept")) {
                RUtils.dispNoPerms(cs);
                return true;
            }
            if (!(cs instanceof Player)) {
                cs.sendMessage(ChatColor.RED + "This command is only available to players!");
                return true;
            }
            Player p = (Player) cs;
            if (TeleportRequest.tprdb.containsKey(cs)) {
                Player t = (Player) TeleportRequest.tprdb.get(cs);
                cs.sendMessage(ChatColor.BLUE + "Teleport request accepted.");
                t.sendMessage(ChatColor.BLUE + "Your teleport request was accepted.");
                Back.backdb.put(t, t.getLocation());
                t.teleport(p.getLocation());
                return true;
            }
            if (TeleportRequestHere.tprhdb.containsKey(cs)) {
                Player t = (Player) TeleportRequestHere.tprhdb.get(cs);
                cs.sendMessage(ChatColor.BLUE + "Teleport request accepted.");
                t.sendMessage(ChatColor.BLUE + "Your teleport request was accepted.");
                Back.backdb.put(((Player) cs), ((Player) cs).getLocation());
                p.teleport(t.getLocation());
                return true;
            }
            cs.sendMessage(ChatColor.RED + "You have no requests pending.");
            return true;
        }
        return false;
    }
}
<commit_msg>Fixed: /tpa and /tpahere glitch - /tpaccept<commit_after>package org.royaldev.royalcommands.rcommands;

import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.royaldev.royalcommands.RUtils;
import org.royaldev.royalcommands.RoyalCommands;

public class TpAccept implements CommandExecutor {

    RoyalCommands plugin;

    public TpAccept(RoyalCommands plugin) {
        this.plugin = plugin;
    }

    @Override
    public boolean onCommand(CommandSender cs, Command cmd, String label,String[] args) {
        if (cmd.getName().equalsIgnoreCase("tpaccept")) {
            if (!plugin.isAuthorized(cs, "rcmds.tpaccept")) {
                RUtils.dispNoPerms(cs);
                return true;
            }
            if (!(cs instanceof Player)) {
                cs.sendMessage(ChatColor.RED + "This command is only available to players!");
                return true;
            }
            Player p = (Player) cs;
            if (TeleportRequest.tprdb.containsKey(cs)) {
                Player t = (Player) TeleportRequest.tprdb.get(cs);
                cs.sendMessage(ChatColor.BLUE + "Teleport request accepted.");
                t.sendMessage(ChatColor.BLUE + "Your teleport request was accepted.");
                Back.backdb.put(t, t.getLocation());
                t.teleport(p.getLocation());
                TeleportRequest.tprdb.remove(cs);
                return true;
            }
            if (TeleportRequestHere.tprhdb.containsKey(cs)) {
                Player t = (Player) TeleportRequestHere.tprhdb.get(cs);
                cs.sendMessage(ChatColor.BLUE + "Teleport request accepted.");
                t.sendMessage(ChatColor.BLUE + "Your teleport request was accepted.");
                Back.backdb.put(((Player) cs), ((Player) cs).getLocation());
                p.teleport(t.getLocation());
                TeleportRequestHere.tprhdb.remove(cs);
                return true;
            }
            cs.sendMessage(ChatColor.RED + "You have no requests pending.");
            return true;
        }
        return false;
    }
}

{'fraction_non_alphanumeric': 0.10811439200186003, 'fraction_numerical': 0.0, 'mean_word_length': 2.0882986360373295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '823347', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1164, 'n_words': 244}