Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @EventHandler
- public void onLobbyClick(PlayerInteractEvent e) {
- Player p = e.getPlayer();
- if (e.getAction().equals(Action.RIGHT_CLICK_BLOCK)) {
- if (e.getClickedBlock().getType() == Material.WALL_SIGN || e.getClickedBlock().getType() == Material.SIGN_POST) {
- final Sign sign = (Sign) e.getClickedBlock().getState();
- if (sign.getLine(0).contains("§8[§6Lobby§8]")) {
- String key = sign.getLine(1);
- final String world = plugin.getConfig().getString("lobbys." + key + ".LobbyWorld");
- p.teleport(new Location(Bukkit.getWorld(world), -27.5, 46, -27.5));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement