fix: portal info showing to often

This commit is contained in:
Simon Giesel 2020-05-07 17:10:57 +02:00
parent 94b9f5ab83
commit ef953d8c8f

View file

@ -27,7 +27,8 @@ public class BannedActionListener implements Listener {
@EventHandler @EventHandler
public void onPlayerInteract(final PlayerInteractEvent e) { public void onPlayerInteract(final PlayerInteractEvent e) {
if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) { 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() e.getPlayer()
.sendMessage("§cEin Nether-Portal kann nicht erzeugt werden.\n §rGehe hierzu in die Mitte."); .sendMessage("§cEin Nether-Portal kann nicht erzeugt werden.\n §rGehe hierzu in die Mitte.");
} }