Forge constant for close command message

This commit is contained in:
Anthony Calosa
2020-04-06 09:21:10 +08:00
parent b6408100e5
commit aa86f8eae3
3 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
package forge.net;
import forge.match.LobbySlotType;
import forge.properties.ForgeConstants;
import org.apache.commons.lang3.StringUtils;
import forge.GuiBase;
@@ -179,7 +180,7 @@ public class NetConnectUtil {
}
catch (Exception ex) {
//return a message to close the connection so we will not crash...
return new ChatMessage(null, "<<_EM_ESOLC_<<");
return new ChatMessage(null, ForgeConstants.CLOSE_CONN_COMMAND);
}
return new ChatMessage(null, String.format("Connected to %s:%d", hostname, port));

View File

@@ -237,6 +237,7 @@ public final class ForgeConstants {
public static final String QUEST_PREFS_FILE = USER_PREFS_DIR + "quest.preferences";
public static final String CONQUEST_PREFS_FILE = USER_PREFS_DIR + "conquest.preferences";
public static final String ITEM_VIEW_PREFS_FILE = USER_PREFS_DIR + "item_view.preferences";
public static final String CLOSE_CONN_COMMAND = "<<_EM_ESOLC_<<";
// data that has defaults in the program dir but overrides/additions in the user dir
private static final String _DEFAULTS_DIR = RES_DIR + "defaults" + PATH_SEPARATOR;