Advertisement
Guest User

RE

a guest
Nov 15th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. @EventHandler
  2. public void kitSigns(PlayerInteractEvent e)
  3. {
  4. Player p = e.getPlayer();
  5.  
  6. if ((e.getAction() == Action.RIGHT_CLICK_BLOCK) &&
  7. ((e.getClickedBlock().getState() instanceof Sign))) {
  8. Sign s = (Sign)e.getClickedBlock().getState();
  9. if ((s.getLine(0).equalsIgnoreCase("§0[ §aKit §0]")) &&
  10. (s.getLine(1).equalsIgnoreCase("PvP"))) {
  11. Bukkit.getServer().dispatchCommand(Bukkit.getServer().getPlayer(p.getName()), "pvp");
  12. }
  13. if ((e.getAction() == Action.RIGHT_CLICK_BLOCK) &&
  14. ((e.getClickedBlock().getState() instanceof Sign)) &&
  15. (s.getLine(0).equalsIgnoreCase("§0[ §aKit §0]")) &&
  16. (s.getLine(1).equalsIgnoreCase("Archer"))) {
  17. Bukkit.getServer().dispatchCommand(Bukkit.getServer().getPlayer(p.getName()), "archer");
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement