Skip to content

Instantly share code, notes, and snippets.

@RenegadeEagle
Created September 21, 2014 20:47
Show Gist options
  • Save RenegadeEagle/ee49469cff2d42a3503c to your computer and use it in GitHub Desktop.
Save RenegadeEagle/ee49469cff2d42a3503c to your computer and use it in GitHub Desktop.
@EventHandler
public void onSomething(PlayerInteractEvent event){
if(event.getAction() == Action.RIGHT_CLICK_BLOCK){
Block block = event.getClickedBlock();
if(block.getType() == Material.WALL_SIGN){
if(block.getState() instanceof Sign){
Sign sign = (Sign) block.getState();
String line = ChatColor.stripColor(sign.getLine(1));
if(line.equalsIgnoreCase("Knight")){
//do shit
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment