use of de.dytanic.cloudnet.api.handlers.NetworkHandler in project CloudNet by Dytanic.
the class PacketInLoginPlayer method handleInput.
@Override
public void handleInput(Document data, PacketSender packetSender) {
if (CloudAPI.getInstance() != null) {
CloudPlayer cloudPlayer = data.getObject("player", CloudPlayer.TYPE);
CloudAPI.getInstance().getNetworkHandlerProvider().iterator(new Runnabled<NetworkHandler>() {
@Override
public void run(NetworkHandler obj) {
obj.onPlayerLoginNetwork(cloudPlayer);
}
});
}
}
use of de.dytanic.cloudnet.api.handlers.NetworkHandler in project CloudNet by Dytanic.
the class PacketInCloudNetwork method handleInput.
@Override
public void handleInput(Document data, PacketSender packetSender) {
if (CloudAPI.getInstance() != null) {
CloudNetwork cloudNetwork = data.getObject("cloudnetwork", NetworkUtils.cloudnet().getType());
CloudAPI.getInstance().setCloudNetwork(cloudNetwork);
CloudAPI.getInstance().getNetworkHandlerProvider().iterator(new Runnabled<NetworkHandler>() {
@Override
public void run(NetworkHandler obj) {
obj.onCloudNetworkUpdate(cloudNetwork);
}
});
}
}
Aggregations