Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onSignChange(SignChangeEvent e){
- if(e.getLine(0).equalsIgnoreCase("[TP]")){
- e.setLine(0, "ยง1[TP]");
- }
- }
- @EventHandler
- public void onInteract(PlayerInteractEvent e) {
- Player p = (Player) e.getPlayer();
- if(e.getAction() == Action.RIGHT_CLICK_BLOCK) {
- if(e.getClickedBlock().getType() == Material.WALL_SIGN) {
- Sign s = (Sign) e.getClickedBlock();
- if(s.getLine(0).equalsIgnoreCase("ยง1[TP]")){
- Location location = new Location(s.getWorld(), Integer.valueOf(s.getLine(1)), Integer.valueOf(s.getLine(2)), Integer.valueOf(s.getLine(3)));
- p.teleport(location);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement