From 37c63b9195d26708759193bda5af562cace821a0 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Tue, 17 Aug 2021 21:18:38 +0800 Subject: [PATCH 1/2] Send incorrect material message. --- .../MultiversePortals/listeners/MVPPlayerMoveListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java b/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java index 8f8aafe..9550c48 100644 --- a/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java +++ b/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java @@ -20,6 +20,7 @@ import com.onarandombox.MultiversePortals.PortalPlayerSession; import com.onarandombox.MultiversePortals.enums.MoveType; import com.onarandombox.MultiversePortals.event.MVPortalEvent; +import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.entity.Player; @@ -104,7 +105,7 @@ public void playerMove(PlayerMoveEvent event) { return; } if (!portal.isFrameValid(loc)) { - //event.getPlayer().sendMessage("This portal's frame is made of an " + ChatColor.RED + "incorrect material." + ChatColor.RED + " You should exit it now."); + p.sendMessage("This portal's frame is made of an " + ChatColor.RED + "incorrect material." + ChatColor.RED + " You should exit it now."); return; } if (portal.getHandlerScript() != null && !portal.getHandlerScript().isEmpty()) { From dd4db63c96c23661ecdab6eafd07a2ef8022de60 Mon Sep 17 00:00:00 2001 From: Ben Woo <30431861+benwoo1110@users.noreply.github.com> Date: Fri, 17 Feb 2023 23:26:51 +0800 Subject: [PATCH 2/2] Implement suggestion Co-authored-by: nicegamer7 --- .../MultiversePortals/listeners/MVPPlayerMoveListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java b/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java index 9550c48..80d8baa 100644 --- a/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java +++ b/src/main/java/com/onarandombox/MultiversePortals/listeners/MVPPlayerMoveListener.java @@ -105,7 +105,7 @@ public void playerMove(PlayerMoveEvent event) { return; } if (!portal.isFrameValid(loc)) { - p.sendMessage("This portal's frame is made of an " + ChatColor.RED + "incorrect material." + ChatColor.RED + " You should exit it now."); + p.sendMessage("This portal's frame is made of an " + ChatColor.RED + "incorrect material. You should exit it now."); return; } if (portal.getHandlerScript() != null && !portal.getHandlerScript().isEmpty()) {