Fabric 1.19.1 (#3437)

This commit is contained in:
Potatoboy9999 2022-08-03 19:45:34 +00:00 committed by GitHub
parent 55d291f975
commit 106455a311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 8 deletions

View File

@ -14,8 +14,8 @@ repositories {
dependencies {
// https://modmuss50.me/fabric.html
minecraft 'com.mojang:minecraft:1.19'
mappings 'net.fabricmc:yarn:1.19+build.1:v2'
minecraft 'com.mojang:minecraft:1.19.1'
mappings 'net.fabricmc:yarn:1.19.1+build.1:v2'
modImplementation 'net.fabricmc:fabric-loader:0.14.6'
Set<String> apiModules = [
@ -26,7 +26,7 @@ dependencies {
]
apiModules.forEach {
modImplementation(fabricApi.module(it, '0.55.2+1.19'))
modImplementation(fabricApi.module(it, '0.58.5+1.19.1'))
}
include(modImplementation('me.lucko:fabric-permissions-api:0.2-SNAPSHOT'))

View File

@ -101,7 +101,7 @@ public class FabricSenderFactory extends SenderFactory<LPFabricPlugin, ServerCom
@Override
protected void performCommand(ServerCommandSource sender, String command) {
sender.getServer().getCommandManager().execute(sender, command);
sender.getServer().getCommandManager().executeWithPrefix(sender, command);
}
@Override

View File

@ -25,6 +25,7 @@
package me.lucko.luckperms.fabric.mixin;
import com.mojang.brigadier.ParseResults;
import me.lucko.luckperms.fabric.event.PreExecuteCommandCallback;
import net.minecraft.server.command.CommandManager;
@ -38,8 +39,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(CommandManager.class)
public class CommandManagerMixin {
@Inject(at = @At("HEAD"), method = "execute", cancellable = true)
private void commandExecuteCallback(ServerCommandSource source, String input, CallbackInfoReturnable<Integer> info) {
if (!PreExecuteCommandCallback.EVENT.invoker().onPreExecuteCommand(source, input)) {
private void commandExecuteCallback(ParseResults<ServerCommandSource> parseResults, String command, CallbackInfoReturnable<Integer> info) {
if (!PreExecuteCommandCallback.EVENT.invoker().onPreExecuteCommand(parseResults.getContext().getSource(), command)) {
info.setReturnValue(0);
}
}

View File

@ -32,9 +32,9 @@
"depends": {
"fabricloader": ">=0.9.0",
"fabric-api-base": "*",
"fabric-command-api-v1": "*",
"fabric-command-api-v2": "*",
"fabric-lifecycle-events-v1": "*",
"fabric-networking-v0": "*",
"fabric-networking-api-v1": "*",
"fabric-permissions-api-v0": "*"
},
"custom": {