Skip to content

Commit 65317a9

Browse files
committed
feat: fabric 26.1, resource versions expansions, version bumps
1 parent 41fffbd commit 65317a9

32 files changed

Lines changed: 104 additions & 107 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
- name: Checkout the repository
1919
uses: actions/checkout@v6
2020

21-
- name: Set up JDK 21
21+
- name: Set up JDK 25
2222
uses: actions/setup-java@v5
2323
with:
2424
distribution: temurin
25-
java-version: 21
25+
java-version: 25
2626
cache: gradle
2727

2828
- name: Build with Gradle
@@ -43,11 +43,11 @@ jobs:
4343
- name: Checkout the repository
4444
uses: actions/checkout@v6
4545

46-
- name: Set up JDK 21
46+
- name: Set up JDK 25
4747
uses: actions/setup-java@v5
4848
with:
4949
distribution: temurin
50-
java-version: 21
50+
java-version: 25
5151
cache: gradle
5252

5353
- name: Initialize CodeQL

Authentication/AuthCore/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ plugins {
44
}
55

66
group = "codes.antti.auth.authentication"
7-
version = "0.4.0"
7+
version = "0.5.0"
88

99
dependencies {
10-
compileOnly(libs.jetbrains.annotations)
1110
implementation(project(":Common:Http"))
1211
implementation(project(":Common:Database"))
1312
}

Authentication/AuthFabric/src/main/java/codes/antti/auth/authentication/fabric/FabricMod.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
1010
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents;
1111
import net.fabricmc.loader.api.FabricLoader;
12-
import net.minecraft.server.command.CommandManager;
13-
import net.minecraft.server.command.ServerCommandSource;
14-
import net.minecraft.server.network.ServerPlayerEntity;
15-
import net.minecraft.text.Text;
12+
import net.minecraft.commands.CommandSourceStack;
13+
import net.minecraft.commands.Commands;
14+
import net.minecraft.network.chat.Component;
15+
import net.minecraft.server.level.ServerPlayer;
1616
import org.slf4j.LoggerFactory;
1717

1818
import java.io.IOException;
@@ -38,30 +38,30 @@ public void onInitializeServer() {
3838
core.init(this);
3939

4040
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) ->
41-
dispatcher.register(CommandManager.literal("auth")
42-
.then(CommandManager.argument("token", StringArgumentType.string())
41+
dispatcher.register(Commands.literal("auth")
42+
.then(Commands.argument("token", StringArgumentType.string())
4343
.executes(ctx -> {
44-
ServerCommandSource source = ctx.getSource();
45-
ServerPlayerEntity player;
44+
CommandSourceStack source = ctx.getSource();
45+
ServerPlayer player;
4646
try {
47-
player = source.getPlayerOrThrow();
47+
player = source.getPlayerOrException();
4848
} catch (Exception e) {
49-
source.sendFeedback(() -> Text.literal("This command can only be used by players"), false);
49+
source.sendSuccess(() -> Component.literal("This command can only be used by players"), false);
5050
return 0;
5151
}
5252
String token = StringArgumentType.getString(ctx, "token");
5353
try {
54-
String msg = core.handleAuthCommand(player.getUuid(), player.getName().getString(), token);
54+
String msg = core.handleAuthCommand(player.getUUID(), player.getName().getString(), token);
5555
if (msg != null) {
56-
source.sendFeedback(() -> Text.literal(msg), false);
56+
source.sendSuccess(() -> Component.literal(msg), false);
5757
return 1;
5858
} else {
59-
source.sendFeedback(() -> Text.literal("Verification failed, check that you typed the authentication token correctly"), false);
59+
source.sendSuccess(() -> Component.literal("Verification failed, check that you typed the authentication token correctly"), false);
6060
return 0;
6161
}
6262
} catch (SQLException e) {
6363
getLogger().severe("Failed to verify player session: " + e.getMessage());
64-
source.sendFeedback(() -> Text.literal("Something went wrong"), false);
64+
source.sendSuccess(() -> Component.literal("Something went wrong"), false);
6565
return 0;
6666
}
6767
})
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"schemaVersion": 1,
33
"id": "authentication",
4-
"version": "0.4.0",
4+
"version": "${version}",
55
"name": "Authentication",
66
"description": "Authentication of Minecraft players in web applications",
77
"authors": ["Antti"],
88
"entrypoints": {
99
"server": ["codes.antti.auth.authentication.fabric.FabricMod"]
1010
},
1111
"depends": {
12-
"fabricloader": ">=0.16.0",
13-
"fabric-api": "*",
14-
"minecraft": "~1.21"
12+
"fabricloader": ">=${fabric_loader_version}",
13+
"fabric-api": ">=${fabric_api_version}",
14+
"minecraft": "*"
1515
}
1616
}

Authentication/AuthSpigot/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ group = "codes.antti.auth"
88
version = project(":Authentication:AuthCore").version
99

1010
dependencies {
11-
compileOnly(libs.spigot.api)
12-
compileOnly(libs.jetbrains.annotations)
1311
implementation(project(":Authentication:AuthCore"))
1412
}
1513

Authentication/AuthSpigot/src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Authentication
22
version: "${version}"
33
main: codes.antti.auth.authentication.spigot.AuthenticationPlugin
4-
api-version: "1.16"
4+
api-version: "${api_version}"
55
author: Antti
66
description: Authentication of Minecraft players in web applications
77

Authorization/build.gradle.kts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ plugins {
33
}
44

55
group = "codes.antti.auth"
6-
version = "0.3.0"
6+
version = "0.4.0"
77

88
dependencies {
9-
compileOnly(libs.spigot.api)
109
compileOnly(libs.luckperms)
11-
compileOnly(libs.jetbrains.annotations)
1210
implementation(project(":Common:Http"))
1311
}
1412

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Authorization
22
version: "${version}"
33
main: codes.antti.auth.authorization.AuthorizationPlugin
4-
api-version: "1.16"
4+
api-version: "${api_version}"
55
depend: [LuckPerms]
66
author: Antti
77
description: Authorization of authenticated Minecraft players in web applications

BlueMap/Chat/ChatCore/build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ plugins {
44
}
55

66
group = "codes.antti.auth.bluemap.chat"
7-
version = "0.3.0"
7+
version = "0.4.0"
88

99
dependencies {
10-
compileOnly(libs.jetbrains.annotations)
1110
compileOnly(libs.bluemap.api)
1211
compileOnly(libs.lombok)
1312
annotationProcessor(libs.lombok)

BlueMap/Chat/ChatFabric/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ group = "codes.antti.auth.bluemap"
1010
version = project(":BlueMap:Chat:ChatCore").version
1111

1212
dependencies {
13-
"modCompileOnly"(libs.bluemap.api)
13+
compileOnly(libs.bluemap.api)
1414
shadowImpl(project(":BlueMap:Chat:ChatCore"))
1515
shadowImpl(project(":Common:Fabric"))
1616
}

0 commit comments

Comments
 (0)