use of com.karanumcoding.adamantineshield.enums.ActionType in project AdamantineShield by Karanum.
the class ContainerLookupResult method readResult.
protected void readResult(ResultSet results) throws SQLException {
while (results.next()) {
Vector3i pos = new Vector3i(results.getInt("x"), results.getInt("y"), results.getInt("z"));
UUID world = UUID.fromString(results.getString("world"));
ActionType type = ActionType.valueCache[results.getByte("type")];
String cause = results.getString("cause");
String data = results.getString("data");
ItemType item = Sponge.getRegistry().getType(ItemType.class, results.getString("AS_Id.value")).get();
int count = results.getByte("count");
int slot = results.getInt("slot");
boolean rolledBack = results.getBoolean("rolled_back");
long timestamp = results.getLong("time");
lines.add(new LookupLine(pos, world, type, cause, data, item, count, slot, rolledBack, timestamp));
}
}
use of com.karanumcoding.adamantineshield.enums.ActionType in project AdamantineShield by Karanum.
the class BlockLookupResult method readResult.
protected void readResult(ResultSet results) throws SQLException {
while (results.next()) {
Vector3i pos = new Vector3i(results.getInt("x"), results.getInt("y"), results.getInt("z"));
UUID world = UUID.fromString(results.getString("world"));
ActionType type = ActionType.valueCache[results.getByte("type")];
String cause = results.getString("cause");
String data = results.getString("data");
BlockType block = Sponge.getRegistry().getType(BlockType.class, results.getString("AS_Id.value")).get();
boolean rolledBack = results.getBoolean("rolled_back");
long timestamp = results.getLong("time");
lines.add(new LookupLine(pos, world, type, cause, data, block, 1, 0, rolledBack, timestamp));
}
}
Aggregations