Skip to content

Commit

Permalink
style(prettier): prettified code
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurfiorette authored and actions-user committed Aug 17, 2021
1 parent 3d04b9d commit 965903c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

import com.github.arthurfiorette.sinklibrary.config.BaseConfig;
import com.github.arthurfiorette.sinklibrary.replacer.Replacer;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import org.bukkit.Color;
import org.bukkit.OfflinePlayer;
import org.bukkit.configuration.Configuration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
import org.bukkit.ChatColor;

import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.bukkit.ChatColor;

@NoArgsConstructor
public class Replacer {
Expand All @@ -29,7 +28,7 @@ public Replacer merge(@NonNull final Replacer other) {
//

public String replace(@NonNull String text) {
for(final Entry<String, Object> entry: placeholders.entrySet()) {
for (final Entry<String, Object> entry : placeholders.entrySet()) {
text = text.replaceAll(entry.getKey(), entry.getValue().toString().toString());
}
return text;
Expand All @@ -54,11 +53,10 @@ public static String replace(final String text, @NonNull final Function fn) {

@FunctionalInterface
public interface Function {

Replacer apply(Replacer replacer);

default Function add(final String placeholder, final Object value) {
return r -> r.add(placeholder, value);
}
}
}
}

0 comments on commit 965903c

Please sign in to comment.