mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 14:38:52 +00:00
Add player name auto-completion, Close #105
This commit is contained in:
1 parent
830a7443b9
commit
8a1cc15d1d
7 files changed
+58
-4
No files matched your search
@@ -3,6 +3,7 @@ package me.william278.huskhomes2.commands;
|
||||
import me.william278.huskhomes2.HuskHomes;
|
||||
import me.william278.huskhomes2.MessageManager;
|
||||
import me.william278.huskhomes2.teleport.TeleportManager;
|
||||
import me.william278.huskhomes2.util.NameAutoCompleter;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.entity.Player;
|
||||
@@ -21,7 +22,7 @@ public class TpHereCommand extends CommandBase {
|
||||
String targetPlayer = args[0];
|
||||
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
|
||||
try (Connection connection = HuskHomes.getConnection()) {
|
||||
TeleportManager.teleportHere(p, targetPlayer, connection);
|
||||
TeleportManager.teleportHere(p, NameAutoCompleter.getAutoCompletedName(targetPlayer), connection);
|
||||
} catch (SQLException e) {
|
||||
plugin.getLogger().log(Level.SEVERE, "An SQL exception occurred using /tphere");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user