How can i do method to delete all recipe from any crafter?
public static void DeleteRecpe(L2PcInstance activeChar)
{
try (Connection con = L2DatabaseFactory.getInstance().getConnection())
{
PreparedStatement statement = con.prepareStatement("DELETE FROM character_recipebook WHERE char_obj_id=?");
statement.setInt(1, activeChar.getObjectId());
statement.execute();
statement.close();
}
catch (Exception e)
{
_log.log(Level.WARNING,"Something went wrong", e);
}
}
Its something like this ?