From d5274de18faf469e2b6e8d26480846224360acba Mon Sep 17 00:00:00 2001 From: yuko fuyutsuki Date: Wed, 24 Aug 2022 15:17:58 +0900 Subject: [PATCH] Release v4.1.6 * Fixed #130 --- .github/changelogs/4.x/en_us.md | 6 ++++++ .github/changelogs/4.x/ja_jp.md | 6 ++++++ plugin.yml | 2 +- .../fuyutsuki/Texter/command/form/AddFloatingTextForm.php | 7 ++++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/changelogs/4.x/en_us.md b/.github/changelogs/4.x/en_us.md index f0cf644..6eefb3d 100644 --- a/.github/changelogs/4.x/en_us.md +++ b/.github/changelogs/4.x/en_us.md @@ -2,6 +2,12 @@ ## 4.1.x +### 4.1.6 + +#### :bug: バグ修正 + +- Fixed server crash when editing floating texts (#130) + ### 4.1.5 #### :bug: bug fixes diff --git a/.github/changelogs/4.x/ja_jp.md b/.github/changelogs/4.x/ja_jp.md index 1132fb3..941c969 100644 --- a/.github/changelogs/4.x/ja_jp.md +++ b/.github/changelogs/4.x/ja_jp.md @@ -2,6 +2,12 @@ ## 4.1.x +### 4.1.6 + +#### :bug: バグ修正 + +- 浮き文字の編集時にサーバーがクラッシュする問題を修正しました (#130) + ### 4.1.5 #### :bug: バグ修正 diff --git a/plugin.yml b/plugin.yml index 59ca40f..7f904ef 100644 --- a/plugin.yml +++ b/plugin.yml @@ -1,7 +1,7 @@ name: Texter prefix: Texter main: jp\mcbe\fuyutsuki\Texter\Main -version: 4.1.5 +version: 4.1.6 api: 4.7.0 softdepend: # aieuo/Mineflow diff --git a/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php b/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php index d0d6e4b..510073c 100644 --- a/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php +++ b/src/jp/mcbe/fuyutsuki/Texter/command/form/AddFloatingTextForm.php @@ -10,6 +10,7 @@ use dktapps\pmforms\element\Label; use dktapps\pmforms\element\StepSlider; use dktapps\pmforms\element\Toggle; +use Exception; use jp\mcbe\fuyutsuki\Texter\data\FloatingTextData; use jp\mcbe\fuyutsuki\Texter\i18n\TexterLang; use jp\mcbe\fuyutsuki\Texter\Main; @@ -95,7 +96,11 @@ function(Player $player): void { } private function handleSubmit(Player $player, CustomFormResponse $response): void { - $this->session->setName($response->getString(FormLabels::NAME)); + try { + $name = $response->getString(FormLabels::NAME); + $this->session->setName($name); + }catch (Exception $_) {} + $texts = $this->session->texts(); $this->session->setTexts([]);