Skip to content

Commit

Permalink
Hide bad perm message when right clicking a sign
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoKah committed Jul 23, 2017
1 parent 5fd646d commit 4c60c76
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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));
}
});
}
Expand Down

0 comments on commit 4c60c76

Please sign in to comment.