Skip to content

Commit

Permalink
Fix replace method with component maps
Browse files Browse the repository at this point in the history
  • Loading branch information
Phoenix616 committed Nov 14, 2020
1 parent 70d24a9 commit 4023fb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/de/themoep/minedown/adventure/Replacer.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public Replacer replace(Map<String, ?> replacements) {
Object any = replacements.values().stream().filter(Objects::nonNull).findAny().orElse(null);
if (any instanceof String) {
replacements().putAll((Map<String, String>) replacements);
} else if (any != null && any.getClass().isArray() && Component.class.isAssignableFrom(any.getClass().getComponentType())) {
} else if (any instanceof Component) {
componentReplacements().putAll((Map<String, Component>) replacements);
} else {
for (Map.Entry<String, ?> entry : replacements.entrySet()) {
Expand Down

0 comments on commit 4023fb0

Please sign in to comment.