mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Fix /tp <target> acting like /tphere
This commit is contained in:
1 parent
9d004cf38c
commit
a0ce0dc52a
1 file changed
+6
-4
@@ -339,10 +339,12 @@ public class TpCommand extends CommandBase {
|
||||
}
|
||||
case "<target>" -> {
|
||||
target = inputArgument;
|
||||
if (inputExecutor instanceof Player playerExecutor) {
|
||||
if (NameAutoCompleter.getAutoCompletedName(target).equalsIgnoreCase(playerExecutor.getName()) && tpHereTarget != null) {
|
||||
TpHereCommand.executeTpHere(playerExecutor, tpHereTarget);
|
||||
return HandlerResponse.CANNOT_HANDLE_HANDLED_BY_TP_HERE;
|
||||
if (arguments.length == 2) {
|
||||
if (inputExecutor instanceof Player playerExecutor) {
|
||||
if (NameAutoCompleter.getAutoCompletedName(target).equalsIgnoreCase(playerExecutor.getName()) && tpHereTarget != null) {
|
||||
TpHereCommand.executeTpHere(playerExecutor, tpHereTarget);
|
||||
return HandlerResponse.CANNOT_HANDLE_HANDLED_BY_TP_HERE;
|
||||
}
|
||||
}
|
||||
}
|
||||
return HandlerResponse.CAN_HANDLE;
|
||||
|
||||
Reference in new issue
Block a user