File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,16 @@ func ExampleClient_JoinServer_offline() {
48
48
func ExampleClient_JoinServer_online () {
49
49
c := NewClient ()
50
50
51
- //Login Mojang account to get AccessToken
51
+ // Login Mojang account to get AccessToken
52
+ // To use Microsoft Account, see issue #106
53
+ // https://github.com/Tnze/go-mc/issues/106
52
54
auth , err := yggdrasil .Authenticate ("Your E-mail" , "Your Password" )
53
55
if err != nil {
54
56
panic (err )
55
57
}
56
58
59
+ // As long as you set these three fields correctly,
60
+ // the client can connect to the online-mode server
57
61
c .Auth .UUID , c .Auth .Name = auth .SelectedProfile ()
58
62
c .Auth .AsTk = auth .AccessToken ()
59
63
Original file line number Diff line number Diff line change @@ -5,8 +5,6 @@ package main
5
5
import (
6
6
"errors"
7
7
"flag"
8
- "github.com/Tnze/go-mc/bot/world"
9
- "github.com/Tnze/go-mc/level"
10
8
"log"
11
9
"time"
12
10
@@ -16,9 +14,11 @@ import (
16
14
"github.com/Tnze/go-mc/bot"
17
15
"github.com/Tnze/go-mc/bot/basic"
18
16
"github.com/Tnze/go-mc/bot/screen"
17
+ "github.com/Tnze/go-mc/bot/world"
19
18
"github.com/Tnze/go-mc/chat"
20
19
"github.com/Tnze/go-mc/data/item"
21
20
_ "github.com/Tnze/go-mc/data/lang/zh-cn"
21
+ "github.com/Tnze/go-mc/level"
22
22
)
23
23
24
24
var address = flag .String ("address" , "127.0.0.1" , "The server address" )
You can’t perform that action at this time.
0 commit comments