package ru.nevetime.clientirc; public final class IrcMessage { public String type; public String client; public String player; public String message; public String token; public String dimensionId; public Double x; public Double y; public Double z; public long timestamp; public static IrcMessage hello(String clientName, String playerName, String token) { IrcMessage m = new IrcMessage(); m.type = "hello"; m.client = clientName; m.player = playerName; m.token = token; m.timestamp = System.currentTimeMillis(); return m; } public static IrcMessage chat(String clientName, String playerName, String text, String token) { IrcMessage m = new IrcMessage(); m.type = "chat"; m.client = clientName; m.player = playerName; m.message = text; m.token = token; m.timestamp = System.currentTimeMillis(); return m; } public static IrcMessage markerSet(String clientName, String playerName, String token, String dimensionId, double x, double y, double z) { IrcMessage m = new IrcMessage(); m.type = "marker_set"; m.client = clientName; m.player = playerName; m.token = token; m.dimensionId = dimensionId; m.x = x; m.y = y; m.z = z; m.timestamp = System.currentTimeMillis(); return m; } public static IrcMessage markerRemove(String clientName, String playerName, String token) { IrcMessage m = new IrcMessage(); m.type = "marker_remove"; m.client = clientName; m.player = playerName; m.token = token; m.timestamp = System.currentTimeMillis(); return m; } }