Skip to content

Commit 46de5dc

Browse files
Merge branch 'WiIIiam278:master' into master
2 parents 95414c8 + 2d2c3ad commit 46de5dc

21 files changed

Lines changed: 241 additions & 110 deletions

.github/workflows/ci.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
steps:
2020
- name: 'Checkout for CI 🛎️'
2121
uses: actions/checkout@v4
22-
- name: 'Set up JDK 17 📦'
22+
- name: 'Set up JDK 21 📦'
2323
uses: actions/setup-java@v4
2424
with:
25-
java-version: '17'
25+
java-version: '21'
2626
distribution: 'temurin'
2727
- name: 'Build with Gradle 🏗️'
2828
uses: gradle/gradle-build-action@v3
@@ -128,4 +128,8 @@ jobs:
128128
1.21.3
129129
1.21.4
130130
1.21.5
131-
java: 17
131+
1.21.6
132+
1.21.7
133+
1.21.8
134+
1.21.9
135+
java: 21

.github/workflows/pr_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
steps:
1515
- name: 'Checkout for CI 🛎'
1616
uses: actions/checkout@v4
17-
- name: 'Set up JDK 17 📦'
17+
- name: 'Set up JDK 21 📦'
1818
uses: actions/setup-java@v4
1919
with:
20-
java-version: '17'
20+
java-version: '21'
2121
distribution: 'temurin'
2222
- name: 'Build with Gradle 🏗️'
2323
uses: gradle/gradle-build-action@v3

.github/workflows/release.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
steps:
1616
- name: 'Checkout for CI 🛎️'
1717
uses: actions/checkout@v4
18-
- name: 'Set up JDK 17 📦'
18+
- name: 'Set up JDK 21 📦'
1919
uses: actions/setup-java@v4
2020
with:
21-
java-version: '17'
21+
java-version: '21'
2222
distribution: 'temurin'
2323
- name: 'Build with Gradle 🏗️'
2424
uses: gradle/gradle-build-action@v3
@@ -117,4 +117,8 @@ jobs:
117117
1.21.3
118118
1.21.4
119119
1.21.5
120-
java: 17
120+
1.21.6
121+
1.21.7
122+
1.21.8
123+
1.21.9
124+
java: 21

.github/workflows/update_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
- name: 'Checkout for CI 🛎️'
2121
uses: actions/checkout@v4
2222
- name: 'Push Docs to Github Wiki 📄️'
23-
uses: Andrew-Chen-Wang/github-wiki-action@v4
23+
uses: Andrew-Chen-Wang/github-wiki-action@v5
2424
with:
2525
path: 'docs'

build.gradle

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import org.apache.tools.ant.filters.ReplaceTokens
22

33
plugins {
44
id 'xyz.jpenilla.run-velocity' version '2.3.1'
5-
id 'com.gradleup.shadow' version '8.3.6'
5+
id 'com.gradleup.shadow' version '8.3.8'
66
id 'org.cadixdev.licenser' version '0.6.1'
7-
id 'org.ajoberstar.grgit' version '5.3.0'
7+
id 'org.ajoberstar.grgit' version '5.3.2'
88
id 'maven-publish'
99
id 'java'
1010
}
@@ -25,10 +25,10 @@ ext {
2525

2626
repositories {
2727
mavenCentral()
28+
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
2829
maven { url = 'https://repo.william278.net/velocity/' }
2930
maven { url = 'https://repo.william278.net/releases/' }
3031
maven { url = 'https://repo.william278.net/snapshots/' }
31-
maven { url = 'https://repo.papermc.io/repository/maven-public/' }
3232
maven { url = 'https://repo.minebench.de/' }
3333
maven { url = 'https://jitpack.io' }
3434
}
@@ -41,9 +41,9 @@ dependencies {
4141
compileOnly 'io.netty:netty-codec-http:4.2.2.Final'
4242
compileOnly 'org.projectlombok:lombok:1.18.38'
4343
compileOnly 'net.luckperms:api:5.5'
44-
compileOnly 'io.github.miniplaceholders:miniplaceholders-api:2.2.3'
45-
compileOnly 'it.unimi.dsi:fastutil:8.5.15'
46-
compileOnly 'net.kyori:adventure-nbt:4.21.0'
44+
compileOnly 'io.github.miniplaceholders:miniplaceholders-api:3.0.1'
45+
compileOnly 'it.unimi.dsi:fastutil:8.5.16'
46+
compileOnly 'net.kyori:adventure-nbt:4.23.0'
4747

4848
implementation 'org.apache.commons:commons-text:1.13.1'
4949
implementation 'net.william278:desertwell:2.0.4'
@@ -52,17 +52,25 @@ dependencies {
5252
implementation 'de.exlll:configlib-yaml:4.6.1'
5353
implementation 'org.mvel:mvel2:2.5.2.Final'
5454
implementation 'net.jodah:expiringmap:0.5.11'
55-
implementation 'net.william278.toilet:toilet-velocity:1.0.12'
55+
implementation 'net.william278.toilet:toilet-velocity:1.0.14'
5656

5757
annotationProcessor 'org.projectlombok:lombok:1.18.38'
5858
}
5959

6060
processResources {
61-
def tokenMap = rootProject.ext.properties
62-
tokenMap.merge("grgit",'',(s, s2) -> s)
61+
def tokenMap = [:]
62+
rootProject.ext.properties.each { key, value ->
63+
if (value != null) {
64+
tokenMap[key] = value.toString()
65+
}
66+
}
67+
6368
filesMatching(['**/*.json', '**/*.yml']) {
64-
filter ReplaceTokens as Class, beginToken: '${', endToken: '}',
65-
tokens: tokenMap
69+
filter(ReplaceTokens,
70+
'beginToken': '${',
71+
'endToken' : '}',
72+
'tokens' : tokenMap
73+
)
6674
}
6775
}
6876

@@ -169,7 +177,7 @@ tasks {
169177

170178
downloadPlugins {
171179
// github ("WiIIiam278", "PAPIProxyBridge", "1.7.1", "PAPIProxyBridge-Velocity-1.7.1.jar")
172-
modrinth ("miniplaceholders", "2.2.4")
180+
modrinth ("miniplaceholders", "3.0.1")
173181
}
174182
}
175183
}

docs/Conditional-Placeholders.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
Conditional placeholders allow you to display different values based on certain conditions. The format
22
is `<velocitab_condition|<condition>|<true>|<false>>` and the relational format is `<velocitab_rel_condition|<condition>|<true>|<false>>`.
33

4-
Currently, this system is only available for the `format` and `nametag` fields in the tab groups configuration.
5-
64
**Note:** The difference between the two is that relational placeholders are evaluated from the viewer's perspective, while the conditional placeholders are evaluated from the player's perspective.
75
So if you have 200 players, if you use a conditional placeholder, the placeholder will be evaluated 200 times, while if you use a relational placeholder, it will be evaluated 200*200 = 40000 times.
86
Using relational placeholders could be really slow, so it is recommended to not use them unless you need them.

docs/Placeholders-Replacements.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ You can specify a list of replacements for a placeholder, and the replacements w
99

1010
The replacements are specified as a list of objects with two properties: `placeholder` and `replacement`.
1111
`placeholder` is the placeholder to replace, and `replacement` is the replacement text.
12+
To retrieve a placeholder's original value during replacement, simply use `%placeholder_value%`.
1213

1314
### Example section
1415
```yaml
@@ -36,6 +37,18 @@ placeholder_replacements:
3637
replacement: <aqua>River</aqua>
3738
```
3839
40+
## Example for the server placeholder
41+
```yaml
42+
placeholder_replacements:
43+
'%server%':
44+
- placeholder: spawn
45+
replacement: <bold><#ff8080>Spawn
46+
- placeholder: realms
47+
replacement: <bold><#ff0000>Realms
48+
- placeholder: dungeons
49+
replacement: <bold><#00ff00>Dungeons
50+
```
51+
3952
## Specified cases
4053
4154
### Vanish status
@@ -85,4 +98,4 @@ placeholder_replacements:
8598
'%huskhomes_homes_count%':
8699
- placeholder: '%huskhomes_homes_count%'
87100
replacement: ''
88-
```
101+
```

0 commit comments

Comments
 (0)