KelsonCraftFabricTest/src/main/java/net/kelsoncraft/test/CommandTest.java

19 lines
669 B
Java
Raw Normal View History

package net.kelsoncraft.test;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.minecraft.text.Text;
public class CommandTest {
// This doesn't work at all in other classes.
//
// CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> dispatcher.register(literal("test")
// .executes(context -> {
// // For versions below 1.19, replace "Text.literal" with "new LiteralText".
// // For versions below 1.20, remode "() ->" directly.
// context.getSource().sendFeedback(() -> Text.literal("Called /test with no arguments"), false);
//
//
// return 1;
// })));
}