From 4c60c768139edbdc05fa4b998aee6f0a6af6cedf Mon Sep 17 00:00:00 2001 From: Kah Date: Sun, 23 Jul 2017 13:59:02 +0200 Subject: [PATCH] Hide bad perm message when right clicking a sign --- .../com/arckenver/nations/listener/InteractPermListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/arckenver/nations/listener/InteractPermListener.java b/src/main/java/com/arckenver/nations/listener/InteractPermListener.java index 42d0b65..9c17bd3 100644 --- a/src/main/java/com/arckenver/nations/listener/InteractPermListener.java +++ b/src/main/java/com/arckenver/nations/listener/InteractPermListener.java @@ -1,5 +1,6 @@ package com.arckenver.nations.listener; +import org.spongepowered.api.block.BlockTypes; import org.spongepowered.api.entity.Entity; import org.spongepowered.api.entity.hanging.ItemFrame; import org.spongepowered.api.entity.living.ArmorStand; @@ -34,7 +35,8 @@ public void onInteract(InteractBlockEvent event, @First Player player) if (!DataHandler.getPerm("interact", player.getUniqueId(), loc)) { event.setCancelled(true); - player.sendMessage(Text.of(TextColors.RED, LanguageHandler.ERROR_PERM_INTERACT)); + if (loc.getBlockType() != BlockTypes.STANDING_SIGN && loc.getBlockType() != BlockTypes.WALL_SIGN) + player.sendMessage(Text.of(TextColors.RED, LanguageHandler.ERROR_PERM_INTERACT)); } }); }