Skip to content

Commit

Permalink
Merge pull request #233 from sakurawald/dev
Browse files Browse the repository at this point in the history
publish: v6.2.0
  • Loading branch information
sakurawald authored Jan 3, 2025
2 parents 5be2dac + cb9c998 commit f8d0b5a
Show file tree
Hide file tree
Showing 57 changed files with 152 additions and 32 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
> The version number of fuji follows `semver` now: https://semver.org/
Bump the `fuji v6.0.0` version for `mc1.21.4`.

- feature: add wildcard to anti_build (resolves #224, thanks for @phaldan)
- (core) feature: a new facility to allow suppress the sending of a message by its type.
- (teleport_warmup module) feature: a new meta `fuji.teleport_warmup.warmup` to specify the `warmup sec` based on luckperms. (Thanks to @FishyFinn)
- (teleport_warmup module) fix: should not corrupt the `relative teleport`. (Thanks to @FishyFinn)
- (warp module) feature: the feedback message for `/warp tp` command.
- (nametag module) fix: should hide the nametag if the player is `in-visbile`.
- (disabler.move_wrongly_disabler) fix: should also work for `entity moved wrongly`.
1 change: 1 addition & 0 deletions crowdin/af_ZA.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Add work",
"works.list.all_works": "<#FFA1F5>All works",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/ar_SA.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>أضف العمل",
"works.list.all_works": "<#FFA1F5>الكل يعمل",
"works.list.help.lore": "<green> - الزر الأيسر -> زيارة\n<green> - الزر الأيمن -> فتح الإعدادات العامة\n<green> - الزر الأيمن + الزر الأيمن -> فتح الإعدادات المتخصصة",
Expand Down
1 change: 1 addition & 0 deletions crowdin/ca_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Add work",
"works.list.all_works": "<#FFA1F5>All works",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/cs_CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s byl odstraněn.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Přidat práci",
"works.list.all_works": "<#FFA1F5>Všechny práce",
"works.list.help.lore": "<green> - Klepněte levým tlačítkem -> Navštivte\n<green> - Klepněte pravým tlačítkem -> Otevřít obecné nastavení\n<green> - Shift + Klepněte pravým tlačítkem -> Otevřít specializované nastavení",
Expand Down
1 change: 1 addition & 0 deletions crowdin/da_DK.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s fjernet.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Tilføj arbejde",
"works.list.all_works": "<#FFA1F5>Alle værker",
"works.list.help.lore": "<green> - Venstreklik -> Besøg\n<green> - Højreklik -> Åbn generelle indstillinger\n<green> - Skift + Højreklik -> Åbn specialiserede indstillinger",
Expand Down
1 change: 1 addition & 0 deletions crowdin/de_DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s entfernt.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Arbeit hinzufügen",
"works.list.all_works": "<#FFA1F5>Alle funktioniert",
"works.list.help.lore": "<green> - Linksklick -> Besuche\n<green> - Rechtsklick -> Allgemeine Einstellungen öffnen\n<green> - Shift + Rechtsklick -> Spezialeinstellungen öffnen",
Expand Down
1 change: 1 addition & 0 deletions crowdin/el_GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s αφαιρέθηκε.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Προσθήκη εργασίας",
"works.list.all_works": "<#FFA1F5>Όλα τα έργα",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Add work",
"works.list.all_works": "<#FFA1F5>All works",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/es_ES.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Añadir trabajo",
"works.list.all_works": "<#FFA1F5>Todos los trabajos",
"works.list.help.lore": "<green> - Clic izquierdo -> Visita\n<green> - Clic derecho -> Abrir ajustes generales\n<green> - Mayús + Clic derecho -> Abrir ajustes especializados",
Expand Down
1 change: 1 addition & 0 deletions crowdin/fi_FI.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s poistettu.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Lisää työ",
"works.list.all_works": "<#FFA1F5>Kaikki työt",
"works.list.help.lore": "<green> - Vasen painike -> Vieraile\n<green> - Oikea klikkaus -> Avaa yleiset asetukset\n<green> - Vaihto + Oikea klikkaus -> Avaa erikoistuneet asetukset",
Expand Down
1 change: 1 addition & 0 deletions crowdin/fr_FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Téléportation %s supprimée.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Ajouter un travail",
"works.list.all_works": "<#FFA1F5>Tous les travaux",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/he_IL.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Add work",
"works.list.all_works": "<#FFA1F5>All works",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/hu_HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Add work",
"works.list.all_works": "<#FFA1F5>All works",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/id_ID.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s diatur.",
"warp.unset.success": "<gold>Warp %s dihapus.",
"warp.gui.title": "<blue>Warp",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Tambah pekerjaan",
"works.list.all_works": "<#FFA1F5>Semua pekerjaan",
"works.list.help.lore": "<green> - Klik kiri -> Kunjungi\n<green> - Klik kanan -> Buka pengaturan umum\n<green> - Shift + Klik kanan -> Buka pengaturan khusus",
Expand Down
1 change: 1 addition & 0 deletions crowdin/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s rimosso.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Aggiungi lavoro",
"works.list.all_works": "<#FFA1F5>Tutti i lavori",
"works.list.help.lore": "<green> - Click sinistro -> Visita\n<green> - Click destro -> Apri impostazioni generali\n<green> - Maiusc + Click destro -> Apri impostazioni specializzate",
Expand Down
1 change: 1 addition & 0 deletions crowdin/ja_JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>ワープ %s を削除しました。",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>作業を追加",
"works.list.all_works": "<#FFA1F5>すべての作品",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/ko_KR.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Add work",
"works.list.all_works": "<#FFA1F5>All works",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/nl_NL.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s verwijderd.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Werk toevoegen",
"works.list.all_works": "<#FFA1F5>Alles werkt",
"works.list.help.lore": "<green> - Linksklik -> Bezoek\n<green> - Rechtsklik -> Open algemene instellingen\n<green> - Shift + Rechtsklik -> Open gespecialiseerde instellingen",
Expand Down
1 change: 1 addition & 0 deletions crowdin/no_NO.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s fjernet.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Legg til arbeid",
"works.list.all_works": "<#FFA1F5>Alle fungerer",
"works.list.help.lore": "<green> - Venstreklikk -> Besøk\n<green> - Høyreklikk -> Åpne generelle innstillinger\n<green> - Shift + Høyreklikk -> Åpne spesialiserte innstillinger",
Expand Down
1 change: 1 addition & 0 deletions crowdin/pl_PL.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s usunięto.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Dodaj pracę",
"works.list.all_works": "<#FFA1F5>Wszystkie prace",
"works.list.help.lore": "<green> - Kliknij lewym przyciskiem myszy -> Odwiedź\n<green> - Kliknij prawym przyciskiem myszy -> Otwórz ustawienia ogólne\n<green> - Shift + Prawy przycisk myszy -> Otwórz ustawienia specjalistyczne",
Expand Down
1 change: 1 addition & 0 deletions crowdin/pt_BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removido.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Adicionar trabalho",
"works.list.all_works": "<#FFA1F5>Todas funcionam",
"works.list.help.lore": "<green> - Clique com o botão esquerdo -> Visitar\n<green> - Clique com o botão direito -> Abrir configurações gerais\n<green> - Shift + botão direito -> Abre configurações especializadas",
Expand Down
1 change: 1 addition & 0 deletions crowdin/pt_PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removido.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Adicionar trabalho",
"works.list.all_works": "<#FFA1F5>Todas funcionam",
"works.list.help.lore": "<green> - Clique com o botão esquerdo -> Visitar\n<green> - Clique com o botão direito -> Abrir configurações gerais\n<green> - Shift + botão direito -> Abre configurações especializadas",
Expand Down
1 change: 1 addition & 0 deletions crowdin/ro_RO.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Urzeală %s eliminată.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Adaugă lucru",
"works.list.all_works": "<#FFA1F5>Toate funcționează",
"works.list.help.lore": "<green> - Click stânga -> Vizitează\n<green> - Click dreapta -> Deschidere setări generale\n<green> - Shift + Click dreapta -> Deschide setări specializate",
Expand Down
1 change: 1 addition & 0 deletions crowdin/ru_RU.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s удален.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Добавить работу",
"works.list.all_works": "<#FFA1F5>Все работы",
"works.list.help.lore": "<green> - щелчок левой кнопкой мыши -> Открыть общие настройки\n<green> - Правый клик -> Открыть общие настройки\n<green> - Shift + правый клик -> Открыть специализированные настройки",
Expand Down
1 change: 1 addition & 0 deletions crowdin/sr_SP.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s removed.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Add work",
"works.list.all_works": "<#FFA1F5>All works",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/sv_SE.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s borttagen.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Lägg till arbete",
"works.list.all_works": "<#FFA1F5>Alla verk",
"works.list.help.lore": "<green> - Vänsterklicka -> Besök\n<green> - Högerklicka -> Öppna allmänna inställningar\n<green> - Skift + Högerklicka -> Öppna specialiserade inställningar",
Expand Down
1 change: 1 addition & 0 deletions crowdin/uk_UA.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Warp %s set.",
"warp.unset.success": "<gold>Warp %s видалений.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Додати роботу",
"works.list.all_works": "<#FFA1F5>Всі роботи",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/vi_VN.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>Đã set warp %s.",
"warp.unset.success": "<gold>Đã xoá warp %s.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>Add work",
"works.list.all_works": "<#FFA1F5>All works",
"works.list.help.lore": "<green> - Left click -> Visit\n<green> - Right click -> Open general settings\n<green> - Shift + Right click -> Open specialized settings",
Expand Down
1 change: 1 addition & 0 deletions crowdin/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>传送点 %s 已设置.",
"warp.unset.success": "<gold>传送点 %s 已移除.",
"warp.gui.title": "<blue>Warps",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>添加作品",
"works.list.all_works": "<#FFA1F5>所有作品",
"works.list.help.lore": "<green> - 左键 -> 参观\n<green> - 右键 -> 打开通用设置\n<green> - SHIFT + 右键 -> 打开特殊设置",
Expand Down
1 change: 1 addition & 0 deletions crowdin/zh_TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"warp.set.success": "<gold>傳送點 %s 已設定.",
"warp.unset.success": "<gold>傳送點 %s 已移除.",
"warp.gui.title": "<blue>傳送點",
"warp.tp.success": "<blue>Teleported to warp %s.",
"works.list.add": "<#FFA1F5>新增作品",
"works.list.all_works": "<#FFA1F5>所有作品",
"works.list.help.lore": "<green> - 左鍵 -> 參觀\n<green> - 右鍵 -> 開啟通用設定\n<green> - SHIFT + 右鍵 -> 開啟特殊設定",
Expand Down
2 changes: 1 addition & 1 deletion docs/chapters/module/disabler/disabler.tex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Disable \tbf{player moved too quickly} and \tbf{vehicle moved too quickly}.

\LevelThree{move\_wronlgy\_disabler}
Disable \tbf{player moved wrongly}.
Disable \tbf{player moved wrongly} and \tbf{vehicle moved wrongly}.

\begin{warn}{The movement anti-cheat inside vanilla minecraft is bad}
Inside the vanilla minecraft server, there is a checker used to check if the player moves correctly.
Expand Down
5 changes: 5 additions & 0 deletions docs/chapters/module/language/language.tex
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@
\LevelTwo{Difference}
Disabled: All the players use the \ttt{default\_language}.\\
Enabled: Fuji will \textbf{try} to respect the player's client-side language, if the server-side supports.

\LevelTwo{Example}
\begin{example}{To supress the sending of a message}
Set the value of a message key to \str{[suppress-sending]}, to suppress the sending of this type of message.
\end{example}
4 changes: 4 additions & 0 deletions docs/chapters/module/teleport_warmup/teleport_warmup.tex
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@
}
\end{Configuration}

\LevelTwo{Meta}
\begin{description}
\item [fuji.teleport\_warmup.warmup] The per player teleport warmup time in seconds.
\end{description}
Binary file modified docs/release/fuji.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ org.gradle.parallel=true
# project
maven_group=io.github.sakurawald
mod_id=fuji
mod_version=6.1.0
mod_version=6.2.0

# loader
minecraft_version=1.21.4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ public class TextHelper {
private static final Map<String, JsonObject> code2json = new HashMap<>();
private static final JsonObject UNSUPPORTED_LANGUAGE_MARKER = new JsonObject();

private static final String SUPPRESS_SENDING_STRING_MARKER = "[suppress-sending]";
private static final Text SUPPRESS_SENDING_TEXT_MARKER = Text.literal("[suppress-sending]");

static {
writeDefaultLanguageFilesIfAbsent();

Expand Down Expand Up @@ -219,6 +222,11 @@ private static boolean isDefaultLanguageCode(String languageCode) {
private static @NotNull Text getText(@NonNull NodeParser parser, @Nullable Object audience, boolean isKey, String keyOrValue, Object... args) {
String value = isKey ? getValueByKey(audience, keyOrValue) : keyOrValue;

// suppress this sending?
if (value.equals(SUPPRESS_SENDING_STRING_MARKER)) {
return SUPPRESS_SENDING_TEXT_MARKER;
}

// resolve args
value = resolveArgs(value, args);

Expand Down Expand Up @@ -292,6 +300,13 @@ public static void sendMessageByFlag(@NotNull Object audience, boolean flag) {
public static void sendMessageByKey(@NotNull Object audience, String key, Object... args) {
Text text = getTextByKey(audience, key, args);

/* suppress this sending ? */
if (text == SUPPRESS_SENDING_TEXT_MARKER) {
LogUtil.debug("Suppress the sending of message: audience = {}, key = {}, args = {}", audience, key, args);
return;
}


/* extract the source */
if (audience instanceof CommandContext<?> ctx) {
audience = ctx.getSource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@
import net.minecraft.world.chunk.Chunk;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Iterator;
import java.util.Optional;
import java.util.OptionalInt;
import java.util.Random;
import java.util.concurrent.CompletableFuture;
import java.util.function.Consumer;
import java.util.Optional;
import java.util.OptionalInt;

@Cite("https://github.com/John-Paul-R/Essential-Commands")
@UtilityClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import net.minecraft.util.Identifier;
import net.minecraft.world.World;
import org.jetbrains.annotations.NotNull;

import java.util.Set;
import java.util.EnumSet;

@Data
Expand Down Expand Up @@ -55,7 +55,7 @@ public double distanceToSqr(@NotNull SpatialPose spatialPose) {
return x * x + y * y + z * z;
}

public void teleport(@NotNull ServerPlayerEntity player) {
public void teleport(@NotNull ServerPlayerEntity player, Set<PositionFlag> flags) {
RegistryKey<World> worldKey = RegistryKey.of(RegistryKeys.WORLD, Identifier.of(this.level));
ServerWorld serverLevel = ServerHelper.getServer().getWorld(worldKey);
if (serverLevel == null) {
Expand All @@ -64,7 +64,10 @@ public void teleport(@NotNull ServerPlayerEntity player) {
}

/* make position flags */
EnumSet<PositionFlag> flags = EnumSet.noneOf(PositionFlag.class);
player.teleport(serverLevel, this.x, this.y, this.z, flags, this.yaw, this.pitch, true);
}

public void teleport(@NotNull ServerPlayerEntity player) {
teleport(player, EnumSet.noneOf(PositionFlag.class));
}
}
Loading

0 comments on commit f8d0b5a

Please sign in to comment.