Q:

Is there a simple/complicated way to create requestData() method using Sockets

As the title says, I need a way(no matter if its complicated or not) to create a getData() method that would send request packet to the server > receive the message I already have the system setup but I have a problem with it that I only get the result in PluginMessageReceiveEvent Here's my code with explanations:
public String requestData(String path) {
    SocketUtils.sendData("REQUEST|" + p.getPlayer().getUniqueId() + "|" + path, "playerconfig", "BUNGEE");
    return /*Need to get data from the plugin message to here*/;
}

@EventHandler
public void onPluginMessageReceive(PluginMessageReceiveEvent e) {
    if (e.getChannel().equalsIgnoreCase("playerconfig")) {
        String[] args = e.getMessage().split("\\|");
        String uuid = args[0];
        String path = args[1];//Maybe a HashMap<Path, Data> but that would make the requestData() result return null because you don't get the data instantly.
        String data = args[2].replace("_", " ");
        if (uuid.equals(p.getPlayer().getUniqueId() + "")) {
            return data; //I need to get this result on request data method.
        }
    }
}

A:

A simple solution is to wait on a lock in the requestData and notify that lock in onPluginMessageReceive. Something like this:
 synchronized(this) {
    wait();
 }

And in your receive method:
 synchronized(this) {
    notifyAll();
 }

Make the data a member field of the class.
Look out for exception handling and syntax errors.

