fixed commands disappearing on reload

Closes #299
This commit is contained in:
Ell 2023-02-05 16:21:57 +01:00
parent a49f71722c
commit 0fb1858688

View file

@ -21,11 +21,11 @@ import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.chunk.LevelChunk;
import net.minecraftforge.event.AttachCapabilitiesEvent;
import net.minecraftforge.event.RegisterCommandsEvent;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.level.ChunkEvent;
import net.minecraftforge.event.level.ChunkWatchEvent;
import net.minecraftforge.event.server.ServerStartingEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.util.ObfuscationReflectionHelper;
import net.minecraftforge.registries.ForgeRegistries;
@ -138,7 +138,7 @@ public class CommonEvents {
}
@SubscribeEvent
public void onServerStarting(ServerStartingEvent event) {
CommandAura.register(event.getServer().getCommands().getDispatcher());
public void onCommands(RegisterCommandsEvent event) {
CommandAura.register(event.getDispatcher());
}
}