Might as well populate the server name
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -23,5 +23,7 @@ package baritone.utils.accessor;
|
||||
*/
|
||||
public interface IThreadLanServerPing {
|
||||
|
||||
String getMotd();
|
||||
|
||||
String getAddress();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user