Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try {
- ResultSet rs = sql.executeQuery("SELECT * FROM `cs_bought` WHERE `boughtBy` = '" + player.getName() + "'");
- int count = 0;
- if (rs == null)
- return;
- while (rs.next()) {
- int productId = rs.getInt("productId");
- ItemConstructor.redeemItem(player, productId);
- count++;
- }
- ChatHelper.sendToPlayer(player, ChatColor.GREEN + "Redeemed " + count + " items!");
- } catch (SQLException e) {
- ChatHelper.sendToPlayer(player, ChatColor.LIGHT_PURPLE + "There was a problem redeeming your items. " +
- "Please contact an administrator for help. " + ChatColor.GOLD + e.getMessage());
- e.printStackTrace();
- }
Advertisement
Add Comment
Please, Sign In to add comment