You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
package app.entities.server.players;
|
|
|
|
import app.entities.other.SteamID;
|
|
import app.entities.server.players.DefaultPlayer;
|
|
import app.utils.SteamIDConverter;
|
|
import lombok.Data;
|
|
|
|
import java.util.List;
|
|
|
|
@Data
|
|
public class RCONPlayer extends DefaultPlayer {
|
|
String duration;
|
|
int id;
|
|
String ip;
|
|
int loss;
|
|
int ping;
|
|
String state;
|
|
String steam2;
|
|
SteamID steam;
|
|
|
|
public RCONPlayer(List<String> status_line) {
|
|
id = Integer.parseInt(status_line.get(1));
|
|
ip = status_line.get(status_line.size() - 1);
|
|
state = status_line.get(status_line.size() - 2);
|
|
loss = Integer.parseInt(status_line.get(status_line.size() - 3));
|
|
ping = Integer.parseInt(status_line.get(status_line.size() - 4));
|
|
duration = status_line.get(status_line.size() - 5);
|
|
steam2 = status_line.get(status_line.size() - 6);
|
|
name = String.join(" ", status_line.subList(2, status_line.size() - 6));
|
|
name = name.substring(1, name.length()-1);
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
steam = SteamIDConverter.getSteamID(steam2);
|
|
}
|
|
}
|
|
|