Skip to content

Commit

Permalink
Ensure whitelist.json not present when using allow list (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
itzg authored Jul 15, 2023
1 parent 8756c97 commit b626ba5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions bedrock-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,10 @@ if [[ -v ALLOW_LIST_USERS || -v WHITE_LIST_USERS ]]; then

if [[ $allowListUsers ]]; then
echo "Setting allow list"
f=allowlist.json
rm -rf "$f"
jq -c -n --arg users "$allowListUsers" '$users | split(",") | map({"ignoresPlayerLimit":false,"name": .})' > "$f"
jq -c -n --arg users "$allowListUsers" '$users | split(",") | map({"ignoresPlayerLimit":false,"name": .})' > "allowlist.json"
# activate server property to enable list usage
WHITE_LIST=true
ALLOW_LIST=true
rm -f whitelist.json
else
rm -rf whitelist.json allowlist.json
WHITE_LIST=false
Expand Down

0 comments on commit b626ba5

Please sign in to comment.