Skip to content

Commit f4b9d9a

Browse files
dragonfly: Update to support 1.21.2
1 parent 961d52b commit f4b9d9a

File tree

5 files changed

+20
-7
lines changed

5 files changed

+20
-7
lines changed

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
github.com/google/uuid v1.6.0
1515
github.com/pelletier/go-toml v1.9.5
1616
github.com/rogpeppe/go-internal v1.11.0
17-
github.com/sandertv/gophertunnel v1.38.0
17+
github.com/sandertv/gophertunnel v1.39.0
1818
github.com/segmentio/fasthash v1.0.3
1919
github.com/sirupsen/logrus v1.9.3
2020
golang.org/x/exp v0.0.0-20230206171751-46f607a40771
@@ -26,7 +26,7 @@ require (
2626
github.com/golang/snappy v0.0.4 // indirect
2727
github.com/klauspost/compress v1.17.9 // indirect
2828
github.com/muhammadmuzzammil1998/jsonc v1.0.0 // indirect
29-
github.com/sandertv/go-raknet v1.14.0 // indirect
29+
github.com/sandertv/go-raknet v1.14.1 // indirect
3030
golang.org/x/crypto v0.24.0 // indirect
3131
golang.org/x/image v0.17.0 // indirect
3232
golang.org/x/net v0.26.0 // indirect

go.sum

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
4242
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
4343
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
4444
github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
45-
github.com/sandertv/go-raknet v1.14.0 h1:2vtO1m1DFLFszeCcV7mVZfVgkDcAbSxcjM2BlrVrEGs=
46-
github.com/sandertv/go-raknet v1.14.0/go.mod h1:/yysjwfCXm2+2OY8mBazLzcxJ3irnylKCyG3FLgUPVU=
47-
github.com/sandertv/gophertunnel v1.38.0 h1:hGCq9uhAmIFOLAaw/qcLkmcHVo7dVzf3I9Iqx0GOb+0=
48-
github.com/sandertv/gophertunnel v1.38.0/go.mod h1:nqbZPCBZmKot/DHiY4efq8QQj6gvLvIk8LWPxXF8+6g=
45+
github.com/sandertv/go-raknet v1.14.1 h1:V2Gslo+0x4jfj+p0PM48mWxmMbYkxSlgeKy//y3ZrzI=
46+
github.com/sandertv/go-raknet v1.14.1/go.mod h1:/yysjwfCXm2+2OY8mBazLzcxJ3irnylKCyG3FLgUPVU=
47+
github.com/sandertv/gophertunnel v1.39.0 h1:Am2NhSQjxscAVihRG/Qz7cfyJJp91RIl/5DpSLbwXp0=
48+
github.com/sandertv/gophertunnel v1.39.0/go.mod h1:uSaX7RbVaCcxsGAx2vyZnkT0M6kZFGCdAqLn0+wuKyY=
4949
github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM=
5050
github.com/segmentio/fasthash v1.0.3/go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY=
5151
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=

server/player/form/submit.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ type Closer interface {
3737
}
3838

3939
// Submitter is an entity that is able to submit a form sent to it. It is able to fill out fields in the form
40-
// which will then be present when handled.
40+
// which will then be present when handled. The Submitter is also able to close the form.
4141
type Submitter interface {
4242
SendForm(form Form)
43+
CloseForm()
4344
}

server/player/player.go

+6
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,12 @@ func (p *Player) SendForm(f form.Form) {
417417
p.session().SendForm(f)
418418
}
419419

420+
// CloseForm closes any forms that the player currently has open. If the player has no forms open, nothing
421+
// happens.
422+
func (p *Player) CloseForm() {
423+
p.session().CloseForm()
424+
}
425+
420426
// ShowCoordinates enables the vanilla coordinates for the player.
421427
func (p *Player) ShowCoordinates() {
422428
p.session().EnableCoordinates(true)

server/session/player.go

+6
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,12 @@ func (s *Session) SendForm(f form.Form) {
378378
})
379379
}
380380

381+
// CloseForm closes any forms that the player currently has open. If the player has no forms open, nothing
382+
// happens.
383+
func (s *Session) CloseForm() {
384+
s.writePacket(&packet.ClientBoundCloseForm{})
385+
}
386+
381387
// Transfer transfers the player to a server with the IP and port passed.
382388
func (s *Session) Transfer(ip net.IP, port int) {
383389
s.writePacket(&packet.Transfer{

0 commit comments

Comments
 (0)