Migrate the Carpet codebase to Mojang Mappings
This commit is contained in:
346 files changed
+8353
-8492
No files matched your search
@@ -1,8 +1,8 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.server.command.ServerCommandSource;
|
||||
import net.minecraft.server.dedicated.command.PerfCommand;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.server.commands.PerfCommand;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@@ -12,10 +12,10 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
public class PerfCommand_permissionMixin
|
||||
{
|
||||
@SuppressWarnings("UnresolvedMixinReference")
|
||||
@Inject(method = "method_37340(Lnet/minecraft/server/command/ServerCommandSource;)Z", at = @At("HEAD"), cancellable = true)
|
||||
private static void canRun(ServerCommandSource source, CallbackInfoReturnable<Boolean> cir)
|
||||
@Inject(method = "lambda$register$0(Lnet/minecraft/commands/CommandSourceStack;)Z", at = @At("HEAD"), cancellable = true)
|
||||
private static void canRun(CommandSourceStack source, CallbackInfoReturnable<Boolean> cir)
|
||||
{
|
||||
cir.setReturnValue(source.hasPermissionLevel(CarpetSettings.perfPermissionLevel));
|
||||
cir.setReturnValue(source.hasPermission(CarpetSettings.perfPermissionLevel));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user