Skip to content

Commit

Permalink
updated to forked version of mcwss
Browse files Browse the repository at this point in the history
  • Loading branch information
pathtofile committed Jun 6, 2022
1 parent ce41df2 commit e8c9f1a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/0xrawsec/golang-win32 v1.0.10
github.com/bradleyjkemp/sigma-go v0.2.8
github.com/sandertv/mcwss v1.2.0
github.com/pathtofile/mcwss v1.2.2
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE=
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/pathtofile/mcwss v1.2.2 h1:/ycn7jynzvXYKkuJnMpCB7BnFtnpxF2ATle9ApH2EXs=
github.com/pathtofile/mcwss v1.2.2/go.mod h1:96gBP5tbFM6LpSGZB3TzFxiptbrIAo5E23Dl+tJ8wqc=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/sftp v1.10.0/go.mod h1:NxmoDg/QLVWluQDUYG7XBZTLUpKeFa8e3aMf1BfjyHk=
github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sandertv/mcwss v1.2.0 h1:YCMbuCrpl2PXcD51t4OSM/ZBqi5R/JcvmW48YUoim90=
github.com/sandertv/mcwss v1.2.0/go.mod h1:zsYlgPVZ3qudfYipsTYY0R8jIF3Uj66HDGBEPmT407k=
github.com/sanity-io/litter v1.3.0/go.mod h1:5Z71SvaYy5kcGtyglXOC9rrUi3c1E8CamFWjQsazTh0=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
Expand Down
8 changes: 4 additions & 4 deletions src/minecraft.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"golang.org/x/sync/errgroup"

"github.com/bradleyjkemp/sigma-go"
"github.com/sandertv/mcwss"
"github.com/sandertv/mcwss/protocol/event"
"github.com/pathtofile/mcwss"
"github.com/pathtofile/mcwss/protocol/event"
)

var MinecraftPlayers []*mcwss.Player
Expand Down Expand Up @@ -140,7 +140,7 @@ func RaiseAlert(event map[string]string, rule *sigma.Rule, channel string) {
if rand.Float32() < 0.5 {
zPos = zPos * -1
}
fmt.Printf("[m] Spawning %s at %d:%d from player %s:\n", entity, xPos, zPos, player.Name())
fmt.Printf("[m] Spawning %s at %d:%d from player %s\n", entity, xPos, zPos, player.Name())
spawnCmd := fmt.Sprintf("summon %s \"%s\" ~%d ~ ~%d", entity, name, xPos, zPos)
player.Exec(spawnCmd, nil)

Expand All @@ -164,7 +164,7 @@ func actionbar(player *mcwss.Player, message string) {
}

func onMessage(event *event.PlayerMessage) {
if event.Sender != "Script Engine" || event.MessageType != "tell" {
if event.Sender != "Script Engine" || event.Type != "tell" {
return
}
// First trim quotes, then check and trim prefix
Expand Down

0 comments on commit e8c9f1a

Please sign in to comment.