File tree 5 files changed +20
-7
lines changed
5 files changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ require (
14
14
github.com/google/uuid v1.6.0
15
15
github.com/pelletier/go-toml v1.9.5
16
16
github.com/rogpeppe/go-internal v1.11.0
17
- github.com/sandertv/gophertunnel v1.38 .0
17
+ github.com/sandertv/gophertunnel v1.39 .0
18
18
github.com/segmentio/fasthash v1.0.3
19
19
github.com/sirupsen/logrus v1.9.3
20
20
golang.org/x/exp v0.0.0-20230206171751-46f607a40771
@@ -26,7 +26,7 @@ require (
26
26
github.com/golang/snappy v0.0.4 // indirect
27
27
github.com/klauspost/compress v1.17.9 // indirect
28
28
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
30
30
golang.org/x/crypto v0.24.0 // indirect
31
31
golang.org/x/image v0.17.0 // indirect
32
32
golang.org/x/net v0.26.0 // indirect
Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
42
42
github.com/pmezard/go-difflib v1.0.0 /go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4 =
43
43
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M =
44
44
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 =
49
49
github.com/segmentio/fasthash v1.0.3 h1:EI9+KE1EwvMLBWwjpRDc+fEM+prwxDYbslddQGtrmhM =
50
50
github.com/segmentio/fasthash v1.0.3 /go.mod h1:waKX8l2N8yckOgmSsXJi7x1ZfdKZ4x7KRMzBtS3oedY =
51
51
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ =
Original file line number Diff line number Diff line change @@ -37,7 +37,8 @@ type Closer interface {
37
37
}
38
38
39
39
// 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.
41
41
type Submitter interface {
42
42
SendForm (form Form )
43
+ CloseForm ()
43
44
}
Original file line number Diff line number Diff line change @@ -417,6 +417,12 @@ func (p *Player) SendForm(f form.Form) {
417
417
p .session ().SendForm (f )
418
418
}
419
419
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
+
420
426
// ShowCoordinates enables the vanilla coordinates for the player.
421
427
func (p * Player ) ShowCoordinates () {
422
428
p .session ().EnableCoordinates (true )
Original file line number Diff line number Diff line change @@ -378,6 +378,12 @@ func (s *Session) SendForm(f form.Form) {
378
378
})
379
379
}
380
380
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
+
381
387
// Transfer transfers the player to a server with the IP and port passed.
382
388
func (s * Session ) Transfer (ip net.IP , port int ) {
383
389
s .writePacket (& packet.Transfer {
You can’t perform that action at this time.
0 commit comments