MCPcopy Create free account
hub / github.com/demoth/jake2 / getClientsForInstance

Method getClientsForInstance

server/src/main/java/jake2/server/SV_MAIN.java:70–78  ·  view source on GitHub ↗
(final String gameName)

Source from the content-addressed store, hash-verified

68 public static Map<String, GameImportsImpl> games = new HashMap<>();
69
70 @Override
71 public List<client_t> getClientsForInstance(final String gameName) {
72 if (!games.containsKey(gameName)) {
73 // happens during the game instance creation, while the instance has random name
74 Com.Printf("Game " + gameName + " is not found!\n");
75 }
76 // nullify unrelated clients
77 return clients.stream().map(c -> c.gameName != null && c.gameName.equals(gameName) ? c : null).collect(Collectors.toList());
78 }
79
80
81 /**

Callers 1

SV_BroadcastPrintfMethod · 0.95

Calls 2

PrintfMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected