From 230978d94448784d4a291116d0fa25dbe13151df Mon Sep 17 00:00:00 2001 From: Tomachi <8929706+book000@users.noreply.github.com> Date: Sat, 21 May 2022 18:15:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20#822=20gamemode=E3=82=B3=E3=83=9E?= =?UTF-8?q?=E3=83=B3=E3=83=89=E3=81=A7=E3=81=AE=E3=82=B9=E3=83=9A=E3=82=AF?= =?UTF-8?q?=E3=83=86=E3=82=A4=E3=82=BF=E3=83=BC=E5=88=87=E3=82=8A=E6=9B=BF?= =?UTF-8?q?=E3=81=88=E6=99=82=E3=81=AB=E8=AD=A6=E5=91=8A=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=20(#833)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/jaoafa/mymaid4/event/Event_DVNotSpectator.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jaoafa/mymaid4/event/Event_DVNotSpectator.java b/src/main/java/com/jaoafa/mymaid4/event/Event_DVNotSpectator.java index 0c165ae6e..cff959f58 100644 --- a/src/main/java/com/jaoafa/mymaid4/event/Event_DVNotSpectator.java +++ b/src/main/java/com/jaoafa/mymaid4/event/Event_DVNotSpectator.java @@ -1,7 +1,7 @@ /* * jaoLicense * - * Copyright (c) 2021 jao Minecraft Server + * Copyright (c) 2022 jao Minecraft Server * * The following license applies to this project: jaoLicense * @@ -13,6 +13,9 @@ import com.jaoafa.mymaid4.lib.EventPremise; import com.jaoafa.mymaid4.lib.MyMaidLibrary; +import net.kyori.adventure.text.Component; +import net.kyori.adventure.text.JoinConfiguration; +import net.kyori.adventure.text.format.NamedTextColor; import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -35,6 +38,9 @@ public void onChangeGameMode(PlayerGameModeChangeEvent event) { if (isAMR(player)) { return; } + player.sendMessage(Component.join(JoinConfiguration.noSeparators(), + Component.text("[GAMEMODE] "), + Component.text("あなたはゲームモードをスペクテイターに切り替えることができません。", NamedTextColor.GREEN))); event.setCancelled(true); } } \ No newline at end of file