SHARE
TWEET

Untitled

a guest Jun 25th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. kryonetClient.addListener(new Listener() {
  2.             public void received (Connection connection, Object object) {
  3.                 if (object instanceof List) {
  4.                     if (((ArrayList) object).size() > 0){
  5.                         ArrayList recievedList = (ArrayList) object;
  6.                         if (recievedList.get(0) instanceof Dish){
  7.                             client.setDishes(recievedList);
  8.                         }
  9.                     }
  10.                 }
  11.             }
  12.         });
  13.      
  14. public void sendMessageToAll(List<Dish> dishes){
  15.         System.out.println(dishes);
  16.         System.out.println("SENDING DISHES");
  17.         if (kryonetServer.getConnections() != null && dishes != null){
  18.             kryonetServer.sendToAllTCP(dishes);
  19.         }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top