Add AdventureComponentConverter#fromComponentObject#3127
Add AdventureComponentConverter#fromComponentObject#3127dmulloy2 merged 2 commits intodmulloy2:masterfrom
Conversation
|
What are the use cases if you can already do: |
|
It's used incase you can't do that, i think that should be clear o.O ProtocolLib is a hacky reflective workaround for packets so using reflections with it and other hacky code is totally expected (especially with what paper does to packets nowadays) |
Firstly, why is this necessary when the method you added doesn't add any new functionality? Secondly, I don't see a clear use case for this addition. All it does is cast an object to a component, which you can also do in your own code. Can you clarify the specific scenarios where this would be beneficial? |
|
Im not home to explain it with high detail but here is simple one that requires you to read the description of the pr again If i cast my component object to my.relocated.adventure.Component that won't work with net.kyori.adventure.Component especially that i got that component from ProtocolLib from the system chat packet so it uses the default location not the relocated one because thats what relocation does 😄 |
|
Ah your talking about the kind of relocation while shading something into your jar. That was the missing piece of information that made this PR look kind unnecessary to me. Ok than it's a valid change, nvm the previous comments. |
Helps when relocating Adventure on your plugin and still listening to packets containing adventure components