You should use the block type IDs for confirming that it's a sign. There are two ids for signs, one being the sign that's on a wall (68) and the other being the sign that's standing on a post (63). Use the PlayerInteractEvent to check if the player right clicked the sign. Check if the player right clicked a block. Check if the block that was right clicked has an ID of 63 or 68. Cast the block-state to a sign. Do whatever you want to do. If you change the text on the sign, make sure you update it afterward, otherwise the text won't show up. Here's the Player Listener function you should use.
@EventHandler
public void onPlayerInteract(PlayerInteractEvent event) {
if(event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
if(event.getClickedBlock().getTypeId() == 63 || event.getClickedBlock().getTypeId() == 68) {
Sign sign = (Sign) event.getClickedBlock().getState();
sign.setLine(0, "Boo Yeah");
sign.update();
// Do other stuff if you need to
}
}
}