Skip to content

Commit

Permalink
add JAVA_AGENT env var
Browse files Browse the repository at this point in the history
  • Loading branch information
0x7d8 committed Sep 5, 2024
1 parent 9ddb8d4 commit 040259d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions java/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,14 @@ if [[ "$OVERRIDE_STARTUP" == "1" ]]; then
FLAGS+=("-DIReallyKnowWhatIAmDoingISwear")
fi

if [[ -n "$JAVA_AGENT" ]]; then
if [ -f "$JAVA_AGENT" ]; then
FLAGS+=("-javaagent:$JAVA_AGENT")
else
echo -e "${LOG_PREFIX} JAVA_AGENT file does not exist, skipping..."
fi
fi

if [[ "$ADDITIONAL_FLAGS" == "Aikar's Flags" ]]; then
FLAGS+=("-XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true")
elif [[ "$ADDITIONAL_FLAGS" == "Velocity Flags" ]]; then
Expand Down

0 comments on commit 040259d

Please sign in to comment.