Closed XMichaelLP closed 3 years ago
While this is a cool idea, it would make the library require either a dependency on ProtocolLib, or the inclusion of PacketEvents. Those are both pretty large dependencies for this library, and I believe that you could pretty easily achieve what you're looking for by listening to the events yourself with one of those dependencies.
For example, you'd create an incoming packet listener for PacketPlayInItemName
. Have an AnvilGUiHelper
class in your project which opens AnvilGUI
s, and once opened, stores the object reference in a Map<Player, AnvilGUI>
. In your packet listener, you can now check if the player has an AnvilGUI
open, and modify the incoming text accordingly, or call a method on the AnvilGUI
object.
Is it possible that if the player enters something in the AnvilGUI, that the text will be sent without pressing the item beforehand. So that you know what I mean, similar to the TabCompleteEvent only with an anvil. Could you develop something like that?