use of org.spongepowered.api.network.status.StatusResponse in project SpongeCommon by SpongePowered.
the class SpongeStatusResponse method clone.
private static ServerStatusResponse clone(ServerStatusResponse original) {
ServerStatusResponse clone = new ServerStatusResponse();
clone.setServerDescription(original.getServerDescription());
if (original.getFavicon() != null) {
((ClientPingServerEvent.Response) clone).setFavicon(((StatusResponse) original).getFavicon().get());
}
clone.setPlayers(clone(original.getPlayers()));
clone.setVersion(clone(original.getVersion()));
return clone;
}
use of org.spongepowered.api.network.status.StatusResponse in project SpongeCommon by SpongePowered.
the class SpongeStatusResponse method clone.
private static ServerStatus clone(final ServerStatus original) {
final ServerStatus clone = new ServerStatus();
clone.setDescription(original.getDescription());
if (original.getFavicon() != null) {
((ClientPingServerEvent.Response) clone).setFavicon(((StatusResponse) original).favicon().get());
}
clone.setPlayers(SpongeStatusResponse.clone(original.getPlayers()));
clone.setVersion(SpongeStatusResponse.clone(original.getVersion()));
return clone;
}
use of org.spongepowered.api.network.status.StatusResponse in project Sponge by SpongePowered.
the class SpongeStatusResponse method clone.
private static ServerStatus clone(final ServerStatus original) {
final ServerStatus clone = new ServerStatus();
clone.setDescription(original.getDescription());
if (original.getFavicon() != null) {
((ClientPingServerEvent.Response) clone).setFavicon(((StatusResponse) original).favicon().get());
}
clone.setPlayers(SpongeStatusResponse.clone(original.getPlayers()));
clone.setVersion(SpongeStatusResponse.clone(original.getVersion()));
return clone;
}
Aggregations