add online mode guide to daze example
This commit is contained in:
@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
// "github.com/Tnze/go-mc/authenticate"
|
||||||
"github.com/Tnze/go-mc/bot"
|
"github.com/Tnze/go-mc/bot"
|
||||||
"github.com/Tnze/go-mc/chat"
|
"github.com/Tnze/go-mc/chat"
|
||||||
"log"
|
"log"
|
||||||
@ -8,6 +9,15 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
c := bot.NewClient()
|
c := bot.NewClient()
|
||||||
|
// For online-mode, you need login your Mojang account
|
||||||
|
// and load your Name and UUID to client:
|
||||||
|
//
|
||||||
|
// auth, err := authenticate.Authenticate(Your E-mail", "Your Password")
|
||||||
|
// if err != nil {
|
||||||
|
// panic(err)
|
||||||
|
// }
|
||||||
|
// c.Name, c.AsTk = auth.SelectedProfile.Name, auth.SelectedProfile.ID
|
||||||
|
|
||||||
//Login
|
//Login
|
||||||
err := c.JoinServer("localhost", 25565)
|
err := c.JoinServer("localhost", 25565)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user