mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-12-29 12:37:40 +01:00
Fabric 1.19.1 (#3437)
This commit is contained in:
parent
55d291f975
commit
106455a311
@ -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'))
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user