mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-09 16:45:44 -07:00
Update online players when a server starts up (fix flags)
This commit is contained in:
parent
78467f5821
commit
d68c50d983
3 changed files with 6 additions and 2 deletions
Binary file not shown.
|
|
@ -60,10 +60,14 @@ public final class WorldListSQLHandler extends SQLEntryHandler<GameServer> {
|
|||
return;
|
||||
}
|
||||
int players = entry.getPlayerAmount();
|
||||
WorldInfo info = entry.getInfo();
|
||||
if (!entry.isActive()) {
|
||||
players = -1;
|
||||
}
|
||||
WorldInfo info = entry.getInfo();
|
||||
if (players <= 0) {
|
||||
PreparedStatement statement = connection.prepareStatement("UPDATE members SET online='0' WHERE lastWorld='" + value + "'");
|
||||
statement.executeUpdate();
|
||||
}
|
||||
PreparedStatement statement = connection.prepareStatement("UPDATE " + table + " SET players='" + players + "', ip='" + info.getAddress() + "', country='" + info.getCountry().getId() + "', member='" + (info.isMembers() ? 1 : 0) + "', revision='" + info.getRevision() + "' WHERE world='" + value + "'");
|
||||
statement.executeUpdate();
|
||||
SQLManager.close(statement.getConnection());
|
||||
|
|
|
|||
|
|
@ -550,7 +550,7 @@ public class Player extends Entity {
|
|||
inventory.addAll(c[0]);
|
||||
if (gravestone) {
|
||||
graveManager.create(ticks, items);
|
||||
sendMessages("<col=990000>Because of your current gavestone, you have "+graveManager.getType().getDecay()+" minutes to get your items and", "<col=990000>equipment back after dying in combat.");
|
||||
sendMessages("<col=990000>Because of your current gravestone, you have "+graveManager.getType().getDecay()+" minutes to get your items and", "<col=990000>equipment back after dying in combat.");
|
||||
}
|
||||
familiarManager.dismiss();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue