add glow command
This commit is contained in:
parent
f896988e16
commit
1012b9d335
1 changed files with 10 additions and 1 deletions
|
@ -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;
|
||||||
|
})));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue