fix: portal info showing to often
This commit is contained in:
parent
94b9f5ab83
commit
ef953d8c8f
1 changed files with 2 additions and 1 deletions
|
@ -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.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue