Skip to content

Commit 2008634

Browse files
committed
Bump version to 1.4.2 and fix regex crash in SkinUtils with updated pattern logic
1 parent 111bc79 commit 2008634

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ plugins {
1818
boolean ci = System.getenv("CI") == "true"
1919

2020
group = 'one.armelin'
21-
version = '1.4.1'
21+
version = '1.4.2'
2222

2323
def decomp(fileCollection) {
2424
def jarFile = fileCollection.singleFile

src/main/java/one/armelin/distale/utils/SkinUtils.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,9 @@ public static void generateSkin(PlayerRef ref, @Nullable World world){
245245
}
246246
}
247247

248-
private static final Pattern PATTERN = Pattern.compile("%(json|base64|query)([*-])\\(([^)]+)\\)%|%(json|base64|query)%");
249-
248+
private static final Pattern PATTERN = Pattern.compile(
249+
"%(json|base64|query)(?:([*-])\\(([^)]+)\\))?%"
250+
);
250251
private static final Set<String> ALL_FIELDS = new HashSet<>(Arrays.asList(
251252
"bodyCharacteristic", "underwear", "face", "eyes", "ears", "mouth",
252253
"facialHair", "haircut", "eyebrows", "pants", "overpants", "undertop",
@@ -259,6 +260,7 @@ public static String buildAvatarUrl(String urlTemplate, PlayerSkin skin, UUID uu
259260
Matcher matcher = PATTERN.matcher(urlTemplate);
260261

261262
while (matcher.find()) {
263+
262264
String type = matcher.group(1);
263265
String operator = matcher.group(2);
264266
String fieldsStr = matcher.group(3);

src/main/resources/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"Group": "armelin1",
33
"Name": "DisTale",
4-
"Version": "1.4.1",
4+
"Version": "1.4.2",
55
"Description": "Discord bridge for Hytale servers - Chat integration, announcements, and commands",
66
"Authors": [
77
{

0 commit comments

Comments
 (0)