mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-28 13:47:32 +07:00
Added additional server commands, fixed a crash
This commit is contained in:
@ -73,6 +73,8 @@ public class NetServer extends Module{
|
||||
return;
|
||||
}
|
||||
|
||||
Log.info("Recieved connect packet for player '{0}' / UUID {1} / IP {2}", packet.name, uuid, trace.ip);
|
||||
|
||||
String ip = Net.getConnection(id).address;
|
||||
|
||||
admins.updatePlayerJoined(uuid, ip, packet.name);
|
||||
|
@ -184,6 +184,18 @@ public class Administration {
|
||||
return result;
|
||||
}
|
||||
|
||||
public Array<PlayerInfo> findByIPs(String ip){
|
||||
Array<PlayerInfo> result = new Array<>();
|
||||
|
||||
for(PlayerInfo info : playerInfo.values()){
|
||||
if(info.ips.contains(ip, false)){
|
||||
result.add(info);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public PlayerInfo getInfo(String id){
|
||||
return getCreateInfo(id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user