mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2025-02-17 04:51:25 +01:00
Fabric 1.19 (#3394)
This commit is contained in:
parent
a368509520
commit
7824566ce5
@ -2,7 +2,7 @@ import net.fabricmc.loom.task.RemapJarTask
|
||||
|
||||
plugins {
|
||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||
id 'fabric-loom' version '0.9.+'
|
||||
id 'fabric-loom' version '0.12.+'
|
||||
}
|
||||
|
||||
archivesBaseName = 'luckperms'
|
||||
@ -14,19 +14,19 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
// https://modmuss50.me/fabric.html
|
||||
minecraft 'com.mojang:minecraft:1.18'
|
||||
mappings 'net.fabricmc:yarn:1.18+build.1:v2'
|
||||
modImplementation 'net.fabricmc:fabric-loader:0.12.6'
|
||||
minecraft 'com.mojang:minecraft:1.19'
|
||||
mappings 'net.fabricmc:yarn:1.19+build.1:v2'
|
||||
modImplementation 'net.fabricmc:fabric-loader:0.14.6'
|
||||
|
||||
Set<String> apiModules = [
|
||||
'fabric-api-base',
|
||||
'fabric-command-api-v1',
|
||||
'fabric-command-api-v2',
|
||||
'fabric-lifecycle-events-v1',
|
||||
'fabric-networking-api-v1'
|
||||
]
|
||||
|
||||
apiModules.forEach {
|
||||
modImplementation(fabricApi.module(it, '0.43.1+1.18'))
|
||||
modImplementation(fabricApi.module(it, '0.55.2+1.19'))
|
||||
}
|
||||
|
||||
include(modImplementation('me.lucko:fabric-permissions-api:0.1-SNAPSHOT'))
|
||||
|
@ -31,7 +31,7 @@ import com.mojang.brigadier.tree.ArgumentCommandNode;
|
||||
import com.mojang.brigadier.tree.LiteralCommandNode;
|
||||
import me.lucko.luckperms.common.command.BrigadierCommandExecutor;
|
||||
import me.lucko.luckperms.common.sender.Sender;
|
||||
import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback;
|
||||
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
|
||||
import net.minecraft.command.argument.EntityArgumentType;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
@ -53,7 +53,7 @@ public class FabricCommandExecutor extends BrigadierCommandExecutor<ServerComman
|
||||
}
|
||||
|
||||
public void register() {
|
||||
CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> {
|
||||
CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> {
|
||||
for (String alias : COMMAND_ALIASES) {
|
||||
LiteralCommandNode<ServerCommandSource> cmd = literal(alias)
|
||||
.executes(this)
|
||||
|
@ -42,11 +42,11 @@ import net.fabricmc.fabric.api.networking.v1.ServerLoginConnectionEvents;
|
||||
import net.fabricmc.fabric.api.networking.v1.ServerLoginNetworking.LoginSynchronizer;
|
||||
import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents;
|
||||
import net.kyori.adventure.text.Component;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.server.network.ServerLoginNetworkHandler;
|
||||
import net.minecraft.server.network.ServerPlayNetworkHandler;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.util.dynamic.DynamicSerializableUuid;
|
||||
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
@ -70,7 +70,7 @@ public class FabricConnectionListener extends AbstractConnectionListener {
|
||||
|
||||
// Get their profile from the net handler - it should have been initialised by now.
|
||||
GameProfile profile = ((ServerLoginNetworkHandlerAccessor) netHandler).getGameProfile();
|
||||
UUID uniqueId = PlayerEntity.getUuidFromProfile(profile);
|
||||
UUID uniqueId = DynamicSerializableUuid.getUuidFromProfile(profile);
|
||||
String username = profile.getName();
|
||||
|
||||
if (this.plugin.getConfiguration().get(ConfigKeys.DEBUG_LOGINS)) {
|
||||
|
Loading…
Reference in New Issue
Block a user