From aec6fdfa8937b4c4ca0554aeee5bfe5aa6b99bba Mon Sep 17 00:00:00 2001 From: William Date: Thu, 31 Oct 2024 11:05:00 +0000 Subject: [PATCH] fix: `/tpaall` command not being registered Also removes the now disused DisabledCommand --- .../huskhomes/command/CommandProvider.java | 1 + .../huskhomes/command/DisabledCommand.java | 45 ------------------- common/src/main/resources/locales/bg-bg.yml | 1 - common/src/main/resources/locales/de-de.yml | 1 - common/src/main/resources/locales/en-gb.yml | 1 - common/src/main/resources/locales/es-es.yml | 1 - common/src/main/resources/locales/fr-fr.yml | 1 - common/src/main/resources/locales/it-it.yml | 1 - common/src/main/resources/locales/ja-jp.yml | 1 - common/src/main/resources/locales/ko-kr.yml | 1 - common/src/main/resources/locales/pl-pl.yml | 1 - common/src/main/resources/locales/pt-br.yml | 1 - common/src/main/resources/locales/ru-ru.yml | 1 - common/src/main/resources/locales/tr-tr.yml | 1 - common/src/main/resources/locales/uk-ua.yml | 1 - common/src/main/resources/locales/vi-vn.yml | 1 - common/src/main/resources/locales/zh-cn.yml | 1 - common/src/main/resources/locales/zh-tw.yml | 1 - 18 files changed, 1 insertion(+), 61 deletions(-) delete mode 100644 common/src/main/java/net/william278/huskhomes/command/DisabledCommand.java diff --git a/common/src/main/java/net/william278/huskhomes/command/CommandProvider.java b/common/src/main/java/net/william278/huskhomes/command/CommandProvider.java index ca19ab09..cd11004a 100644 --- a/common/src/main/java/net/william278/huskhomes/command/CommandProvider.java +++ b/common/src/main/java/net/william278/huskhomes/command/CommandProvider.java @@ -104,6 +104,7 @@ default void loadCommands() { commands.add(new TpRequestCommand(getPlugin(), TeleportRequest.Type.TPA_HERE)); commands.add(new TpRespondCommand(getPlugin(), true)); commands.add(new TpRespondCommand(getPlugin(), false)); + commands.add(new TpaAllCommand(getPlugin())); commands.add(new RtpCommand(getPlugin())); commands.add(new TpIgnoreCommand(getPlugin())); commands.add(new TpOfflineCommand(getPlugin())); diff --git a/common/src/main/java/net/william278/huskhomes/command/DisabledCommand.java b/common/src/main/java/net/william278/huskhomes/command/DisabledCommand.java deleted file mode 100644 index 20d5c3af..00000000 --- a/common/src/main/java/net/william278/huskhomes/command/DisabledCommand.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of HuskHomes, licensed under the Apache License 2.0. - * - * Copyright (c) William278 - * Copyright (c) contributors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.william278.huskhomes.command; - -import net.william278.huskhomes.HuskHomes; -import net.william278.huskhomes.user.CommandUser; -import org.jetbrains.annotations.NotNull; - -import java.util.List; - -public class DisabledCommand extends Command { - - public DisabledCommand(@NotNull String name, @NotNull HuskHomes plugin) { - super( - List.of(name), - "", - plugin - ); - setOperatorCommand(true); - } - - @Override - public void execute(@NotNull CommandUser executor, @NotNull String[] args) { - plugin.getLocales().getLocale("error_command_disabled") - .ifPresent(executor::sendMessage); - } - -} diff --git a/common/src/main/resources/locales/bg-bg.yml b/common/src/main/resources/locales/bg-bg.yml index 44635151..3fa73498 100644 --- a/common/src/main/resources/locales/bg-bg.yml +++ b/common/src/main/resources/locales/bg-bg.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Грешка:](#ff3300) [Не можахме да открием играча %1%.](#ff7e5e)' error_rtp_restricted_world: '[Error:](#ff3300) [You cannot randomly teleport in this world.](#ff7e5e)' error_on_cooldown: '[Error:](#ff3300) [You must wait %1% before doing that again.](#ff7e5e)' - error_command_disabled: '[Грешка:](#ff3300) [Тази команда е изключена!](#ff7e5e)' error_console_command_only: '[Error:](#ff3300) [That command can only be run from the server console.](#ff7e5e)' error_rtp_randomization_timeout: '[Грешка:](#ff3300) [Провалихме се да намерим безопасна локация на случаен принцип, до която да Ви телепортираме.](#ff7e5e)' error_invalid_world: '[Error:](#ff3300) [Failed to finish teleportation as the target world could not be found.](#ff7e5e)' diff --git a/common/src/main/resources/locales/de-de.yml b/common/src/main/resources/locales/de-de.yml index d4635839..5e2cc1d3 100644 --- a/common/src/main/resources/locales/de-de.yml +++ b/common/src/main/resources/locales/de-de.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Fehler:](#ff3300) [Der Spieler %1% konnte nicht gefunden werden.](#ff7e5e)' error_rtp_restricted_world: '[Fehler:](#ff3300) [Du kannst dich in dieser Welt nicht zufällig teleportieren.](#ff7e5e)' error_on_cooldown: '[Fehler:](#ff3300) [Du musst %1% warten, bevor du dies wieder tun kannst.](#ff7e5e)' - error_command_disabled: '[Fehler:](#ff3300) [Dieser Befehl ist deaktiviert!](#ff7e5e)' error_console_command_only: '[Fehler:](#ff3300) [Dieser Befehl kann nur von der Serverkonsole aus ausgeführt werden.](#ff7e5e)' error_rtp_randomization_timeout: '[Fehler:](#ff3300) [Es ist nicht gelungen, einen sicheren zufälligen Ort zu finden um dich zu teleportieren.](#ff7e5e)' error_invalid_world: '[Fehler:](#ff3300) [Die Teleportation konnte nicht beendet werden, da die Zielwelt nicht gefunden werden konnte.](#ff7e5e)' diff --git a/common/src/main/resources/locales/en-gb.yml b/common/src/main/resources/locales/en-gb.yml index e192e78e..6ab6a817 100644 --- a/common/src/main/resources/locales/en-gb.yml +++ b/common/src/main/resources/locales/en-gb.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Error:](#ff3300) [Could not find the player %1%.](#ff7e5e)' error_rtp_restricted_world: '[Error:](#ff3300) [You cannot randomly teleport in this world.](#ff7e5e)' error_on_cooldown: '[Error:](#ff3300) [You must wait %1% before doing that again.](#ff7e5e)' - error_command_disabled: '[Error:](#ff3300) [That command is disabled!](#ff7e5e)' error_console_command_only: '[Error:](#ff3300) [That command can only be run from the server console.](#ff7e5e)' error_rtp_randomization_timeout: '[Error:](#ff3300) [Failed to find a safe random location to teleport you.](#ff7e5e)' error_invalid_world: '[Error:](#ff3300) [Failed to finish teleportation as the target world could not be found.](#ff7e5e)' diff --git a/common/src/main/resources/locales/es-es.yml b/common/src/main/resources/locales/es-es.yml index af96473e..89fee0b4 100644 --- a/common/src/main/resources/locales/es-es.yml +++ b/common/src/main/resources/locales/es-es.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Error:](#ff3300) [No se ha podido encontrar el jugador %1%.](#ff7e5e)' error_rtp_restricted_world: '[Error:](#ff3300) [No puedes teletransportarte al azar en este mundo.](#ff7e5e)' error_on_cooldown: '[Error:](#ff3300) [You must wait %1% before doing that again.](#ff7e5e)' - error_command_disabled: '[Error:](#ff3300) [Ese comando está desactivado.](#ff7e5e)' error_console_command_only: '[Error:](#ff3300) [Ese comando sólo se puede ejecutar desde la consola del servidor.](#ff7e5e)' error_rtp_randomization_timeout: '[Error:](#ff3300) [No se ha podido encontrar una ubicación aleatoria segura para teletransportarte...](#ff7e5e)' error_invalid_world: '[Error:](#ff3300) [No se ha encontrado el mundo de destino.](#ff7e5e)' diff --git a/common/src/main/resources/locales/fr-fr.yml b/common/src/main/resources/locales/fr-fr.yml index 23f5cc15..a76a421c 100644 --- a/common/src/main/resources/locales/fr-fr.yml +++ b/common/src/main/resources/locales/fr-fr.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Erreur :](#ff3300) [Le joueur %1% est introuvable.](#ff7e5e)' error_rtp_restricted_world: '[Erreur :](#ff3300) [Vous ne pouvez pas vous téléporter aléatoirement dans ce monde.](#ff7e5e)' error_on_cooldown: '[Erreur :](#ff3300) [Vous devez attendre %1% avant de refaire ça.](#ff7e5e)' - error_command_disabled: '[Erreur :](#ff3300) [Cette commmande est désactivé !](#ff7e5e)' error_console_command_only: '[Erreur :](#ff3300) [Cette commande ne peux être executé que depuis la console.](#ff7e5e)' error_rtp_randomization_timeout: '[Erreur :](#ff3300) [Echec de la téléportation aléatoire. Aucune position sécurisé trouvé.](#ff7e5e)' error_invalid_world: '[Erreur :](#ff3300) [Echec durant la téléportation : le monde visé n''a pas été trouvé.](#ff7e5e)' diff --git a/common/src/main/resources/locales/it-it.yml b/common/src/main/resources/locales/it-it.yml index 69559899..165ebdca 100644 --- a/common/src/main/resources/locales/it-it.yml +++ b/common/src/main/resources/locales/it-it.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Errore:](#ff3300) [Non trovo il giocatore: %1%.](#ff7e5e)' error_rtp_restricted_world: '[Errore:](#ff3300) [Non puoi teletrasportarti randomicamente in questo mondo.](#ff7e5e)' error_on_cooldown: '[Error:](#ff3300) [You must wait %1% before doing that again.](#ff7e5e)' - error_command_disabled: '[Errore:](#ff3300) [Questo comando è disabilitato!](#ff7e5e)' error_console_command_only: '[Errore:](#ff3300) [Quel comando può essere eseguito solo da console.](#ff7e5e)' error_rtp_randomization_timeout: '[Errore:](#ff3300) [Non sono riuscito a trovare una posizione sicura, riprova.](#ff7e5e)' error_invalid_world: '[Errore:](#ff3300) [Teletrasporto fallito! Il mondo non è stato trovato.](#ff7e5e)' diff --git a/common/src/main/resources/locales/ja-jp.yml b/common/src/main/resources/locales/ja-jp.yml index ec3eea4a..42af374c 100644 --- a/common/src/main/resources/locales/ja-jp.yml +++ b/common/src/main/resources/locales/ja-jp.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[エラー:](#ff3300) [プレイヤー %1% が見つかりませんでした。](#ff7e5e)' error_rtp_restricted_world: '[エラー:](#ff3300) [このワールドでは、ランダムテレポートはできません。](#ff7e5e)' error_on_cooldown: '[Error:](#ff3300) [You must wait %1% before doing that again.](#ff7e5e)' - error_command_disabled: '[エラー:](#ff3300) [そのコマンドは無効です!](#ff7e5e)' error_console_command_only: '[エラー:](#ff3300) [そのコマンドはサーバーコンソールからしか実行できません。](#ff7e5e)' error_rtp_randomization_timeout: '[エラー:](#ff3300) [テレポートする安全なランダムな座標を見つけるのに失敗しました。](#ff7e5e)' error_invalid_world: '[エラー:](#ff3300) [指定したワールドが見つからなかったため、テレポートの終了に失敗しました。](#ff7e5e)' diff --git a/common/src/main/resources/locales/ko-kr.yml b/common/src/main/resources/locales/ko-kr.yml index da98630c..8ffbff52 100644 --- a/common/src/main/resources/locales/ko-kr.yml +++ b/common/src/main/resources/locales/ko-kr.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[오류:](#ff3300) [%1%님을 찾을 수 없습니다.](#ff7e5e)' error_rtp_restricted_world: '[오류:](#ff3300) [이 세계에서는 랜덤 이동할 수 없습니다.](#ff7e5e)' error_on_cooldown: '[오류:](#ff3300) [다시 하기 위해서는 %1%를 기다려야 합니다.](#ff7e5e)' - error_command_disabled: '[오류:](#ff3300) [이 명령어는 비활성화 되어 있습니다!](#ff7e5e)' error_console_command_only: '[오류:](#ff3300) [이 명령어는 콘솔에서만 실행할 수 있습니다.](#ff7e5e)' error_rtp_randomization_timeout: '[오류:](#ff3300) [이동할 안전한 위치를 찾지 못하였습니다.](#ff7e5e)' error_invalid_world: '[오류:](#ff3300) [목표 세계를 찾을 수 없어 이동에 실패하였습니다.](#ff7e5e)' diff --git a/common/src/main/resources/locales/pl-pl.yml b/common/src/main/resources/locales/pl-pl.yml index 170818b3..1a695878 100644 --- a/common/src/main/resources/locales/pl-pl.yml +++ b/common/src/main/resources/locales/pl-pl.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Błąd:](#ff3300) [Nie można znaleźć gracza %1%.](#ff7e5e)' error_rtp_restricted_world: '[Błąd:](#ff3300) [Nie możesz losowo teleportować się w tej krainie.](#ff7e5e)' error_on_cooldown: '[Błąd:](#ff3300) [Musisz poczekać %1% przed kolejnym próbą.](#ff7e5e)' - error_command_disabled: '[Błąd:](#ff3300) [Ta komenda jest wyłączona!](#ff7e5e)' error_console_command_only: '[Błąd:](#ff3300) [Tą komendę można wykonać tylko z konsoli serwera.](#ff7e5e)' error_rtp_randomization_timeout: '[Błąd:](#ff3300) [Nie udało się znaleźć bezpiecznej losowej lokalizacji do teleportacji.](#ff7e5e)' error_invalid_world: '[Błąd:](#ff3300) [Nie udało się zakończyć teleportacji, ponieważ docelowa kraina nie mogła zostać znaleziona.](#ff7e5e)' diff --git a/common/src/main/resources/locales/pt-br.yml b/common/src/main/resources/locales/pt-br.yml index ca545bff..cda20abc 100644 --- a/common/src/main/resources/locales/pt-br.yml +++ b/common/src/main/resources/locales/pt-br.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Erro:](#ff3300) [Não foi possível encontrar o jogador %1%.](#ff7e5e)' error_rtp_restricted_world: '[Erro:](#ff3300) [Você não pode se teleportar aleatoriamente neste mundo.](#ff7e5e)' error_on_cooldown: '[Erro:](#ff3300) [Você deve esperar %1% antes de fazer isso novamente.](#ff7e5e)' - error_command_disabled: '[Erro:](#ff3300) [Esse comando está desativado!](#ff7e5e)' error_console_command_only: '[Erro:](#ff3300) [Esse comando só pode ser executado pelo console do servidor.](#ff7e5e)' error_rtp_randomization_timeout: '[Erro:](#ff3300) [Falha ao encontrar uma localização aleatória segura para teletransporte.](#ff7e5e)' error_invalid_world: '[Erro:](#ff3300) [Falha ao concluir o teleporte pois o mundo alvo não foi encontrado.](#ff7e5e)' diff --git a/common/src/main/resources/locales/ru-ru.yml b/common/src/main/resources/locales/ru-ru.yml index 29e34f3b..dd890b55 100644 --- a/common/src/main/resources/locales/ru-ru.yml +++ b/common/src/main/resources/locales/ru-ru.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Ошибка:](#ff3300) [Не удалось найти игрока %1%.](#ff7e5e)' error_rtp_restricted_world: '[Ошибка:](#ff3300) [Вы не можете случайно телепортироваться в этот мир.](#ff7e5e)' error_on_cooldown: '[Ошибка:](#ff3300) [Подождите %1% перед повторным выполнением данного действия.](#ff7e5e)' - error_command_disabled: '[Ошибка:](#ff3300) [Эта команда отключена!](#ff7e5e)' error_console_command_only: '[Ошибка:](#ff3300) [Эту команду можно выполнить только из консоли сервера.](#ff7e5e)' error_rtp_randomization_timeout: '[Ошибка:](#ff3300) [Не удалось найти безопасное случайное местоположение для телепортации.](#ff7e5e)' error_invalid_world: '[Ошибка:](#ff3300) [Не удалось завершить телепортацию, так как целевой мир не найден.](#ff7e5e)' diff --git a/common/src/main/resources/locales/tr-tr.yml b/common/src/main/resources/locales/tr-tr.yml index de27762d..28d9fca3 100644 --- a/common/src/main/resources/locales/tr-tr.yml +++ b/common/src/main/resources/locales/tr-tr.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Hata:](#ff3300) [%1% adlı oyuncu bulunamadı.](#ff7e5e)' error_rtp_restricted_world: '[Hata:](#ff3300) [Bu dünyada rastgele ışınlanamazsınız.](#ff7e5e)' error_on_cooldown: '[Hata:](#ff3300) [Tekrar yapmadan önce %1% beklemelisiniz.](#ff7e5e)' - error_command_disabled: '[Hata:](#ff3300) [Bu komut devre dışı!](#ff7e5e)' error_console_command_only: '[Hata:](#ff3300) [Bu komut yalnızca sunucu konsolundan çalıştırılabilir.](#ff7e5e)' error_rtp_randomization_timeout: '[Hata:](#ff3300) [Sizi ışınlamak için güvenli bir rasgele konum bulunamadı.](#ff7e5e)' error_invalid_world: '[Hata:](#ff3300) [Hedef dünya bulunamadığından ışınlanma tamamlanamadı.](#ff7e5e)' diff --git a/common/src/main/resources/locales/uk-ua.yml b/common/src/main/resources/locales/uk-ua.yml index 16cb89f2..2e4d7fb7 100644 --- a/common/src/main/resources/locales/uk-ua.yml +++ b/common/src/main/resources/locales/uk-ua.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Помилка:](#ff3300) [Не вдалося знайти гравця %1%.](#ff7e5e)' error_rtp_restricted_world: '[Error:](#ff3300) [You cannot randomly teleport in this world.](#ff7e5e)' error_on_cooldown: '[Error:](#ff3300) [You must wait %1% before doing that again.](#ff7e5e)' - error_command_disabled: '[Помилка:](#ff3300) [Ця команда вимкнена!](#ff7e5e)' error_console_command_only: '[Error:](#ff3300) [That command can only be run from the server console.](#ff7e5e)' error_rtp_randomization_timeout: '[Помилка:](#ff3300) [Не вдалося знайти випадкове безпечне місце, щоб вас телепортувати.](#ff7e5e)' error_invalid_world: '[Error:](#ff3300) [Failed to finish teleportation as the target world could not be found.](#ff7e5e)' diff --git a/common/src/main/resources/locales/vi-vn.yml b/common/src/main/resources/locales/vi-vn.yml index b8bf0f31..7e14d060 100644 --- a/common/src/main/resources/locales/vi-vn.yml +++ b/common/src/main/resources/locales/vi-vn.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[Lỗi:](#ff3300) [Không thể tìm thấy người chơi %1%.](#ff7e5e)' error_rtp_restricted_world: '[Lỗi:](#ff3300) [Bạn không thể dịch chuyển ngẫu nhiên trong thế giới này.](#ff7e5e)' error_on_cooldown: '[Lỗi:](#ff3300) [Bạn phải đợi %1% trước khi làm lại điều đó.](#ff7e5e)' - error_command_disabled: '[Lỗi:](#ff3300) [Lệnh này đã bị vô hiệu hóa!](#ff7e5e)' error_console_command_only: '[Lỗi:](#ff3300) [Lệnh đó chỉ có thể được dùng từ bảng điều khiển máy chủ.](#ff7e5e)' error_rtp_randomization_timeout: '[Lỗi:](#ff3300) [Không tìm được vị trí ngẫu nhiên an toàn để dịch chuyển bạn.](#ff7e5e)' error_invalid_world: '[Lỗi:](#ff3300) [Không thể hoàn thành dịch chuyển vì không thể tìm thấy thế giới được chỉ định.](#ff7e5e)' diff --git a/common/src/main/resources/locales/zh-cn.yml b/common/src/main/resources/locales/zh-cn.yml index f03c523b..4739959a 100644 --- a/common/src/main/resources/locales/zh-cn.yml +++ b/common/src/main/resources/locales/zh-cn.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[错误:](#ff3300) [没有找到玩家 %1%](#ff7e5e)' error_rtp_restricted_world: '[错误:](#ff3300) [你不能在这个世界随机传送](#ff7e5e)' error_on_cooldown: '[错误:](#ff3300) [你需要等待 %1% 才能再次进行此操作](#ff7e5e)' - error_command_disabled: '[错误:](#ff3300) [该命令已禁用!](#ff7e5e)' error_console_command_only: '[错误:](#ff3300) [该命令只能从服务器控制台运行](#ff7e5e)' error_rtp_randomization_timeout: '[错误:](#ff3300) [找不到安全位置,无法进行随机传送](#ff7e5e)' error_invalid_world: '[错误:](#ff3300) [无法完成传送.找不到目标世界](#ff7e5e)' diff --git a/common/src/main/resources/locales/zh-tw.yml b/common/src/main/resources/locales/zh-tw.yml index c6b476c5..520f8b5a 100644 --- a/common/src/main/resources/locales/zh-tw.yml +++ b/common/src/main/resources/locales/zh-tw.yml @@ -158,7 +158,6 @@ locales: error_player_not_found: '[錯誤:](#ff3300) [沒有找到玩家 %1%.](#ff7e5e)' error_rtp_restricted_world: '[錯誤:](#ff3300) [您不能在這個世界隨機傳送.](#ff7e5e)' error_on_cooldown: '[錯誤:](#ff3300) [您必須等待 %1% 後才能再次執行此操作.](#ff7e5e)' - error_command_disabled: '[錯誤:](#ff3300) [該指令已禁用!](#ff7e5e)' error_console_command_only: '[錯誤:](#ff3300) [該指令只能從伺服器控制台運行.](#ff7e5e)' error_rtp_randomization_timeout: '[錯誤:](#ff3300) [找不到安全的隨機位置傳送您.](#ff7e5e)' error_invalid_world: '[錯誤:](#ff3300) [無法完成傳送, 找不到目標世界.](#ff7e5e)'