mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-02-28 18:21:02 +01:00
Fixed parsing [gamemode] in placeholders (#1574)
This commit is contained in:
parent
5321e1dda6
commit
93d7fad860
@ -112,7 +112,7 @@ public class PlaceholderAPIHook extends PlaceholderHook {
|
||||
public String replacePlaceholders(@NonNull Player player, @NonNull String string) {
|
||||
// Transform [gamemode] in string to the game mode description name, or remove it for the default replacement
|
||||
String newString = BentoBox.getInstance().getIWM().getAddon(player.getWorld()).map(gm ->
|
||||
string.replace(TextVariables.GAMEMODE, gm.getDescription().getName())
|
||||
string.replace(TextVariables.GAMEMODE, gm.getDescription().getName().toLowerCase())
|
||||
).orElse(removeGMPlaceholder(string));
|
||||
return PlaceholderAPI.setPlaceholders(player, newString);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user