@Override
 public void unpunishPlayer(final Player player) {
   DB.insertUpdate(
       DELETE_QUERY,
       new IUStH() {
         @Override
         public void handleInsertUpdate(PreparedStatement ps) throws SQLException {
           ps.setInt(1, player.getObjectId());
           ps.execute();
         }
       });
 }
 @Override
 public void storePlayerPunishments(final Player player) {
   DB.insertUpdate(
       UPDATE_QUERY,
       new IUStH() {
         @Override
         public void handleInsertUpdate(PreparedStatement ps) throws SQLException {
           ps.setInt(1, player.isInPrison() ? 1 : 0);
           ps.setLong(2, player.getPrisonTimer());
           ps.setInt(3, player.getObjectId());
           ps.execute();
         }
       });
 }
 @Override
 public void punishPlayer(final Player player, final int mode) {
   DB.insertUpdate(
       REPLACE_QUERY,
       new IUStH() {
         @Override
         public void handleInsertUpdate(PreparedStatement ps) throws SQLException {
           ps.setInt(1, player.getObjectId());
           ps.setInt(2, mode);
           ps.setLong(3, player.getPrisonTimer());
           ps.execute();
         }
       });
 }
Example #4
0
  @Override
  public void insertNames(final int id, final String oldname, final String newname) {
    DB.insertUpdate(
        INSERT_QUERY,
        new IUStH() {

          @Override
          public void handleInsertUpdate(PreparedStatement stmt) throws SQLException {
            stmt.setInt(1, id);
            stmt.setString(2, oldname);
            stmt.setString(3, newname);
            stmt.execute();
          }
        });
  }