mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Support copying url to clipboard when hosting
This commit is contained in:
@@ -97,7 +97,14 @@ public class NetConnectUtil {
|
||||
|
||||
view.update(true);
|
||||
|
||||
return String.format("Hosting on port %d", port);
|
||||
return String.format("Hosting on port %d.", port);
|
||||
}
|
||||
|
||||
public static void copyHostedServerUrl() {
|
||||
String hostname = "localhost";
|
||||
String url = hostname + ":" + ForgeProfileProperties.getServerPort();
|
||||
GuiBase.getInterface().copyToClipboard(url);
|
||||
SOptionPane.showMessageDialog("Share the following URL with anyone who wishes to join your server. It has been copied to your clipboard for convenience.\n\n" + url, "Server URL", SOptionPane.INFORMATION_ICON);
|
||||
}
|
||||
|
||||
public static String join(final String url, final IOnlineLobby onlineLobby, final IOnlineChatInterface chatInterface) {
|
||||
|
||||
Reference in New Issue
Block a user