调整指令的权限等级

This commit is contained in:
Atsuihsio 2024-05-18 15:35:59 +08:00
parent 5029d3ca8c
commit f896b904cf

View file

@ -19,7 +19,7 @@ import net.minecraftforge.fml.common.Mod;
public class MediumExpCommand {
@SubscribeEvent
public static void registerCommand(RegisterCommandsEvent event) {
event.getDispatcher().register(Commands.literal("target:mediumexp")
event.getDispatcher().register(Commands.literal("target:mediumexp").requires(s -> s.hasPermission(4))
.executes(arguments -> {
Level world = arguments.getSource().getUnsidedLevel();
double x = arguments.getSource().getPosition().x();