Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- PreparedStatement st = MySql.con.prepareStatement("SELECT * FROM homes1_data");
- ResultSet rs = st.executeQuery();
- while (rs.next()) {
- while (rs.next()) {
- String UUID = rs.getString("UUID");
- String name = rs.getString("home1name");
- int p1x = rs.getInt("p1x");
- int p1y = rs.getInt("p1y");
- int p1z = rs.getInt("p1z");
- int p2x = rs.getInt("p2x");
- int p2y = rs.getInt("p2y");
- int p2z = rs.getInt("p2z");
- double spawnhome1 = rs.getDouble("spawnhome");
- String convidado1 = rs.getString("convidado1");
- String convidado2 = rs.getString("convidado2");
- String convidado3 = rs.getString("convidado3");
- String convidado4 = rs.getString("convidado4");
- String convidado5 = rs.getString("convidado5");
- Region regions = new Region(UUID, name, p1x, p1y, p1z, p2x, p2y, p2z, spawnhome1,
- convidado1, convidado2, convidado3, convidado4, convidado5).insert();
- //Here saving the mysql information in the ArrayList
- Region.getRegions().add(regions);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement