Kewilleen

Helpzin ;-;

Nov 12th, 2016
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | None | 0 0
  1. if (cmd.getName().equalsIgnoreCase("warps")) {
  2.             if (!(p.hasPermission(KwMetodos.getCnf("Warp.Permissao_Ver")) || p.hasPermission("kwwarp.admin"))) {
  3.                 p.sendMessage(KwMetodos.getReplaced("Sem_Permissao"));
  4.                 return true;
  5.             }
  6.             if (args.length == 0) {
  7.                 if (KwMetodos.getWarps()) {
  8.                     String warps = "";
  9.                     for (String w : KwMetodos.warps) {
  10.                         warps = warps + ", " + w;
  11.                     }
  12.                     p.sendMessage(KwMetodos.getReplaced("Warps.Setada").replace("{warps}", warps));
  13.                 } else {
  14.                     p.sendMessage(KwMetodos.getReplaced("Warps.Sem_Warp"));
  15.                 }
  16.             }
  17.         }
  18.  
  19. public static boolean getWarps() {
  20.         try {
  21.             PreparedStatement ps = sql.getConnection().prepareStatement("SELECT * FROM `kw_warp` WHERE nome=?");
  22.             ResultSet rs = ps.executeQuery();
  23.             while (rs.next()) {
  24.                 warps.add(rs.getString("nome"));
  25.             }
  26.         } catch (SQLException e) {
  27.         }
  28.         return true;
  29.     }
Advertisement
Add Comment
Please, Sign In to add comment