Skip to content

Commit dcb5d05

Browse files
committed
Merge branch 'dev/4.2'
2 parents 134d9cb + ae97b16 commit dcb5d05

File tree

16 files changed

+40
-59
lines changed

16 files changed

+40
-59
lines changed

.github/changelogs/4.x/en_us.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## 4.2.x
44

5+
### 4.2.1
6+
7+
#### :arrow_heading_up: follow PMMP changes
8+
9+
- Added support for PMMP 5.3.x (Minecraft 1.20.10~)
10+
511
### 4.2.0
612

713
#### :arrow_heading_up: follow PMMP changes

.github/changelogs/4.x/ja_jp.md

+6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
## 4.2.x
44

5+
### 4.2.1
6+
7+
#### :arrow_heading_up: PMMPの変更に追従
8+
9+
- PMMP 5.3.x (Minecraft 1.20.10~) に対応しました
10+
511
### 4.2.0
612

713
#### :arrow_heading_up: PMMPの変更に追従

.poggit.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
--- # Poggit-CI Manifest. Open the CI at https://poggit.pmmp.io/ci/fuyutsuki/Texter
2-
branches:
3-
- master
4-
- dev/4.2
2+
branches: []
53
projects:
64
Texter:
75
path: ""

plugin.yml

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
11
name: Texter
22
prefix: Texter
33
main: jp\mcbe\fuyutsuki\Texter\Main
4-
version: 4.2.0
5-
api: 5.1.2
6-
softdepend:
7-
# aieuo/Mineflow
8-
- Mineflow # >= 2.0
9-
virions:
10-
# dktapps-pm-pl/pmforms
11-
- pmforms # ^2.0.0
4+
version: 4.2.1
5+
api: 5.3.0
126

137
author: yuko fuyutsuki
148
authors:

resources/language/en_us.ini

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ form.list.description.1=Lists editable FloatingTexts within 10 blocks of straigh
6262
form.list.description.2=Specified FloatingText name: {%0}\nPlease select the operation to do for this.
6363
6464
error.on.enable.not.packaged=Please use the phar file downloaded from PoggitCI (https://poggit.pmmp.io/p/Texter).
65-
error.on.enable.not.found.virions=Can't find the {%0} in the virions folder. Please download {%0} and install it correctly.
6665
error.ft.name.not.specified=A FloatingText name is not specified
6766
error.ft.name.exists=A FloatingText with the specified name: {%0} already exists.
6867
error.ft.name.not.exists=No FloatingText with the specified name: {%0} does not exist.

resources/language/es_mx.ini

-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ form.remove.description=Elimina el TextoFloatante
5757
form.list.description.1=Enumera los TextosFloatantes editables dentro de 10 bloques de distancia en línea recta de usted.\nSi no, no se muestra nada.
5858
form.list.description.2=Nombre de TextoFloatante especificado: {%0}\nSeleccione la operación a realizar para esto.
5959
error.on.enable.not.packaged=Utilice el archivo phar descargado de PoggitCI (https://poggit.pmmp.io/p/Texter).
60-
error.on.enable.not.found.virions=No se pudo encontrar {%0} en la carpeta de viriones. Por favor descargue {%0} e instalalo correctamente.
6160
error.ft.name.not.specified=Un nombre para el TextoFloatante no fue especificado
6261
error.ft.name.exists=Un TextoFloatante con el nombre especificado: {%0} ya existe.
6362
error.ft.name.not.exists=No existe un TextoFloatante con el nombre: {%0}.

resources/language/id_id.ini

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ form.list.description.1=Mendaftarkan teks melayang yang dapat di edit dalam 10 b
4545
form.list.description.2=nama teks melayang: {%0}\nPilih operasi yang dilakukan untuk ini.
4646

4747
error.on.enable.not.packaged=Mohon gunakan file .phar yang didownload dari PoggitCI (https://poggit.pmmp.io/p/Texter).
48-
error.on.enable.not.found.libformapi=Tidak dapat menemukan libFormAPI di folder virions. Mohon download libFormAPI dan install secara benar.
4948
error.ft.name.not.specified=Nama teks melayang tidak di pilih
5049
error.ft.name.exists=Teks melayang dengan nama: {%0} sudah ada.
5150
error.ft.name.not.exists=Teks melayang dengan nama: {%0} tidak ada.

resources/language/ja_jp.ini

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ form.list.description.1=自分から直線距離10ブロック以内の編集可
6363
form.list.description.2=指定された浮き文字: "{%0}"\nこの浮き文字に行う操作を選択して下さい。
6464

6565
error.on.enable.not.packaged=PoggitCI(https://poggit.pmmp.io/p/Texter)からダウンロードしたpharファイルを使ってください。
66-
error.on.enable.not.found.virions=virionsフォルダに{%0}が見つかりません。{%0}をダウンロードし、正しく導入してください。
6766
error.ft.name.not.specified=浮き文字の名前が指定されていません
6867
error.ft.name.exists=このワールドには"{%0}"の名前を持つ浮き文字が既に存在します。
6968
error.ft.name.not.exists=このワールドには"{%0}"の名前を持つ浮き文字は存在しません。

resources/language/ko_kr.ini

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ form.list.description.1=현제 위치에서부터 10블럭 이내에있는 홀
4545
form.list.description.2=홀로그램 이름: {%0}\n아래 옵션을 선택하세요
4646

4747
error.on.enable.not.packaged=PoggitCI 의 .phar 파일을 사용하세요! (https://poggit.pmmp.io/p/Texter).
48-
error.on.enable.not.found.libformapi=libFormAPI을 virions 폴더에서 찾을수 없습니다. libFormAPI 다운후 제대로 설치해주세요
4948
error.ft.name.not.specified=홀로그램 이름을 적어주세요
5049
error.ft.name.exists=홀로그램 이름: {%0} 이 이미 있습니다
5150
error.ft.name.not.exists=홀로그램 이름: {%0} 이 없습니다

resources/language/ru_ru.ini

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ form.list.description.1=Список изменяемых летающих те
6262
form.list.description.2=Выбран летающий текст: {%0}\nПожалуйста, выберите действие:
6363

6464
error.on.enable.not.packaged=Пожалуйста, используйте phar-файл скачанный с PoggitCI (https://poggit.pmmp.io/p/Texter).
65-
error..libformapi=Не получается найти libFormAPI в папке virions. Пожалуйста, скачайте libFormAPI и установите корректно.
6665
error.ft.name.not.specified=Название летающего текста не указано.
6766
error.ft.name.exists=Летающий текст с названием: {%0} уже существует.
6867
error.ft.name.not.exists=Летающий текст с названием: {%0} не существует.

resources/language/tr_tr.ini

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ form.list.description.1=Kendinizden düz çizgi mesafesinin 10 blok içersindeki
4545
form.list.description.2=Belirtilen Uçan Metin metni adı: {%0} \nLütfen bunun için yapılacak işlemi seçin.
4646

4747
error.on.enable.not.packaged=Lütfen PoggitCI'den indirilen phar dosyasını kullanın (https://poggit.pmmp.io/p/Texter).
48-
error.on.enable.not.found.libformapi=libFormAPI virions klasöründe bulunamadı. Lütfen libFormAPI'yi indirin ve doğru şekilde kurun.
4948
error.ft.name.not.specified=Bir UçanMetin adı belirtilmedi
5049
error.ft.name.exists=Belirtilen ada sahip bir UçanMetin: {%0} zaten var.
5150
error.ft.name.not.exists=Belirtilen ada sahip UçanMetin yok: {%0} mevcut değil.

resources/language/vi_vn.ini

-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ form.list.description.1=Liệt kê các chữ nổi có thể chỉnh sửa tron
6262
form.list.description.2=Tên của chữ nổi được chỉ định: {%0}\nVui lòng chọn thao tác cần thực hiện.
6363
6464
error.on.enable.not.packaged=Vui lòng dùng tệp có định dạng Phar có thể tải từ PoggitCI (https://poggit.pmmp.io/p/Texter).
65-
error.on.enable.not.found.libformapi=Không thể tìm thấy libFormAPI trong thư mục virions. Vui lòng tải libFormAPI.
6665
error.ft.name.not.specified=Tên của chữ nổi không được ghi rõ
6766
error.ft.name.exists=Chữ nổi có tên: {%0} đã được dùng.
6867
error.ft.name.not.exists=Không có chữ nổi nào có tên: {%0}.

resources/language/zh_cn.ini

+1-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ form.add.more.ft=添加更多浮空字
4141
form.add.spacing.description=浮空字之间的间距可以在坐标中指定,其中-0.3 (Y)大约是一行的间距。
4242
form.add.spacing.x=间距(X)
4343
form.add.spacing.y=间距(Y)
44-
form.add.spacing.z=间距(Z
44+
form.add.spacing.z=间距(Z
4545
form.add.text=文本 #{%0}
4646
form.add.error.no.texts=你不能在没有一个浮空字的情况下添加任何东西。
4747
form.edit=编辑
@@ -62,7 +62,6 @@ form.list.description.1=列出可编辑的浮空字在10块直线距离内。\n
6262
form.list.description.2=指定浮空字名称名称: {%0}\n请为此选择要做的操作。
6363

6464
error.on.enable.not.packaged=请使用从PoggitCI下载的phar文件 (https://poggit.pmmp.io/p/Texter).
65-
error.on.enable.not.found.libformapi=无法在病毒粒子文件夹中找到 {%0} 。请下载并正确安装 {%0} 。
6665
error.ft.name.not.specified=没有指定浮点文本名称
6766
error.ft.name.exists=指定名称的浮空字: {%0} 已经存在。
6867
error.ft.name.not.exists=没有指定名称的浮空字: {%0} 不存在。

src/jp/mcbe/fuyutsuki/Texter/Main.php

+19-36
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@
3939
use pocketmine\utils\TextFormat;
4040
use pocketmine\utils\VersionString;
4141
use function array_key_last;
42-
use function class_exists;
4342
use function explode;
4443
use function file_exists;
4544
use function glob;
46-
use function implode;
45+
use function is_dir;
4746
use function mkdir;
4847
use function str_starts_with;
4948

@@ -205,42 +204,18 @@ public function compareVersion(bool $success, ?VersionString $latest = null, str
205204
}
206205

207206
private function checkPackaged(): bool {
208-
if (str_starts_with($this->getFile(), self::PHAR_HEADER)) {
209-
if (class_exists(Dependencies::PACKAGED_LIBRARY_NAMESPACE . Dependencies::PMFORMS)) {
210-
return true;// PoggitCI
211-
}elseif (Main::canLoadDependencyFromComposer()) {
212-
Main::loadDependency();
213-
return true;// GitHubActions
214-
}else {
215-
$message = $this->lang->translateString("error.on.enable.not.packaged");
216-
$this->getLogger()->critical($message);
217-
return false;
218-
}
219-
}else {
220-
$plugins = $this->getServer()->getPluginManager()->getPlugins();
221-
if (isset($plugins["DEVirion"])) {
222-
if (class_exists(Dependencies::PMFORMS)) {
223-
return true;// developer
224-
} else {
225-
$message = $this->lang->translateString("error.on.enable.not.found.virions", [implode(", ", ["pmforms"])]);
226-
$this->getLogger()->critical($message);
227-
return false;
228-
}
229-
}elseif (Main::canLoadDependencyFromComposer()) {
230-
Main::loadDependency();
231-
if (class_exists(Dependencies::PMFORMS)) {
232-
return true;// developer
233-
} else {
234-
$message = $this->lang->translateString("error.on.enable.not.found.virions", [implode(", ", ["pmforms"])]);
235-
$this->getLogger()->critical($message);
236-
return false;
237-
}
238-
}else {
239-
$message = $this->lang->translateString("error.on.enable.not.packaged");
240-
$this->getLogger()->critical($message);
241-
return false;
207+
if ($this->isPhar() && $this->isPackagedByPharynx()) {
208+
return true; // pharynx
209+
}elseif (Main::canLoadDependencyFromComposer()) {
210+
Main::loadDependency();
211+
if (class_exists(Dependencies::PMFORMS)) {
212+
return true; // developer
242213
}
243214
}
215+
216+
$message = $this->lang->translateString("error.on.enable.not.packaged");
217+
$this->getLogger()->critical($message);
218+
return false;
244219
}
245220

246221
private function unlinkRecursive(string $dir): bool {
@@ -270,6 +245,14 @@ private function findWorldsPath(): array {
270245
return glob($this->getWorldsPath() . "*");
271246
}
272247

248+
private function isPhar(): bool {
249+
return str_starts_with($this->getFile(), self::PHAR_HEADER);
250+
}
251+
252+
private function isPackagedByPharynx(): bool {
253+
return is_dir($this->getFile() . Dependencies::PHARYNX_LIBRARY_DIR);
254+
}
255+
273256
public static function prefix(): string {
274257
return self::$prefix;
275258
}

src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ public function __construct(Player $player) {
5757
}
5858

5959
if (count($this->session->texts()) >= 2) {
60-
$spacing = $this->session->spacing()->add(0, -0.3, 0);
60+
$spacing = $this->session->spacing();
61+
if ($spacing->equals(Vector3::zero())) {
62+
$spacing = $spacing->add(0, -0.3, 0);
63+
}
6164
$range = range(-30, 30);
6265
foreach ($range as $k => $v) {
6366
$range[$k] = (string)($v/10);

src/jp/mcbe/fuyutsuki/Texter/util/dependencies/Dependencies.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ final class Dependencies {
1212

1313
public const PLUGIN_NAMESPACE = "\\jp\\mcbe\\fuyutsuki\\Texter";
1414

15-
public const PACKAGED_LIBRARY_NAMESPACE = self::PLUGIN_NAMESPACE . "\\libs";
15+
public const PHARYNX_LIBRARY_DIR = "\\libs";
1616
public const PMFORMS = "\\dktapps\\pmforms\\BaseForm";
1717

1818
}

0 commit comments

Comments
 (0)