Fix code smell on placeholder replacement

This commit is contained in:
tastybento 2019-05-18 16:04:33 -07:00
parent 259cb19cf3
commit 338764e452

View File

@ -131,10 +131,6 @@ public class PlaceholdersManager {
* @since 1.5.0
*/
public String replacePlaceholders(@NonNull Player player, @NonNull String string) {
if (getPlaceholderAPIHook().isPresent()) {
string = getPlaceholderAPIHook().get().replacePlaceholders(player, string);
}
return string;
return getPlaceholderAPIHook().map(h -> h.replacePlaceholders(player, string)).orElse(string);
}
}