public void inject() throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException, NoSuchMethodException, CannotCompileException, InstantiationException, NotFoundException, InvocationTargetException {
        Field configManagerField = Class.forName("net.minecraft.server.MinecraftServer").getDeclaredField("u");
        configManagerField.setAccessible(true);

        Object dedicatedServer = this.server.getServer();

        while (this.originalConfigManager == null) {
            this.originalConfigManager = configManagerField.get(dedicatedServer);
            try {
                Thread.sleep(50);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

        Map<String, String> mapping = new HashMap<>();
        mapping.put("ls.e()", "serverTick");
        mapping.put("ls.a(ej, mw)", "initConnection");
        mapping.put("ls.e(mw)", "playerLogout");

        configManagerField.set(
            dedicatedServer,
            Interceptor.getProxy(
                this.originalConfigManager,
                this,
                mapping
            )
        );

        Object proxy = configManagerField.get(dedicatedServer);

        // This is an extremely ugly hack, and it might not even work properly.
        for (Field f : this.originalConfigManager.getClass().getFields()) {
            try {
                f.setAccessible(true);

                Field modifiers = Field.class.getDeclaredField("modifiers");
                modifiers.setAccessible(true);
                modifiers.setInt(f, f.getModifiers() & ~Modifier.FINAL);

                f.set(proxy, f.get(this.originalConfigManager));
            } catch (Exception ignored) { }
        }
    }