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
@@ -2,6 +2,7 @@ package me.william278.huskhomes2.commands;
|
||||
|
||||
import me.william278.huskhomes2.MessageManager;
|
||||
import me.william278.huskhomes2.teleport.TeleportRequestHandler;
|
||||
import me.william278.huskhomes2.util.NameAutoCompleter;
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
@@ -11,7 +12,7 @@ public class TpaHereCommand extends CommandBase {
|
||||
protected void onCommand(Player p, Command command, String label, String[] args) {
|
||||
if (args.length == 1) {
|
||||
String targetPlayer = args[0];
|
||||
TeleportRequestHandler.sendTeleportHereRequest(p, targetPlayer);
|
||||
TeleportRequestHandler.sendTeleportHereRequest(p, NameAutoCompleter.getAutoCompletedName(targetPlayer));
|
||||
} else {
|
||||
MessageManager.sendMessage(p, "error_invalid_syntax", command.getUsage());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user