Might as well populate the server name

This commit is contained in:
Brady
2020-03-04 11:35:11 -06:00
parent b038cedfc5
commit 8f4e3fbc0e
3 changed files with 7 additions and 1 deletions

View File

@@ -29,6 +29,10 @@ import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(ThreadLanServerPing.class)
public abstract class MixinThreadLanServerPing implements IThreadLanServerPing {
@Accessor
@Override
public abstract String getMotd();
@Accessor
@Override
public abstract String getAddress();

View File

@@ -96,7 +96,7 @@ public final class UserManager implements IUserManager, Helper {
IThreadLanServerPing lanServerPing = (IThreadLanServerPing) integratedServer.getLanServerPing();
int port = Integer.parseInt(lanServerPing.getAddress());
return connect0(session, new ServerData("", "localhost:" + port, true));
return connect0(session, new ServerData(lanServerPing.getMotd(), "localhost:" + port, true));
} catch (Exception e) {
e.printStackTrace();
return ConnectionResult.failed(CANT_RESOLVE_LAN);

View File

@@ -23,5 +23,7 @@ package baritone.utils.accessor;
*/
public interface IThreadLanServerPing {
String getMotd();
String getAddress();
}