Skip to content

Commit

Permalink
Change return type to ComponentLike
Browse files Browse the repository at this point in the history
  • Loading branch information
Warriorrrr committed Apr 26, 2023
1 parent b44de48 commit 4a27d05
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/com/palmergames/bukkit/towny/utils/TownyComponents.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ public static Component joinList(List<Component> components, Component delimiter
* @param objects The objects to convert
* @return The formatted list of components
*/
public static List<Component> convert(final @NotNull Object @NotNull... objects) {
final List<Component> components = new ArrayList<>();
public static List<ComponentLike> convert(final @NotNull Object @NotNull... objects) {
final List<ComponentLike> components = new ArrayList<>();

for (Object object : objects) {
if (object instanceof ComponentLike like)
components.add(like.asComponent());
components.add(like);
else
components.add(miniMessage(object.toString()));
}
Expand Down

0 comments on commit 4a27d05

Please sign in to comment.