修改指令名称

This commit is contained in:
17146 2024-05-19 13:29:47 +08:00
parent ed35a0434a
commit 25a3f41e88

View file

@ -17,7 +17,7 @@ import net.minecraftforge.fml.common.Mod;
public class PVPModeCommand {
@SubscribeEvent
public static void registerCommand(RegisterCommandsEvent event) {
event.getDispatcher().register(Commands.literal("pvpmode").requires(s -> s.hasPermission(4)).executes(arguments -> {
event.getDispatcher().register(Commands.literal("target:pvpmode").requires(s -> s.hasPermission(4)).executes(arguments -> {
Level world = arguments.getSource().getUnsidedLevel();
Entity entity = arguments.getSource().getEntity();
if (entity == null && world instanceof ServerLevel server) {