mirror of
https://github.com/WiIIiam278/Velocitab.git
synced 2025-03-13 13:30:01 +01:00
Fixed typo
This commit is contained in:
parent
7b8d55ba77
commit
a55bd56364
@ -97,7 +97,7 @@ groups:
|
||||
sorting_placeholders:
|
||||
- '%role_weight%'
|
||||
- '%username_lower%'
|
||||
placeholder_replaments:
|
||||
placeholder_replacements:
|
||||
'%current_date_weekday_en-US%':
|
||||
- placeholder: Monday
|
||||
replacement: <red>Monday</red>
|
||||
@ -132,5 +132,5 @@ You can use various placeholders that will be replaced with values (for example,
|
||||
### Server Links
|
||||
For Minecraft 1.21+ clients, Velocitab supports specifying a list of URLs that will be sent to display in the player pause menu. See [[Server Links]] for more information.
|
||||
|
||||
### Placeholder Replaments
|
||||
Velocitab supports replacing values of placeholders with other values. See [[Placeholders Replaments]] for more information.
|
||||
### Placeholder Replacements
|
||||
Velocitab supports replacing values of placeholders with other values. See [[Placeholders Replacements]] for more information.
|
@ -4,7 +4,7 @@ Velocitab supports placeholder replacements, which allow you to replace a placeh
|
||||
|
||||
## Configuring
|
||||
|
||||
Placeholder replacements are configured in the `placeholder_replaments` section of the every Tab Group.
|
||||
Placeholder replacements are configured in the `placeholder_replacements` section of the every Tab Group.
|
||||
You can specify a list of replacements for a placeholder, and the replacements will be applied in the order they are listed.
|
||||
|
||||
The replacements are specified as a list of objects with two properties: `placeholder` and `replacement`.
|
||||
@ -12,7 +12,7 @@ The replacements are specified as a list of objects with two properties: `placeh
|
||||
|
||||
### Example section
|
||||
```yaml
|
||||
placeholder_replaments:
|
||||
placeholder_replacements:
|
||||
'%current_date_weekday_en-US%':
|
||||
- placeholder: Monday
|
||||
replacement: <red>Monday</red>
|
||||
@ -44,7 +44,7 @@ This placeholder returns a boolean value, so you can use it to show a player's v
|
||||
|
||||
For example, if you wanted to show a player's vanish status as a color, you could use the following replacements:
|
||||
```yaml
|
||||
placeholder_replaments:
|
||||
placeholder_replacements:
|
||||
'%advancedvanish_is_vanished%':
|
||||
- placeholder: Yes
|
||||
replacement: <red>Vanished</red>
|
||||
@ -58,7 +58,7 @@ This placeholder will be replaced with the replacement text of the first replace
|
||||
|
||||
For example, if you wanted to show the current date as a color, you could use the following replacements:
|
||||
```yaml
|
||||
placeholder_replaments:
|
||||
placeholder_replacements:
|
||||
'%current_date_weekday_en-US%':
|
||||
- placeholder: Monday
|
||||
replacement: <red>Monday</red>
|
||||
@ -72,7 +72,7 @@ placeholder_replaments:
|
||||
If you have a group with multiple servers, and you have a placeholder that is not present in one of the servers, you can use the `%<placeholder>%` as a placeholder it will handle the case where the placeholder is not present in the server.
|
||||
|
||||
```yaml
|
||||
placeholder_replaments:
|
||||
placeholder_replacements:
|
||||
'%huskhomes_homes_count%':
|
||||
- placeholder: '%huskhomes_homes_count%'
|
||||
replacement: <red>No homes in this server</red>
|
||||
@ -81,7 +81,7 @@ placeholder_replaments:
|
||||
If you want you can also set the replacement as an empty string, which will be replaced with the empty string.
|
||||
|
||||
```yaml
|
||||
placeholder_replaments:
|
||||
placeholder_replacements:
|
||||
'%huskhomes_homes_count%':
|
||||
- placeholder: '%huskhomes_homes_count%'
|
||||
replacement: ''
|
@ -11,6 +11,7 @@
|
||||
* ✍️ [[Placeholders]]
|
||||
* 🔗 [[Relational Placeholders]]
|
||||
* 🔀 [[Conditional Placeholders]]
|
||||
* 📝 [[Placeholders Replacements]]
|
||||
* ✨ [[Animations]]
|
||||
* 🖼️ [[Custom Logos]]
|
||||
* 🔗 [[Server Links]]
|
||||
|
@ -47,7 +47,7 @@ public record Group(
|
||||
Nametag nametag,
|
||||
Set<String> servers,
|
||||
List<String> sortingPlaceholders,
|
||||
Map<String, List<PlaceholderReplacement>> placeholderReplaments,
|
||||
Map<String, List<PlaceholderReplacement>> placeholderReplacements,
|
||||
boolean collisions,
|
||||
int headerFooterUpdateRate,
|
||||
int placeholderUpdateRate,
|
||||
|
@ -252,7 +252,7 @@ public enum Placeholder {
|
||||
@NotNull
|
||||
private static String applyPlaceholderReplacements(@NotNull String text, @NotNull TabPlayer player,
|
||||
@NotNull Map<String, String> parsed) {
|
||||
for (final Map.Entry<String, List<PlaceholderReplacement>> entry : player.getGroup().placeholderReplaments().entrySet()) {
|
||||
for (final Map.Entry<String, List<PlaceholderReplacement>> entry : player.getGroup().placeholderReplacements().entrySet()) {
|
||||
if (!parsed.containsKey(entry.getKey())) {
|
||||
continue;
|
||||
}
|
||||
|
@ -148,8 +148,8 @@ public class TabGroups implements ConfigValidator {
|
||||
missingKeys.put(group, "sortingPlaceholders");
|
||||
}
|
||||
|
||||
if (group.placeholderReplaments() == null) {
|
||||
missingKeys.put(group, "placeholderReplaments");
|
||||
if (group.placeholderReplacements() == null) {
|
||||
missingKeys.put(group, "placeholderReplacements");
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ public class TabGroups implements ConfigValidator {
|
||||
group.nametag() == null ? DEFAULT_GROUP.nametag() : group.nametag(),
|
||||
group.servers() == null ? DEFAULT_GROUP.servers() : group.servers(),
|
||||
group.sortingPlaceholders() == null ? DEFAULT_GROUP.sortingPlaceholders() : group.sortingPlaceholders(),
|
||||
group.placeholderReplaments() == null ? DEFAULT_GROUP.placeholderReplaments() : group.placeholderReplaments(),
|
||||
group.placeholderReplacements() == null ? DEFAULT_GROUP.placeholderReplacements() : group.placeholderReplacements(),
|
||||
group.collisions(),
|
||||
group.headerFooterUpdateRate(),
|
||||
group.placeholderUpdateRate(),
|
||||
|
Loading…
Reference in New Issue
Block a user