Skip to content

A set of unsafe but useful utilities to access normally private features of dragonfly

Notifications You must be signed in to change notification settings

bedrock-gophers/unsafe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unsafe Utils

The unsafe library allows for use and access of lower level Dragonfly tooling (such as direct packet writing and access to the network sessions) for processes which would otherwise be impossible without using reflection.

Note: This library is called unsafe for a reason; it uses the Go unsafe library to access private fields of Go structs. This behavior is very hacky and parts of this library should only be used if they are not natively possible by any means via Dragonfly/Gophertunnel

Importing

You may import Unsafe Utils via the Go CLI

go get github.com/bedrock-gophers/unsafe

Examples

You may write a network packet directly to a player via the use of unsafe.WritePacket

unsafe.WritePacket(p, packet.SetActorData{
    ...
})

About

A set of unsafe but useful utilities to access normally private features of dragonfly

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages