mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 13:15:28 +01:00
Fix code smell on placeholder replacement
This commit is contained in:
parent
259cb19cf3
commit
338764e452
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user