Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void kitSigns(PlayerInteractEvent e)
- {
- Player p = e.getPlayer();
- if ((e.getAction() == Action.RIGHT_CLICK_BLOCK) &&
- ((e.getClickedBlock().getState() instanceof Sign))) {
- Sign s = (Sign)e.getClickedBlock().getState();
- if ((s.getLine(0).equalsIgnoreCase("§0[ §aKit §0]")) &&
- (s.getLine(1).equalsIgnoreCase("PvP"))) {
- Bukkit.getServer().dispatchCommand(Bukkit.getServer().getPlayer(p.getName()), "pvp");
- }
- if ((e.getAction() == Action.RIGHT_CLICK_BLOCK) &&
- ((e.getClickedBlock().getState() instanceof Sign)) &&
- (s.getLine(0).equalsIgnoreCase("§0[ §aKit §0]")) &&
- (s.getLine(1).equalsIgnoreCase("Archer"))) {
- Bukkit.getServer().dispatchCommand(Bukkit.getServer().getPlayer(p.getName()), "archer");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement