use of de.dytanic.cloudnetcore.api.event.server.ScreenInfoEvent in project CloudNet by Dytanic.
the class PacketInSendScreenLine method handleInput.
@Override
public void handleInput(Document data, PacketSender packetSender) {
Collection<ScreenInfo> screenInfos = data.getObject("screenInfo", new TypeToken<Collection<ScreenInfo>>() {
}.getType());
CloudNet.getInstance().getEventManager().callEvent(new ScreenInfoEvent(screenInfos));
for (ScreenInfo screenInfo : screenInfos) {
if (CloudNet.getInstance().getScreenProvider().getMainServiceId() != null && screenInfo.getServiceId().getServerId().equalsIgnoreCase(CloudNet.getInstance().getScreenProvider().getMainServiceId().getServerId()))
System.out.println("[" + screenInfo.getServiceId().getServerId() + "] " + screenInfo.getLine());
}
CloudNet.getInstance().getNetworkManager().handleScreen(((INetworkComponent) packetSender), screenInfos);
}
Aggregations