summaryrefslogtreecommitdiff
path: root/src/main/java/com/arslaancodes/arslaansmagichax/commands/HackXP.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/arslaancodes/arslaansmagichax/commands/HackXP.java')
-rw-r--r--src/main/java/com/arslaancodes/arslaansmagichax/commands/HackXP.java30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/main/java/com/arslaancodes/arslaansmagichax/commands/HackXP.java b/src/main/java/com/arslaancodes/arslaansmagichax/commands/HackXP.java
deleted file mode 100644
index 024f5c4..0000000
--- a/src/main/java/com/arslaancodes/arslaansmagichax/commands/HackXP.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.arslaancodes.arslaansmagichax.commands;
-
-import com.mojang.brigadier.CommandDispatcher;
-import com.mojang.brigadier.arguments.IntegerArgumentType;
-import com.mojang.brigadier.arguments.StringArgumentType;
-import com.mojang.brigadier.context.CommandContext;
-import com.mojang.brigadier.exceptions.CommandSyntaxException;
-import net.fabricmc.fabric.api.client.command.v2.ClientCommandManager;
-import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource;
-import net.minecraft.client.Minecraft;
-import net.minecraft.commands.CommandBuildContext;
-
-public class HackXP {
- public static void register(CommandDispatcher<FabricClientCommandSource> dispatcher, CommandBuildContext access) {
- dispatcher.register(ClientCommandManager.literal("hackxp")
- .then(ClientCommandManager.argument("xp", IntegerArgumentType.integer())
- .executes(HackXP::run)
- )
- );
- }
-
- private static int run(CommandContext<FabricClientCommandSource> context) throws CommandSyntaxException {
- int xp = IntegerArgumentType.getInteger(context,"xp");
-
- if (Minecraft.getInstance().player == null) return -1;
- Minecraft.getInstance().player.experienceLevel += xp;
-
- return 1;
- }
-}