From ef953d8c8f5f53886883561e99ad75efaf1c51f0 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 7 May 2020 17:10:57 +0200 Subject: [PATCH] fix: portal info showing to often --- .../de/cliffbreak/varo/listeners/BannedActionListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/varo/src/main/java/de/cliffbreak/varo/listeners/BannedActionListener.java b/varo/src/main/java/de/cliffbreak/varo/listeners/BannedActionListener.java index a27c06f..1b3f2d4 100644 --- a/varo/src/main/java/de/cliffbreak/varo/listeners/BannedActionListener.java +++ b/varo/src/main/java/de/cliffbreak/varo/listeners/BannedActionListener.java @@ -27,7 +27,8 @@ public class BannedActionListener implements Listener { @EventHandler public void onPlayerInteract(final PlayerInteractEvent e) { if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { - if (e.getClickedBlock().getType().equals(Material.OBSIDIAN)) { + if (e.getClickedBlock().getType().equals(Material.OBSIDIAN) + && e.getPlayer().getInventory().getItemInMainHand().getType().equals(Material.FLINT_AND_STEEL)) { e.getPlayer() .sendMessage("§cEin Nether-Portal kann nicht erzeugt werden.\n §rGehe hierzu in die Mitte."); }