add glow command

This commit is contained in:
Mylloon 2022-08-28 18:39:30 +02:00
parent f896988e16
commit 1012b9d335
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,6 +1,10 @@
package net.mylloon.mcsm; package net.mylloon.mcsm;
import net.fabricmc.api.ModInitializer; import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import static net.minecraft.server.command.CommandManager.literal;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
@ -18,6 +22,11 @@ public class Mcsm implements ModInitializer {
// However, some things (like resources) may still be uninitialized. // However, some things (like resources) may still be uninitialized.
// Proceed with mild caution. // Proceed with mild caution.
LOGGER.info("Hello Fabric world!"); CommandRegistrationCallback.EVENT.register(
(dispatcher, registryAccess, environnement) -> dispatcher.register(literal("glow").executes(context -> {
dispatcher.execute("effect give @a minecraft:glowing 10000 1 true", context.getSource());
return 1;
})));
} }
} }