Created
September 21, 2014 20:47
-
-
Save RenegadeEagle/ee49469cff2d42a3503c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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