Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (cmd.getName().equalsIgnoreCase("warps")) {
- if (!(p.hasPermission(KwMetodos.getCnf("Warp.Permissao_Ver")) || p.hasPermission("kwwarp.admin"))) {
- p.sendMessage(KwMetodos.getReplaced("Sem_Permissao"));
- return true;
- }
- if (args.length == 0) {
- if (KwMetodos.getWarps()) {
- String warps = "";
- for (String w : KwMetodos.warps) {
- warps = warps + ", " + w;
- }
- p.sendMessage(KwMetodos.getReplaced("Warps.Setada").replace("{warps}", warps));
- } else {
- p.sendMessage(KwMetodos.getReplaced("Warps.Sem_Warp"));
- }
- }
- }
- public static boolean getWarps() {
- try {
- PreparedStatement ps = sql.getConnection().prepareStatement("SELECT * FROM `kw_warp` WHERE nome=?");
- ResultSet rs = ps.executeQuery();
- while (rs.next()) {
- warps.add(rs.getString("nome"));
- }
- } catch (SQLException e) {
- }
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment