Skip to content

FakePlayer Vote Manager API

Featured Replies

i got this error when i spawned fake player(elfo system) and trying to vote from vote manager api based. i added client null check but again the same..

 

api based get ip and client code

 

public void retrieve(Player player)
    {
        if (player.getClient() == null)
            return;
        try (Connection con = L2DatabaseFactory.getInstance().getConnection(); PreparedStatement ps = con.prepareStatement("SELECT * FROM character_vote WHERE ip=?"))
        {
            ps.setString(1, player.getIP());
            try (ResultSet rs = ps.executeQuery())
            {
                while (rs.next())
                    player.getVoteData().put(VoteSite.valueOf(rs.getString("site")), rs.getLong("time"));
            }
        }
        catch (Exception e)
        {
            _log.warning("Couldn't load vote data for player " + player.getName());
        }
    }

Untitled.png

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.