Created
February 16, 2013 08:10
-
-
Save Double0negative/4966039 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ResultSet result; | |
try{ | |
String query = "SELECT * FROM "+SettingsManager.getSqlPrefix()+"blocks WHERE gameid="+id+" ORDER BY time DESC"; | |
Statement s = dbman.createStatement(); | |
result = s.executeQuery(query); | |
}catch(Exception e){} | |
while(result.next()){ | |
Location l = new Location(p.getServer().getWorld(result.getString(2)), result.getInt(7), result.getInt(8), result.getInt(9)); | |
Block b = l.getBlock(); | |
b.setTypeId(result.getInt(3)); | |
b.setData(result.getByte(4)); | |
b.getState().update(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment