From 4774e42081d2cc0dbc7adf7ba6e034643a80eb80 Mon Sep 17 00:00:00 2001 From: Frog-That-code Date: Thu, 6 Jun 2024 17:25:25 -0400 Subject: adds a new argment in the main struct to pass in command source to Main module --- src/main/java/los/numeros/command/HidersAndDiggersCommand.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/main/java/los/numeros/command/HidersAndDiggersCommand.java') diff --git a/src/main/java/los/numeros/command/HidersAndDiggersCommand.java b/src/main/java/los/numeros/command/HidersAndDiggersCommand.java index 8e27655..f54b56d 100644 --- a/src/main/java/los/numeros/command/HidersAndDiggersCommand.java +++ b/src/main/java/los/numeros/command/HidersAndDiggersCommand.java @@ -5,7 +5,6 @@ import com.mojang.brigadier.context.CommandContext; import com.mojang.brigadier.exceptions.CommandSyntaxException; import los.numeros.HidersAndDiggers.Main; -import net.minecraft.server.MinecraftServer; import net.minecraft.server.command.CommandManager; import net.minecraft.server.command.ServerCommandSource; @@ -21,10 +20,10 @@ public class HidersAndDiggersCommand { run(CommandContext ctx) throws CommandSyntaxException { /* get the minecraft server object */ - MinecraftServer server = ctx.getSource().getMinecraftServer(); + ServerCommandSource source = ctx.getSource(); /* pass in the minecraft server object and start it */ - new Main(server, 1); + new Main(source, 1); return 0; } -- cgit v1.2.1