Package networking.request

Source Code of networking.request.RequestSeeOnlinePlayers

package networking.request;

import core.GameServer;

import java.io.IOException;

import networking.response.ResponseSeeOnlinePlayers;

/**
*
* @author Xuyuan
*/
public class RequestSeeOnlinePlayers extends GameRequest {

    // Responses
    private ResponseSeeOnlinePlayers responseSeeOnlinePlayers;

    public RequestSeeOnlinePlayers() {
        responses.add(responseSeeOnlinePlayers = new ResponseSeeOnlinePlayers());
    }

    @Override
    public void parse() throws IOException {
        //Nothing here.
    }

    @Override
    public void doBusiness() throws Exception {
        responseSeeOnlinePlayers.setOnlinePlayers(GameServer.getInstance().getActivePlayers());
    }
}
TOP

Related Classes of networking.request.RequestSeeOnlinePlayers

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.