- 0
This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..
Question
cicos
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());
}
}
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now