Skip to content

Commit

Permalink
Add AdventureComponentConverter#fromComponentObject (#3127)
Browse files Browse the repository at this point in the history
  • Loading branch information
iiAhmedYT authored Jul 23, 2024
1 parent 9fc68d4 commit fb08567
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,15 @@ public static WrappedChatComponent fromComponent(Component component) {
return WrappedChatComponent.fromJson(SERIALIZER.serialize(component));
}

/**
* Converts an object that is instance of {@link Component} into a ProtocolLib wrapper
* @param component Component
* @return ProtocolLib wrapper
*/
public static WrappedChatComponent fromComponentObject(Object component) {
return fromComponent((Component) component);
}

/**
* Converts a {@link WrappedComponentStyle} into a {@link Style}
* @param wrapper ProtocolLib wrapper
Expand Down

0 comments on commit fb08567

Please sign in to comment.