Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Util Change]: Having auto-restart enabled makes user copy <br> tags #215

Closed
stephendotgg opened this issue May 10, 2024 · 3 comments
Closed
Labels
Bug Something isn't working

Comments

@stephendotgg
Copy link
Member

stephendotgg commented May 10, 2024

Util Name

start-file-generator

Changes

Having auto-restart enabled makes user copy <br> tags.

Extra Info

No response

@stephendotgg stephendotgg added the Bug Something isn't working label May 10, 2024
@ShadowThijs
Copy link
Contributor

Can be fixed by doing the same thing as is being done to the download file:

function copyValue() {
        const content = tabData[activeTab].content.replace(/<br>/g, '\n')
        navigator.clipboard.writeText(content)
        toast.push('Copied successfully!', {
            theme: {
                '--toastColor': 'mintcream',
                '--toastBackground': 'rgba(72,187,120,0.9)',
                '--toastBarBackground': '#2F855A'
            }
        })
}

This simply replaces the
tags with \n.

This results in an output like this:

:start
java -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Daikars.new.flags=true -Dusing.aikars.flags=https://mcutils.com -jar server.jar --nogui

echo Server restarting...
goto :start

Instead of

:start<br>java -Xmx8G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Daikars.new.flags=true -Dusing.aikars.flags=https://mcutils.com -jar server.jar --nogui<br><br>echo Server restarting...<br>goto :start

@ShadowThijs
Copy link
Contributor

This was fixed with my commit, can be closed @stephendotgg

@stephendotgg
Copy link
Member Author

Nice one, thanks!

This was fixed with my commit, can be closed @stephendotgg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants