package com.nelsonjrodrigues.pchud;

import java.io.IOException;

import com.nelsonjrodrigues.pchud.net.MessageListener;
import com.nelsonjrodrigues.pchud.net.NetThread;
import com.nelsonjrodrigues.pchud.net.PcMessage;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class PcHud {

    public static void main(String[] args) {

        try {
            NetThread netThread = new NetThread();
            netThread.addMessageListener(new LogMessageListener());
            netThread.start();

            netThread.join();
        } catch (IOException | InterruptedException e) {
            log.error(e.getMessage(), e);
        }
        log.debug("Exiting");

    }

    @Slf4j
    private static class LogMessageListener implements MessageListener {

        @Override
        public void onMessage(PcMessage message) {
            log.debug("OnMessage {}", message);
        }

        @Override
        public void onTimeout() {
            log.debug("OnTimeout");
        }

    }

}

@@ -211,16 +211,64 @@
 Message;
+%0Aimport com.nelsonjrodrigues.pchud.world.Worlds;
 %0A%0Aimport
@@ -296,16 +296,18 @@
 Slf4j;%0A%0A
+%0A%0A
 @Slf4j%0Ap
@@ -369,24 +369,163 @@
 %5B%5D args) %7B%0A%0A
+%0A        Worlds worlds = new Worlds();%0A        worlds.addPropertyChangeListener(evt -%3E %7B%0A            log.debug(%22%7B%7D%22, worlds);%0A        %7D);%0A%0A
         try 
@@ -645,16 +645,66 @@
 ner());%0A
+            netThread.addMessageListener(worlds);%0A
         
@@ -753,24 +753,24 @@
 ead.join();%0A
-
         %7D ca
@@ -766,16 +766,24 @@
        %7D
+%0A       
  catch (

Add Worlds model to main class