[
  {
    "path": ".github/FUNDING.yml",
    "content": "github: [TheRemote]\n"
  },
  {
    "path": ".github/workflows/auto-assign-issue.yml",
    "content": "name: Issue assignment\n\non:\n  issues:\n    types: [opened]\n\njobs:\n  auto-assign:\n    runs-on: ubuntu-latest\n    steps:\n      - name: 'Auto-assign issue'\n        uses: pozil/auto-assign-issue@v1\n        with:\n          repo-token: ${{ secrets.GITHUB_TOKEN }}\n          assignees: TheRemote\n"
  },
  {
    "path": "Build.Dockerfile",
    "content": "# Minecraft Java Paper Server + Geyser + Floodgate Docker Container\n# Author: James A. Chambers - https://jamesachambers.com/minecraft-java-bedrock-server-together-geyser-floodgate/\n# GitHub Repository: https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate\n\n# Use Ubuntu rolling version\nFROM ubuntu:rolling\n\n# Fetch dependencies\nRUN apt update && DEBIAN_FRONTEND=noninteractive apt-get install openjdk-25-jre-headless tzdata sudo curl unzip net-tools gawk openssl findutils pigz libc6 libcrypt1 apt-utils libcurl4-openssl-dev ca-certificates binfmt-support nano jq -yqq && rm -rf /var/cache/apt/*\n\n# Set port environment variable\nENV Port=25565\n\n# Set Bedrock port environment variable\nENV BedrockPort=19132\n\n# Optional maximum memory Minecraft is allowed to use\nENV MaxMemory=\n\n# Optional Paper Minecraft Version override\nENV Version=\"26.1.2\"\n\n# Optional Timezone\nENV TZ=\"America/Denver\"\n\n# Optional folder to ignore during backup operations\nENV NoBackup=\"\"\n\n# Number of rolling backups to keep\nENV BackupCount=10\n\n# Optional switch to skip permissions check\nENV NoPermCheck=\"\"\n\n# Optional switch to tell curl to suppress the progress meter which generates much less noise in the logs\nENV QuietCurl=\"\"\n\n# Optional switch to disable ViaVersion\nENV NoViaVersion=\"\"\n\n# Optional switch to use ViaVersion snapshot from Jenkins CI instead of stable GitHub releases\nENV ViaVersionSnapshot=\"\"\n\n# IPV4 Ports\nEXPOSE 25565/tcp\nEXPOSE 19132/tcp\nEXPOSE 19132/udp\n\n# Copy scripts to minecraftbe folder and make them executable\nRUN mkdir /scripts\nCOPY *.sh /scripts/\nCOPY *.yml /scripts/\nCOPY server.properties /scripts/\nRUN chmod -R +x /scripts/*.sh\n\n# Set entrypoint to start.sh script\nENTRYPOINT [\"/bin/bash\", \"/scripts/start.sh\"]\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "content": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participation in our\ncommunity a harassment-free experience for everyone, regardless of age, body\nsize, visible or invisible disability, ethnicity, sex characteristics, gender\nidentity and expression, level of experience, education, socio-economic status,\nnationality, personal appearance, race, religion, or sexual identity\nand orientation.\n\nWe pledge to act and interact in ways that contribute to an open, welcoming,\ndiverse, inclusive, and healthy community.\n\n## Our Standards\n\nExamples of behavior that contributes to a positive environment for our\ncommunity include:\n\n* Demonstrating empathy and kindness toward other people\n* Being respectful of differing opinions, viewpoints, and experiences\n* Giving and gracefully accepting constructive feedback\n* Accepting responsibility and apologizing to those affected by our mistakes,\n  and learning from the experience\n* Focusing on what is best not just for us as individuals, but for the\n  overall community\n\nExamples of unacceptable behavior include:\n\n* The use of sexualized language or imagery, and sexual attention or\n  advances of any kind\n* Trolling, insulting or derogatory comments, and personal or political attacks\n* Public or private harassment\n* Publishing others' private information, such as a physical or email\n  address, without their explicit permission\n* Other conduct which could reasonably be considered inappropriate in a\n  professional setting\n\n## Enforcement Responsibilities\n\nCommunity leaders are responsible for clarifying and enforcing our standards of\nacceptable behavior and will take appropriate and fair corrective action in\nresponse to any behavior that they deem inappropriate, threatening, offensive,\nor harmful.\n\nCommunity leaders have the right and responsibility to remove, edit, or reject\ncomments, commits, code, wiki edits, issues, and other contributions that are\nnot aligned to this Code of Conduct, and will communicate reasons for moderation\ndecisions when appropriate.\n\n## Scope\n\nThis Code of Conduct applies within all community spaces, and also applies when\nan individual is officially representing the community in public spaces.\nExamples of representing our community include using an official e-mail address,\nposting via an official social media account, or acting as an appointed\nrepresentative at an online or offline event.\n\n## Enforcement\n\nInstances of abusive, harassing, or otherwise unacceptable behavior may be\nreported to the community leaders responsible for enforcement at\n05jchambers@gmail.com.\nAll complaints will be reviewed and investigated promptly and fairly.\n\nAll community leaders are obligated to respect the privacy and security of the\nreporter of any incident.\n\n## Enforcement Guidelines\n\nCommunity leaders will follow these Community Impact Guidelines in determining\nthe consequences for any action they deem in violation of this Code of Conduct:\n\n### 1. Correction\n\n**Community Impact**: Use of inappropriate language or other behavior deemed\nunprofessional or unwelcome in the community.\n\n**Consequence**: A private, written warning from community leaders, providing\nclarity around the nature of the violation and an explanation of why the\nbehavior was inappropriate. A public apology may be requested.\n\n### 2. Warning\n\n**Community Impact**: A violation through a single incident or series\nof actions.\n\n**Consequence**: A warning with consequences for continued behavior. No\ninteraction with the people involved, including unsolicited interaction with\nthose enforcing the Code of Conduct, for a specified period of time. This\nincludes avoiding interactions in community spaces as well as external channels\nlike social media. Violating these terms may lead to a temporary or\npermanent ban.\n\n### 3. Temporary Ban\n\n**Community Impact**: A serious violation of community standards, including\nsustained inappropriate behavior.\n\n**Consequence**: A temporary ban from any sort of interaction or public\ncommunication with the community for a specified period of time. No public or\nprivate interaction with the people involved, including unsolicited interaction\nwith those enforcing the Code of Conduct, is allowed during this period.\nViolating these terms may lead to a permanent ban.\n\n### 4. Permanent Ban\n\n**Community Impact**: Demonstrating a pattern of violation of community\nstandards, including sustained inappropriate behavior,  harassment of an\nindividual, or aggression toward or disparagement of classes of individuals.\n\n**Consequence**: A permanent ban from any sort of public interaction within\nthe community.\n\n## Attribution\n\nThis Code of Conduct is adapted from the [Contributor Covenant][homepage],\nversion 2.0, available at\nhttps://www.contributor-covenant.org/version/2/0/code_of_conduct.html.\n\nCommunity Impact Guidelines were inspired by [Mozilla's code of conduct\nenforcement ladder](https://github.com/mozilla/diversity).\n\n[homepage]: https://www.contributor-covenant.org\n\nFor answers to common questions about this code of conduct, see the FAQ at\nhttps://www.contributor-covenant.org/faq. Translations are available at\nhttps://www.contributor-covenant.org/translations.\n"
  },
  {
    "path": "CONTRIBUTING.md",
    "content": "# Contributing\n\nHello!  Everyone is welcome to contribute to the project.  That could include reporting issues, pull requests, fixing bugs, writing documentation, translations, anything!\n\n## Looking for support?\n\nThe best places to get support are the project's issues section or my blog's comments section.\n\n## How to report a bug\n\nThink you found a bug? Please check the list of open issues to see if your bug has already been reported. If it hasn't please submit a new issue.\n\nHere are a few tips for writing *great* bug reports:\n\n* Describe the specific problem (e.g., \"server won't load and log files are showing this specific crash\" versus \"getting an error\")\n* Include the steps to reproduce the bug, what you expected to happen, and what happened instead\n* Check that you are using the latest version of the project and its dependencies\n* Include what version of the project your using, as well as any relevant dependencies\n* Only include one bug per issue. If you have discovered two bugs, please file two issues\n* Even if you don't know how to fix the bug, including a failing test may help others track it down\n* Always include error output and log files when possible\n\n## How to suggest a feature or enhancement\n\nFeature requests are welcome. But take a moment to find out whether your idea fits with the scope and goals of the project.  Sometimes it makes more sense to fork the project if it's beyond the scope of this specific project.\n\nOpen an issue which describes the feature you would like to see, why you want it, how it should work, etc.\n\n## How to propose changes\n\nHere's a few general guidelines for proposing changes:\n\n* Each pull request should implement **one** feature or bug fix. If you want to add or fix more than one thing, submit more than one pull request\n* Do not commit changes to files that are irrelevant to your feature or bug fix\n* Write a good commit message describing what you are changing and why\n\nAt a high level, [the process for proposing changes](https://guides.github.com/introduction/flow/) is:\n\n1. Fork and clone the project\n2. Make your change, add tests, and make sure the tests still pass\n3. Push to your fork and submit a pull request\n4. Pat your self on the back and wait for your pull request to be reviewed and merged\n"
  },
  {
    "path": "LICENSE",
    "content": "MIT License\n\nCopyright (c) 2022 James A. Chambers\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Legendary Java Minecraft + Geyser + Floodgate + Paper Dedicated Server for Docker\n<img src=\"https://jamesachambers.com/wp-content/uploads/2022/08/Minecraft-Geyser-Docker-Container-1024x576.webp\" alt=\"Legendary Minecraft Geyser Container\">\n\nThis is the Docker containerized version of my <a href=\"https://github.com/TheRemote/RaspberryPiMinecraft\">Minecraft Java Paper Dedicated Server for Linux/Raspberry Pi</a> scripts but with Geyser and Floodgate included.\n\nGeyser and Floodgate allow Minecraft Bedrock players to join your Java server!\n\nMy <a href=\"https://jamesachambers.com/minecraft-java-bedrock-server-together-geyser-floodgate/\" target=\"_blank\" rel=\"noopener\">main blog article (and the best place for support) is here</a>.<br>\nThe <a href=\"https://jamesachambers.com/legendary-paper-minecraft-java-container/\" target=\"_blank\" rel=\"noopener\">version without Floodgate and Geyser is here</a>.<br>\nThe <a href=\"https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate\" target=\"_blank\" rel=\"noopener\">official GitHub repository is located here</a>.<br>\nThe <a href=\"https://hub.docker.com/r/05jchambers/legendary-minecraft-geyser-floodgate\" target=\"_blank\" rel=\"noopener\">official Docker Hub repository is located here</a>.<br>\n<br>\nThe <a href=\"https://github.com/TheRemote/Legendary-Bedrock-Container\" target=\"_blank\" rel=\"noopener\">Bedrock version of the Docker container is available here</a>.  This is for Java Minecraft but Bedrock players can connect to it.<br>\n \n<h2>Features</h2>\n<ul>\n  <li>Sets up fully operational Minecraft server that allows both Java and Bedrock clients to connect</li>\n  <li>Runs the highly efficient \"Paper\" Minecraft server</li>\n  <li>Runs Geyser to allow Bedrock clients to connect and Floodgate to allow them to authenticate with their Bedrock credentials to a Java server</li>\n  <li>Uses named Docker volume for safe and easy to access storage of server data files (which enables more advanced Docker features such as automatic volume backups)</li>\n  <li>Plugin support for Paper + Spigot + Bukkit</li>\n  <li>Installs and configures OpenJDK</li>\n  <li>Automatic backups to minecraft/backups when server restarts</li>\n  <li>Updates automatically to the latest version when server is started</li>\n  <li>Runs on all Docker platforms including Raspberry Pi</li>\n  <li>Runs on all Kubernetes platforms including Raspberry Pi</li>\n</ul>\n\n\n<h2>Docker Usage</h2>\nFirst you must create a named Docker volume.  This can be done with:<br>\n<pre>docker volume create yourvolumename</pre>\n\nNow you may launch the server and open the ports necessary with one of the following Docker launch commands:<br>\n<br>\nWith default ports:\n<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\nWith custom ports (this example uses 12345 for the Java port and 54321 for the Bedrock port):\n<pre>docker run -it -v yourvolumename:/minecraft -p 12345:12345 -e Port=12345 -p 54321:54321/udp -p 54321:54321 -e BedrockPort=54321 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\nWith a custom Minecraft version (add -e Version=1.X.X, must be present on Paper's API servers to work):\n<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e Version=1.17.1 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\nWith a maximum memory limit in megabytes (optional, prevents crashes on platforms with limited memory, -e MaxMemory=2048):\n<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e MaxMemory=2048 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\nUsing a different timezone:\n<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e TZ=\"America/Denver\" --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\nSkipping backups on certain folders (comma separated):\n<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e NoBackup=\"plugins/ftp,plugins/test2\" --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\nSkipping permissions check:\n<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e NoPermCheck=\"Y\" --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\n\n<h2>Kubernetes Usage</h2>\nFirst you must create a suitable PVC using your preferred StorageClass.<br>\nTo run within Kubernetes, you must pass the enviroment variable `k8s=\"True\"`\nalongside any others you require:<br>\n<pre>\n        env:\n        - name: MaxMemory\n          value: '1024'\n        - name: TZ\n          value: Europe/London\n        - name: k8s\n          value: \"True\"\n</pre>\n<bold>Be aware that terminal features will not be available when running in kubernetes</bold>\n<br>\nThe pod can be exposed using a LoadBalancer or TCP/UDP Ingress service.  See example manifests in the /kubernetes folder of the repo.  The examples are based on Longhorn\nstorage backend and a LoadBalancer service - these will need altering to be suitable\nfor your environment.<br>\n\n<h2>Configuration / Accessing Server Files</h2>\nThe server data is stored where Docker stores your volumes.  This is typically a folder on the host OS that is shared and mounted with the container.<br>\nYou can find your exact path by typing: <pre>docker volume inspect yourvolumename</pre>  This will give you the fully qualified path to your volume like this:\n<pre>{\n        \"CreatedAt\": \"2022-05-09T21:08:34-06:00\",\n        \"Driver\": \"local\",\n        \"Labels\": {},\n        \"Mountpoint\": \"/var/lib/docker/volumes/yourvolumename/_data\",\n        \"Name\": \"yourvolumename\",\n        \"Options\": {},\n        \"Scope\": \"local\"\n    }</pre>\n<br>\nOn Linux it's typically available at: <pre>/var/lib/docker/volumes/yourvolumename/_data</pre><br>\nOn Windows it's at <pre>C:\\ProgramData\\DockerDesktop</pre> but may be located at something more like <pre>\\wsl$\\docker-desktop-data\\version-pack-data\\community\\docker\\volumes\\</pre>if you are using WSL (Windows Subsystem for Linux<br>\n<br>\nOn Mac it's typically <pre>~/Library/Containers/com.docker.docker/Data/vms/0/</pre><br>\nIf you are using Docker Desktop on Mac then you need to access the Docker VM with the following command first:\n<pre>screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty</pre>\nYou can then normally access the Docker volumes using the path you found in the first step with docker volume inspect<br><br>\nMost people will want to edit server.properties.  You can make the changes to the file and then restart the container to make them effective.<br>\n<br>\nBackups are stored in the \"backups\" folder<br>\n<br>\nThe Geyser configuration is located in plugins/Geyser-Spigot/config.yml<br>\nThe Floodgate configuration is located in plugins/floodgate/config.yml<br>\n\n<h2>TZ (timezone) Environment Variable</h2>\nYou can change the timezone from the default \"America/Denver\" to own timezone using this environment variable: <pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e TZ=\"America/Denver\" --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\nA <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\">list of Linux timezones is available here</a>\n\n<h2>BackupCount Environment Variable</h2>\nBy default the server keeps 10 rolling backups that occur each time the container restarts.  You can override this using the BackupCount environment variable:<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e BackupCount=20 --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\n\n<h2>QuietCurl Environment Variable</h2>\nYou can use the QuietCurl environment variable to suppress curl's download output.  This will keep your logs tidier but may make it harder to diagnose if something is going wrong.  If things are working well it's safe to enable this option and turn it back off so you can see the output if you need to:<pre>docker run -it -v yourvolumename:/minecraft -p 25565:25565 -p 19132:19132/udp -p 19132:19132 -e QuietCurl=Y --restart unless-stopped 05jchambers/legendary-minecraft-geyser-floodgate:latest</pre>\n\n<h2>Plugins</h2>\nThis is a \"Paper\" Minecraft server which has plugin compatibility with Paper / Spigot / Bukkit.<br>\n<br>\nInstallation is simple.  There is a \"plugins\" folder on your Docker named volume.<br>\n<br>\nNavigate to your server files on your host operating system (see accessing server files section if you don't know where this is) and you will see the \"plugins\" folder.<br>\n<br>\nYou just need to drop the extracted version of the plugin (a .jar file) into this folder and restart the container.  That's it!<br>\n<br>\nSome plugins have dependencies so make sure you read the installation guide first for the plugin you are looking at.<br>\nA popular place to get plugins is: <a href=\"https://dev.bukkit.org/bukkit-plugins\">https://dev.bukkit.org/bukkit-plugins</a>\n\n<h2>Troubleshooting Note - Oracle Virtual Machines</h2>\nA very common problem people have with the Oracle Virtual Machine tutorials out there that typically show you how to use a free VM is that the VM is much more difficult to configure than just about any other product / offering out there.<br>\nThe symptom you will have is that nobody will be able to connect.<br>\nIt is because there are several steps you need to take to open the ports on the Oracle VM.  You need to both:<br>\n<ul>\n  <li>Set the ingress ports (TCP/UDP) in the Virtual Cloud Network (VCN) security list</li>\n  <li>*and* set the ingress ports in a Network Security Group assigned to your instance</li>\n</ul><br>\nBoth of these settings are typically required before you will be able to connect to your VM instance.  This is purely configuration related and has nothing to do with the script or the Minecraft server itself.<br><br>\nI do not recommend this platform due to the configuration difficulty but the people who have gone through the pain of configuring an Oracle VM have had good experiences with it after that point.  Just keep in mind it's going to be a rough ride through the configuration for most people.<br><br>\nHere are some additional links:<br>\n<ul>\n<li>https://jamesachambers.com/official-minecraft-bedrock-dedicated-server-on-raspberry-pi/comment-page-8/#comment-13946</li>\n<li>https://jamesachambers.com/minecraft-bedrock-edition-ubuntu-dedicated-server-guide/comment-page-53/#comment-13936</li>\n<li>https://jamesachambers.com/minecraft-bedrock-edition-ubuntu-dedicated-server-guide/comment-page-49/#comment-13377</li>\n<li>https://jamesachambers.com/legendary-minecraft-bedrock-container/comment-page-2/#comment-13706</li>\n</ul>\n\n<h2>Troubleshooting Note - Hyper-V</h2>\nThere is a weird bug in Hyper-V that breaks UDP connections on the Minecraft server.  There are two fixes for this.  The simplest fix is that you have to use a Generation 1 VM with the Legacy LAN network driver.<br>\nSee the following links:<br>\n<ul>\n<li>https://jamesachambers.com/minecraft-bedrock-edition-ubuntu-dedicated-server-guide/comment-page-54/#comment-13863</li>\n<li>https://jamesachambers.com/minecraft-bedrock-edition-ubuntu-dedicated-server-guide/comment-page-56/#comment-14207</li>\n</ul>\nThere is a second fix that was <a href=\"https://jamesachambers.com/legendary-minecraft-bedrock-container/comment-page-3/#comment-14654\">shared by bpsimons here</a>.<br>You need to install ethtool first with sudo apt install ethtool.  Next in your /etc/network/interfaces file add \"offload-tx off\" to the bottom as the issue appears to be with TX offloading.<br>\nHere's an example:<pre># The primary network interface\nauto eth0\niface eth0 inet static\naddress 192.168.1.5\nnetmask 255.255.255.0\nnetwork 192.168.1.0\nbroadcast 192.168.1.255\ngateway 192.168.1.1\noffload-tx off</pre>\nThis can also be done non-persistently with the following ethtool command: <pre>ethtool -K eth0 tx off</pre>\n\n<h2>Buy A Coffee / Donate</h2>\n<p>People have expressed some interest in this (you are all saints, thank you, truly)</p>\n<ul>\n <li>PayPal: 05jchambers@gmail.com</li>\n <li>Venmo: @JamesAChambers</li>\n <li>CashApp: $theremote</li>\n <li>Bitcoin (BTC): 3H6wkPnL1Kvne7dJQS8h7wB4vndB9KxZP7</li>\n</ul>\n\n<h2>Update History</h2>\n<ul>\n  <li>May 3rd 2026</li>\n    <ul>\n      <li>Update to 26.1.2</li>\n      <li>Update OpenJDK to OpenJDK 25</li>\n    </ul>\n  <li>January 25th 2026</li>\n    <ul>\n      <li>Update to 1.21.11</li>\n      <li>Implement fixes to move to Paper API v3</li>\n    </ul>\n  <li>July 26th 2025</li>\n    <ul>\n      <li>Updated build process to use buildx for multi-arch builds</li>\n    </ul>\n  <li>July 24th 2025</li>\n    <ul>\n      <li>Updated default version to 1.21.8 (remember, you never need to wait for updates to change Minecraft versions, just use -e Version=1.21.4)</li>\n    </ul>\n  <li>February 8th 2025</li>\n    <ul>\n      <li>Updated default version to 1.21.4 (remember, you never need to wait for updates to change Minecraft versions, just use -e Version=1.21.4)</li>\n      <li>Fixed Paper API URLs yet again</li>\n    </ul>\n  <li>December 1st 2024</li>\n    <ul>\n      <li>Fixed ViaVersion updates</li>\n      <li>Container no longer runs server as root and instead creates a user named \"minecraft\"</li>\n      <li>Updated default version to 1.21.3 (remember, you never need to wait for updates to change Minecraft versions, just use -e Version=1.21.3)</li>\n    </ul>\n  <li>June 29th 2024</li>\n    <ul>\n      <li>Updated default version to 1.21 (remember, you never need to wait for updates to change Minecraft versions, just use -e Version=1.21)</li>\n    </ul>\n  <li>May 19th 2024</li>\n    <ul>\n      <li>Updated OpenJDK version to 21</li>\n      <li>Updated default version to 1.20.6</li>\n    </ul>\n  <li>April 27th 2024</li>\n    <ul>\n      <li>Updated default version to 1.20.5 (remember, you never need to wait for updates to change Minecraft versions, just use -e Version=1.20.5)</li>\n    </ul>\n  <li>December 13th 2023</li>\n    <ul>\n      <li>Updated default version to 1.20.4 (remember, you never need to wait for updates to change Minecraft versions, just use -e Version=1.20.4)</li>\n    </ul>\n  <li>November 26th 2023</li>\n    <ul>\n      <li>Fix Geyser and Spigot updates after they stopped using Jenkins (downloads every server start, no MD5 anymore unfortunately to check for updates with)</li>\n    </ul>\n  <li>October 1st 2023</li>\n    <ul>\n      <li>Update default version to 1.20.2 (remember, you never need to update for Minecraft version updates, just use -e Version=1.20.2)</li>\n    </ul>\n  <li>June 9th 2023</li>\n    <ul>\n      <li>Update default version to 1.20 (remember, you never need to update for Minecraft version updates, just use -e Version=1.20)</li>\n    </ul>\n  <li>April 18th 2023</li>\n    <ul>\n      <li>Add NoViaVersion environment variable to disable using ViaVersion in case of incompatible plugins</li>\n    </ul>\n  <li>March 25th 2023</li>\n    <ul>\n      <li>Migrate paper.yml to paper-global.yml (thanks karl007, <a href=\"https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate/issues/21\">Issue #21</a>)</li>\n    </ul>\n  <li>March 16th 2023</li>\n    <ul>\n      <li>Update to Paper 1.19.4</li>\n    </ul>\n  <li>March 15th 2023</li>\n    <ul>\n      <li>Add ViaVersion plugin to allow players on newer clients to connect to the server (very helpful when waiting for new updates to be released)</li>\n      <li>Fix Geyser and Floodgate update checks</li>\n    </ul>\n  <li>January 25th 2023</li>\n    <ul>\n      <li>Removed check for terminal and will let the Minecraft server throw an error if environment is not appropriate</li>\n    </ul>\n  <li>January 14th 2023</li>\n    <ul>\n      <li>Change google.com connectivity change to papermc.io as Google is blocked in some countries causing the connectivity check to fail when a connection to papermc.io would have succeeded (thanks Misakaou, <a href=\"https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate/issues/14\">Issue #14</a></li>\n    </ul>\n  <li>January 12th 2023</li>\n    <ul>\n      <li>Remove broken ScheduleRestart environment variable -- this needs to be done in your OS using docker restart (typically with crontab in Linux or Task Scheduler in Windows)</li>\n    </ul>\n  <li>December 7th 2022</li>\n    <ul>\n      <li>Update to 1.19.3 (thanks WarpOverload, issue #9)</li>\n    </ul>\n  <li>November 19th 2022</li>\n    <ul>\n      <li>Add \"QuietCurl\" environment variable which will suppress the progress meter on curl keeping the logs much tidier (thanks willman42, <a href=\"https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate/pull/6\">PR #6</a></li>\n      <li>Remove fixpermissions.sh and add 3 lines into main start.sh file</li>\n    </ul>\n  <li>November 7th 2022</li>\n    <ul>\n      <li>Fail immediately if ran without an interactive terminal (as the Minecraft server won't work without one)</li>\n    </ul>\n  <li>October 30th 2022</li>\n    <ul>\n      <li>Add RISC architecture support</li>\n      <li>Switch from ubuntu:latest to ubuntu:rolling</li>\n      <li>Switch from using Adoptium to using ubuntu:rolling OpenJDK</li>\n      <li>Removed SetupMinecraft.sh</li>\n      <li>Fix bug with new ScheduleRestart environment variable</li>\n    </ul>\n  <li>October 21st 2022</li>\n    <ul>\n      <li>Added new environment variable \"BackupCount\" to control the number of backups the container keeps</li>\n      <li>NoBackup optional environment variable can now be multiple paths to files to skip backups on separated by a comma.  Example: plugins/test,plugins/test2</li>\n    </ul>\n  <li>October 20th 2022</li>\n    <ul>\n      <li>Added new environment variable \"NoBackup\" to skip a folder from backup activities</li>\n      <li>Added new environment variable \"NoPermCheck\" to skip permissions check during startup</li>\n      <li>Added new environment variable \"ScheduleRestart\" -- this schedules the container to shut down at a certain time which combined with the --restart switch gives daily reboot functionality</li>\n    </ul>\n  <li>October 8th 2022</li>\n    <ul>\n      <li>Upgrade to OpenJDK 19</li>\n    </ul>\n  <li>September 27th 2022</li>\n    <ul>\n      <li>Fix SIGTERM catching in certain situations by running java with the \"exec\" command which passes execution completely to that process (thanks vp-en)</li>\n      <li>Remove screen dependency</li>\n    </ul>\n  <li>September 20th 2022</li>\n    <ul>\n      <li>Fixed Geyser update code (thanks vp-en)</li>\n      <li>Update to OpenJDK 18.0.2.1</li>\n    </ul>\n  <li>August 29th 2022</li>\n    <ul>\n      <li>Add environment variables section to docker-compose.yml template</li>\n      <li>Add optional TZ environment variable to set timezone</li>\n    </ul>\n  <li>August 28th 2022</li>\n    <ul>\n      <li>Additional fix for #2 by adding a default config.yml for the server to use for Geyser (thanks vecnar, <a href=\"https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate/issues/2\">issue #2</a>)</li>\n    </ul>\n  <li>August 27th 2022</li>\n    <ul>\n      <li>Fix broken Geyser-Spigot config.yml issue (thanks vecnar, <a href=\"https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate/issues/2\">issue #2</a>)</li>\n    </ul>\n  <li>August 22nd 2022</li>\n    <ul>\n      <li>Add NoScreen environment variable -- disables screen which prevents needing an interactive terminal (but disables some logging)</li>\n      <li>Fix issue #1 (thanks Sam7, <a href=\"https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate/issues/1\">issue #1</a>)</li>\n    </ul>\n  <li>August 18th 2022</li>\n    <ul>\n      <li>Test rolling back OpenJDK version slightly to earlier version of OpenJDK 18 previous to 10th-11th gen Intel CPU bugs</li>\n    </ul>\n  <li>August 17th 2022</li>\n    <ul>\n      <li>Add XX:-UseAESCTRIntrinsics to java launch line to prevent encryption issue on 10th Gen Intel processors</li>\n    </ul>\n  <li>August 10th 2022</li>\n    <ul>\n      <li>Adjust query.port in server.properties to be the same as the main server port to keep the \"ping port\" working properly</li>\n      <li>Add enforce-secure-profile=false to default server.properties to prevent login errors</li>\n      <li>Add text editor inside the container (nano) for diagnostic/troubleshooting purposes</li>\n    </ul>\n  <li>August 6th 2022</li>\n    <ul>\n      <li>Initial release</li>\n    </ul>\n</ul>\n"
  },
  {
    "path": "build.sh",
    "content": "# Make sure you have binfmt installed with:\n# docker run --rm --privileged tonistiigi/binfmt --install all\n\ndocker buildx build --sbom=true --provenance=true --platform 'linux/amd64,linux/amd64/v2,linux/amd64/v3,linux/arm64,linux/arm/v7,linux/riscv64,linux/s390x,linux/ppc64le' --tag 05jchambers/legendary-minecraft-geyser-floodgate:latest --push -f Build.Dockerfile .\n"
  },
  {
    "path": "bukkit.yml",
    "content": "settings:\n    allow-end: true\n    warn-on-overload: false\n    permissions-file: permissions.yml\n    update-folder: update\n    plugin-profiling: false\n    connection-throttle: 4000\n    query-plugins: true\n    deprecated-verbose: default\n    shutdown-message: Server closed\n    minimum-api: none\n    spawn-limits:\n      monsters: 70\n      animals: 10\n      water-animals: 5\n      water-ambient: 20\n      water-underground-creature: 5\n      axolotls: 5\n      ambient: 15\n    chunk-gc:\n      period-in-ticks: 600\n    ticks-per:\n      animal-spawns: 400\n      monster-spawns: 2\n      water-spawns: 1\n      water-ambient-spawns: 1\n      water-underground-creature-spawns: 1\n      axolotl-spawns: 1\n      ambient-spawns: 1\n    autosave: 18000\n    aliases: now-in-commands.yml"
  },
  {
    "path": "config.yml",
    "content": "# --------------------------------\n# Geyser Configuration File\n#\n# A bridge between Minecraft: Bedrock Edition and Minecraft: Java Edition.\n#\n# GitHub: https://github.com/GeyserMC/Geyser\n# Discord: https://discord.geysermc.org/\n# --------------------------------\n\nbedrock:\n  # The IP address that will listen for connections.\n  # There is no reason to change this unless you want to limit what IPs can connect to your server.\n  address: 0.0.0.0\n  # The port that will listen for connections\n  port: 19132\n  # Some hosting services change your Java port everytime you start the server and require the same port to be used for Bedrock.\n  # This option makes the Bedrock port the same as the Java port every time you start the server.\n  # This option is for the plugin version only.\n  clone-remote-port: false\n  # The MOTD that will be broadcasted to Minecraft: Bedrock Edition clients. This is irrelevant if \"passthrough-motd\" is set to true\n  # If either of these are empty, the respective string will default to \"Geyser\"\n  motd1: \"Geyser\"\n  motd2: \"Another Geyser server.\"\n  # The Server Name that will be sent to Minecraft: Bedrock Edition clients. This is visible in both the pause menu and the settings menu.\n  server-name: \"Geyser\"\n  # How much to compress network traffic to the Bedrock client. The higher the number, the more CPU usage used, but\n  # the smaller the bandwidth used. Does not have any effect below -1 or above 9. Set to -1 to disable.\n  compression-level: 6\n  # Whether to enable PROXY protocol or not for clients. You DO NOT WANT this feature unless you run UDP reverse proxy\n  # in front of your Geyser instance.\n  enable-proxy-protocol: false\n  # A list of allowed PROXY protocol speaking proxy IP addresses/subnets. Only effective when \"enable-proxy-protocol\" is enabled, and\n  # should really only be used when you are not able to use a proper firewall (usually true with shared hosting providers etc.).\n  # Keeping this list empty means there is no IP address whitelist.\n  # Both IP addresses and subnets are supported.\n  #proxy-protocol-whitelisted-ips: [ \"127.0.0.1\", \"172.18.0.0/16\" ]\nremote:\n  # The IP address of the remote (Java Edition) server\n  # If it is \"auto\", for standalone version the remote address will be set to 127.0.0.1,\n  # for plugin versions, it is recommended to keep this as \"auto\" so Geyser will automatically configure address, port, and auth-type.\n  # Leave as \"auto\" if floodgate is installed.\n  address: auto\n  # The port of the remote (Java Edition) server\n  # For plugin versions, if address has been set to \"auto\", the port will also follow the server's listening port.\n  port: 25565\n  # Authentication type. Can be offline, online, or floodgate (see https://github.com/GeyserMC/Geyser/wiki/Floodgate).\n  # For plugin versions, it's recommended to keep the `address` field to \"auto\" so Floodgate support is automatically configured.\n  # If Floodgate is installed and `address:` is set to \"auto\", then \"auth-type: floodgate\" will automatically be used.\n  auth-type: online\n  # Allow for password-based authentication methods through Geyser. Only useful in online mode.\n  # If this is false, users must authenticate to Microsoft using a code provided by Geyser on their desktop.\n  allow-password-authentication: true\n  # Whether to enable PROXY protocol or not while connecting to the server.\n  # This is useful only when:\n  # 1) Your server supports PROXY protocol (it probably doesn't)\n  # 2) You run Velocity or BungeeCord with the option enabled in the proxy's main config.\n  # IF YOU DON'T KNOW WHAT THIS IS, DON'T TOUCH IT!\n  use-proxy-protocol: false\n  # Forward the hostname that the Bedrock client used to connect over to the Java server\n  # This is designed to be used for forced hosts on proxies\n  forward-hostname: false\n\n# Floodgate uses encryption to ensure use from authorised sources.\n# This should point to the public key generated by Floodgate (BungeeCord, Spigot or Velocity)\n# You can ignore this when not using Floodgate.\n# If you're using a plugin version of Floodgate on the same server, the key will automatically be picked up from Floodgate.\nfloodgate-key-file: key.pem\n\n# For online mode authentication type only.\n# Stores a list of Bedrock players that should have their Java Edition account saved after login.\n# This saves a token that can be reused to authenticate the player later. This does not save emails or passwords,\n# but you should still be cautious when adding to this list and giving others access to this Geyser instance's files.\n# Removing a name from this list will delete its cached login information on the next Geyser startup.\n# The file that tokens will be saved in is in the same folder as this config, named \"saved-refresh-tokens.json\".\nsaved-user-logins:\n  - ThisExampleUsernameShouldBeLongEnoughToNeverBeAnXboxUsername\n  - ThisOtherExampleUsernameShouldAlsoBeLongEnough\n\n# Specify how many seconds to wait while user authorizes Geyser to access their Microsoft account.\n# User is allowed to disconnect from the server during this period.\npending-authentication-timeout: 120\n\n# Bedrock clients can freeze when opening up the command prompt for the first time if given a lot of commands.\n# Disabling this will prevent command suggestions from being sent and solve freezing for Bedrock clients.\ncommand-suggestions: true\n\n# The following three options enable \"ping passthrough\" - the MOTD, player count and/or protocol name gets retrieved from the Java server.\n# Relay the MOTD from the remote server to Bedrock players.\npassthrough-motd: false\n# Relay the protocol name (e.g. BungeeCord [X.X], Paper 1.X) - only really useful when using a custom protocol name!\n# This will also show up on sites like MCSrvStatus. <mcsrvstat.us>\npassthrough-protocol-name: false\n# Relay the player count and max players from the remote server to Bedrock players.\npassthrough-player-counts: false\n# Enable LEGACY ping passthrough. There is no need to enable this unless your MOTD or player count does not appear properly.\n# This option does nothing on standalone.\nlegacy-ping-passthrough: false\n# How often to ping the remote server, in seconds. Only relevant for standalone or legacy ping passthrough.\n# Increase if you are getting BrokenPipe errors.\nping-passthrough-interval: 3\n\n# Whether to forward player ping to the server. While enabling this will allow Bedrock players to have more accurate\n# ping, it may also cause players to time out more easily.\nforward-player-ping: false\n\n# Maximum amount of players that can connect. This is only visual at this time and does not actually limit player count.\nmax-players: 100\n\n# If debug messages should be sent through console\ndebug-mode: false\n\n# Allow third party capes to be visible. Currently allowing:\n# OptiFine capes, LabyMod capes, 5Zig capes and MinecraftCapes\nallow-third-party-capes: true\n\n# Allow third party deadmau5 ears to be visible. Currently allowing:\n# MinecraftCapes\nallow-third-party-ears: false\n\n# Allow a fake cooldown indicator to be sent. Bedrock players do not see a cooldown as they still use 1.8 combat\n# Can be title, actionbar or false\nshow-cooldown: title\n\n# Controls if coordinates are shown to players.\nshow-coordinates: true\n\n# Whether Bedrock players are blocked from performing their scaffolding-style bridging.\ndisable-bedrock-scaffolding: false\n\n# Whether Bedrock players can right-click outside of their inventory to replace armor in their inventory, even if the\n# armor slot is already occupied (which Java Edition doesn't allow)\nalways-quick-change-armor: false\n\n# If set, when a Bedrock player performs any emote, it will swap the offhand and mainhand items, just like the Java Edition keybind\n# There are three options this can be set to:\n# disabled - the default/fallback, which doesn't apply this workaround\n# no-emotes - emotes will NOT be sent to other Bedrock clients and offhand will be swapped. This effectively disables all emotes from being seen.\n# emotes-and-offhand - emotes will be sent to Bedrock clients and offhand will be swapped\nemote-offhand-workaround: \"disabled\"\n\n# The default locale if we dont have the one the client requested. Uncomment to not use the default system language.\n# default-locale: en_us\n\n# Specify how many days images will be cached to disk to save downloading them from the internet.\n# A value of 0 is disabled. (Default: 0)\ncache-images: 0\n\n# Allows custom skulls to be displayed. Keeping them enabled may cause a performance decrease on older/weaker devices.\nallow-custom-skulls: true\n\n# The maximum number of custom skulls to be displayed per player. Increasing this may decrease performance on weaker devices.\n# Setting this to -1 will cause all custom skulls to be displayed regardless of distance or number.\nmax-visible-custom-skulls: 128\n\n# The radius in blocks around the player in which custom skulls are displayed.\ncustom-skull-render-distance: 32\n\n# Whether to add (at this time, only) the furnace minecart as a separate item in the game, which normally does not exist in Bedrock Edition.\n# This should only need to be disabled if using a proxy that does not use the \"transfer packet\" style of server switching.\n# If this is disabled, furnace minecart items will be mapped to hopper minecart items.\n# This option requires a restart of Geyser in order to change its setting.\nadd-non-bedrock-items: true\n\n# Bedrock prevents building and displaying blocks above Y127 in the Nether.\n# This config option works around that by changing the Nether dimension ID to the End ID. \n# The main downside to this is that the entire Nether will have the same red fog rather than having different fog for each biome.\nabove-bedrock-nether-building: false\n\n# Force clients to load all resource packs if there are any.\n# If set to false, it allows the user to connect to the server even if they don't\n# want to download the resource packs.\nforce-resource-packs: true\n\n# Allows Xbox achievements to be unlocked.\n# THIS DISABLES ALL COMMANDS FROM SUCCESSFULLY RUNNING FOR BEDROCK IN-GAME, as otherwise Bedrock thinks you are cheating.\nxbox-achievements-enabled: false\n\n# Whether player IP addresses will be logged by the server.\nlog-player-ip-addresses: true\n\n# Whether to alert the console and operators that a new Geyser version is available that supports a Bedrock version\n# that this Geyser version does not support. It's recommended to keep this option enabled, as many Bedrock platforms\n# auto-update.\nnotify-on-new-bedrock-update: true\n\n# bStats is a stat tracker that is entirely anonymous and tracks only basic information\n# about Geyser, such as how many people are online, how many servers are using Geyser,\n# what OS is being used, etc. You can learn more about bStats here: https://bstats.org/.\n# https://bstats.org/plugin/server-implementation/GeyserMC\nmetrics:\n  # If metrics should be enabled\n  enabled: true\n  # UUID of server, don't change!\n  uuid: 96e45ad9-512d-4907-8a92-1ec5ebed6d5f\n\n# ADVANCED OPTIONS - DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING!\n\n# Geyser updates the Scoreboard after every Scoreboard packet, but when Geyser tries to handle\n# a lot of scoreboard packets per second can cause serious lag.\n# This option allows you to specify after how many Scoreboard packets per seconds\n# the Scoreboard updates will be limited to four updates per second.\nscoreboard-packet-threshold: 20\n\n# Allow connections from ProxyPass and Waterdog.\n# See https://www.spigotmc.org/wiki/firewall-guide/ for assistance - use UDP instead of TCP.\nenable-proxy-connections: false\n\n# The internet supports a maximum MTU of 1492 but could cause issues with packet fragmentation.\n# 1400 is the default.\nmtu: 1400\n\n# Whether to connect directly into the Java server without creating a TCP connection.\n# This should only be disabled if a plugin that interfaces with packets or the network does not work correctly with Geyser.\n# If enabled on plugin versions, the remote address and port sections are ignored\n# If disabled on plugin versions, expect performance decrease and latency increase\nuse-direct-connection: true\n\nconfig-version: 4\n"
  },
  {
    "path": "docker-compose.yml",
    "content": "# Minecraft Java Paper Server + Geyser + Floodgate Docker Container - Docker Compose\n# Author: James A. Chambers - https://jamesachambers.com/minecraft-java-bedrock-server-together-geyser-floodgate/\n# GitHub Repository: https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate\n\n# To run multiple servers change the volume name under both \"volumes\" sections and select different ports\nversion: \"3.5\"\nservices:\n  minecraftbe:\n    image: 05jchambers/legendary-minecraft-geyser-floodgate:latest\n    restart: \"unless-stopped\"\n    ports:\n      - 25565:25565\n      - 19132:19132\n      - 19132:19132/udp\n    volumes:\n      - minecraft:/minecraft\n    stdin_open: true # docker run -i\n    tty: true # docker run -t\n    entrypoint: [ \"/bin/bash\", \"/scripts/start.sh\" ]\n    # Environment variables\n    environment:\n      Port: \"25565\"\n      BedrockPort: \"19132\"\n      TZ: \"America/Denver\" # Timezone\n      #BackupCount: 10 # Number of rolling backups to keep\n      #MaxMemory: 2048 # Maximum memory usage for Java\n      #Version: 1.19.3 # Use custom version\n      #NoBackup: \"plugins\" # Optional folder to skip during backups\n      #NoPermCheck: \"Y\" # Optional flag to skip permissions check\n      #NoViaVersion: \"Y\" # Optional flag to disable ViaVersion plugin\n      #QuietCurl: \"Y\" # Optional flag to reduce curl log output by suppressing progress meter\nvolumes:\n  minecraft:\n    driver: local"
  },
  {
    "path": "kubernetes/01-namespace.yaml",
    "content": "apiVersion: v1\nkind: Namespace\nmetadata:\n  name: minecraft\n  labels:\n    name: minecraft"
  },
  {
    "path": "kubernetes/02-pvc.yaml",
    "content": "apiVersion: v1\nkind: PersistentVolumeClaim\nmetadata:\n  name: minecraft-pvc\n  namespace: minecraft\nspec:\n  accessModes:\n    - ReadWriteOnce\n  storageClassName: longhorn-retain\n  resources:\n    requests:\n      storage: 3Gi\n"
  },
  {
    "path": "kubernetes/03-deployment.yaml",
    "content": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n  namespace: minecraft\n  name: minecraft\nspec:\n  replicas: 1\n  selector:\n    matchLabels:\n      app: minecraft\n  template:\n    metadata:\n      labels:\n        app: minecraft\n    spec:\n      containers:\n      - name: minecraft\n        image: 05jchambers/legendary-minecraft-geyser-floodgate:latest\n        imagePullPolicy: IfNotPresent\n        volumeMounts:\n        - name: minecraft-data\n          mountPath: /minecraft\n        env:\n        - name: MaxMemory\n          value: '1024'\n        - name: k8s\n          value: \"True\"\n        resources:\n          limits:\n            cpu: 1500m\n            memory: 1024M\n            ephemeral-storage: 50Mi\n          requests:\n            cpu: 750m\n            memory: 750M\n            ephemeral-storage: 2Mi\n        ports:\n        - containerPort: 25565\n          name: java\n        - containerPort: 19132\n          name: bedrock-v4\n        - containerPort: 19133\n          name: bedrock-v6\n      volumes:\n      - name: minecraft-data\n        persistentVolumeClaim:\n          claimName: minecraft-pvc"
  },
  {
    "path": "kubernetes/04-service.yaml",
    "content": "apiVersion: v1\nkind: Service\nmetadata:\n  name: minecraft\n  namespace: minecraft\nspec:\n  type: LoadBalancer\n  ipFamilyPolicy: PreferDualStack\n  ipFamilies:\n    - IPv4\n    - IPv6\n  ports:\n    - name: java\n      port: 25565\n      protocol: TCP\n      targetPort: java\n    - name: bedrock-v4-udp\n      port: 19132\n      protocol: UDP\n      targetPort: bedrock-v4\n    - name: bedrock-v6-udp\n      port: 19133\n      protocol: UDP\n      targetPort: bedrock-v6\n    - name: bedrock-v4-tcp\n      port: 19132\n      protocol: TCP\n      targetPort: bedrock-v4\n    - name: bedrock-v6-tcp\n      port: 19133\n      protocol: TCP\n      targetPort: bedrock-v6\n  selector:\n    app: minecraft"
  },
  {
    "path": "paper-global.yml",
    "content": "# This is the global configuration file for Paper.\n# As you can see, there's a lot to configure. Some options may impact gameplay, so use\n# with caution, and make sure you know what each option does before configuring.\n# \n# If you need help with the configuration or have any questions related to Paper,\n# join us in our Discord or check the docs page.\n# \n# The world configuration options have been moved inside\n# their respective world folder. The files are named paper-world.yml\n# \n# Docs: https://docs.papermc.io/\n# Discord: https://discord.gg/papermc\n# Website: https://papermc.io/\n\n_version: 28\nasync-chunks:\n  threads: -1\nchunk-loading:\n  autoconfig-send-distance: true\n  enable-frustum-priority: false\n  global-max-chunk-load-rate: -1.0\n  global-max-chunk-send-rate: -1.0\n  global-max-concurrent-loads: 500.0\n  max-concurrent-sends: 2\n  min-load-radius: 2\n  player-max-chunk-load-rate: -1.0\n  player-max-concurrent-loads: 20.0\n  target-player-chunk-send-rate: 100.0\nchunk-system:\n  gen-parallelism: default\n  io-threads: -1\n  worker-threads: -1\ncollisions:\n  enable-player-collisions: true\n  send-full-pos-for-hard-colliding-entities: true\ncommands:\n  fix-target-selector-tag-completion: true\n  suggest-player-names-when-null-tab-completions: true\n  time-command-affects-all-worlds: false\nconsole:\n  enable-brigadier-completions: true\n  enable-brigadier-highlighting: true\n  has-all-permissions: false\nitem-validation:\n  book:\n    author: 8192\n    page: 16384\n    title: 8192\n  book-size:\n    page-max: 2560\n    total-multiplier: 0.98\n  display-name: 8192\n  lore-line: 8192\n  resolve-selectors-in-books: false\nlogging:\n  deobfuscate-stacktraces: true\n  log-player-ip-addresses: true\n  use-rgb-for-named-text-colors: true\nmessages:\n  kick:\n    authentication-servers-down: <lang:multiplayer.disconnect.authservers_down>\n    connection-throttle: Connection throttled! Please wait before reconnecting.\n    flying-player: <lang:multiplayer.disconnect.flying>\n    flying-vehicle: <lang:multiplayer.disconnect.flying>\n  no-permission: <red>I'm sorry, but you do not have permission to perform this command.  Please\n    contact the server administrators if you believe that this is in error.\n  use-display-name-in-quit-message: false\nmisc:\n  chat-threads:\n    chat-executor-core-size: -1\n    chat-executor-max-size: -1\n  fix-entity-position-desync: true\n  lag-compensate-block-breaking: true\n  load-permissions-yml-before-plugins: true\n  max-joins-per-tick: 3\n  region-file-cache-size: 256\n  strict-advancement-dimension-check: false\n  use-alternative-luck-formula: false\n  use-dimension-type-for-custom-spawners: false\npacket-limiter:\n  all-packets:\n    action: KICK\n    interval: 7.0\n    max-packet-rate: 500.0\n  kick-message: <red><lang:disconnect.exceeded_packet_rate>\n  overrides:\n    ServerboundPlaceRecipePacket:\n      action: DROP\n      interval: 4.0\n      max-packet-rate: 5.0\nplayer-auto-save:\n  max-per-tick: -1\n  rate: -1\nproxies:\n  bungee-cord:\n    online-mode: false\n  proxy-protocol: false\n  velocity:\n    enabled: false\n    online-mode: false\n    secret: ''\nscoreboards:\n  save-empty-scoreboard-teams: false\n  track-plugin-scoreboards: false\nspam-limiter:\n  incoming-packet-threshold: 300\n  recipe-spam-increment: 1\n  recipe-spam-limit: 20\n  tab-spam-increment: 1\n  tab-spam-limit: 500\ntimings:\n  enabled: true\n  hidden-config-entries:\n  - database\n  - settings.bungeecord-addresses\n  - settings.velocity-support.secret\n  - proxies.velocity.secret\n  history-interval: 300\n  history-length: 3600\n  server-name: Unknown Server\n  server-name-privacy: false\n  url: https://timings.aikar.co/\n  verbose: true\nunsupported-settings:\n  allow-grindstone-overstacking: false\n  allow-headless-pistons: false\n  allow-permanent-block-break-exploits: false\n  allow-piston-duplication: false\n  perform-username-validation: true\nwatchdog:\n  early-warning-delay: 120000\n  early-warning-every: 60000\n"
  },
  {
    "path": "server.properties",
    "content": "# Minecraft server properties\nenable-jmx-monitoring=false\nrcon.port=25575\nlevel-seed=\ngamemode=survival\nenable-command-block=false\nenable-query=false\ngenerator-settings={}\nlevel-name=world\nmotd=A Minecraft Server\nquery.port=25565\npvp=true\ngenerate-structures=true\ndifficulty=easy\nnetwork-compression-threshold=512\nrequire-resource-pack=false\nmax-tick-time=120000\nuse-native-transport=true\nmax-players=20\nonline-mode=true\nenable-status=true\nallow-flight=false\nbroadcast-rcon-to-ops=true\nview-distance=10\nserver-ip=\nresource-pack-prompt=\nallow-nether=true\nserver-port=25565\nenable-rcon=false\nsync-chunk-writes=true\nop-permission-level=4\nprevent-proxy-connections=false\nhide-online-players=false\nresource-pack=\nentity-broadcast-range-percentage=100\nsimulation-distance=10\nrcon.password=\nplayer-idle-timeout=0\ndebug=false\nforce-gamemode=false\nrate-limit=0\nhardcore=false\nwhite-list=false\nbroadcast-console-to-ops=true\nspawn-npcs=true\nspawn-animals=true\nfunction-permission-level=2\nlevel-type=default\ntext-filtering-config=\nspawn-monsters=true\nenforce-whitelist=false\nresource-pack-sha1=\nspawn-protection=0\nmax-world-size=29999984\nenforce-secure-profile=false"
  },
  {
    "path": "spigot.yml",
    "content": "# This is the main configuration file for Spigot.\n# As you can see, there's tons to configure. Some options may impact gameplay, so use\n# with caution, and make sure you know what each option does before configuring.\n# For a reference for any variable inside this file, check out the Spigot wiki at\n# http://www.spigotmc.org/wiki/spigot-configuration/\n#\n# If you need help with the configuration or have any questions related to Spigot,\n# join us at the Discord or drop by our forums and leave a post.\n#\n# Discord: https://www.spigotmc.org/go/discord\n# Forums: http://www.spigotmc.org/\n\nsettings:\n  debug: false\n  sample-count: 12\n  bungeecord: false\n  player-shuffle: 0\n  user-cache-size: 1000\n  save-user-cache-on-stop-only: false\n  moved-wrongly-threshold: 0.0625\n  moved-too-quickly-multiplier: 10.0\n  timeout-time: 60\n  restart-on-crash: true\n  restart-script: ./start.sh\n  netty-threads: 4\n  attribute:\n    maxHealth:\n      max: 2048.0\n    movementSpeed:\n      max: 2048.0\n    attackDamage:\n      max: 2048.0\n  log-villager-deaths: true\n  log-named-deaths: true\nmessages:\n  whitelist: You are not whitelisted on this server!\n  unknown-command: Unknown command. Type \"/help\" for help.\n  server-full: The server is full!\n  outdated-client: Outdated client! Please use {0}\n  outdated-server: Outdated server! I'm still on {0}\n  restart: Server is restarting\nadvancements:\n  disable-saving: false\n  disabled:\n    - minecraft:story/disabled\nplayers:\n  disable-saving: false\ncommands:\n  spam-exclusions:\n    - /skill\n  silent-commandblock-console: false\n  replace-commands:\n    - setblock\n    - summon\n    - testforblock\n    - tellraw\n  log: true\n  tab-complete: 0\n  send-namespaced: true\nworld-settings:\n  default:\n    below-zero-generation-in-existing-chunks: true\n    verbose: false\n    merge-radius:\n      exp: 6.0\n      item: 4.0\n    growth:\n      cactus-modifier: 100\n      cane-modifier: 100\n      melon-modifier: 100\n      mushroom-modifier: 100\n      pumpkin-modifier: 100\n      sapling-modifier: 100\n      beetroot-modifier: 100\n      carrot-modifier: 100\n      potato-modifier: 100\n      wheat-modifier: 100\n      netherwart-modifier: 100\n      vine-modifier: 100\n      cocoa-modifier: 100\n      bamboo-modifier: 100\n      sweetberry-modifier: 100\n      kelp-modifier: 100\n      twistingvines-modifier: 100\n      weepingvines-modifier: 100\n      cavevines-modifier: 100\n      glowberry-modifier: 100\n    entity-activation-range:\n      animals: 32\n      monsters: 32\n      raiders: 48\n      misc: 16\n      water: 16\n      villagers: 32\n      flying-monsters: 32\n      wake-up-inactive:\n        animals-max-per-tick: 4\n        animals-every: 1200\n        animals-for: 100\n        monsters-max-per-tick: 8\n        monsters-every: 400\n        monsters-for: 100\n        villagers-max-per-tick: 4\n        villagers-every: 600\n        villagers-for: 100\n        flying-monsters-max-per-tick: 8\n        flying-monsters-every: 200\n        flying-monsters-for: 100\n      villagers-work-immunity-after: 100\n      villagers-work-immunity-for: 20\n      villagers-active-for-panic: true\n      tick-inactive-villagers: true\n      ignore-spectators: false\n    entity-tracking-range:\n      players: 48\n      animals: 48\n      monsters: 48\n      misc: 32\n      other: 64\n    ticks-per:\n      hopper-transfer: 8\n      hopper-check: 1\n    hopper-amount: 1\n    dragon-death-sound-radius: 0\n    seed-village: 10387312\n    seed-desert: 14357617\n    seed-igloo: 14357618\n    seed-jungle: 14357619\n    seed-swamp: 14357620\n    seed-monument: 10387313\n    seed-shipwreck: 165745295\n    seed-ocean: 14357621\n    seed-outpost: 165745296\n    seed-endcity: 10387313\n    seed-slime: 987234911\n    seed-nether: 30084232\n    seed-mansion: 10387319\n    seed-fossil: 14357921\n    seed-portal: 34222645\n    seed-stronghold: default\n    hunger:\n      jump-walk-exhaustion: 0.05\n      jump-sprint-exhaustion: 0.2\n      combat-exhaustion: 0.1\n      regen-exhaustion: 6.0\n      swim-multiplier: 0.01\n      sprint-multiplier: 0.1\n      other-multiplier: 0.0\n    max-tnt-per-tick: 100\n    max-tick-time:\n      tile: 50\n      entity: 50\n    view-distance: default\n    simulation-distance: default\n    thunder-chance: 100000\n    item-despawn-rate: 6000\n    enable-zombie-pigmen-portal-spawns: true\n    wither-spawn-sound-radius: 0\n    arrow-despawn-rate: 1200\n    trident-despawn-rate: 1200\n    hanging-tick-frequency: 100\n    zombie-aggressive-towards-villager: true\n    nerf-spawner-mobs: false\n    mob-spawn-range: 6\n    end-portal-sound-radius: 0\nconfig-version: 12\nstats:\n  disable-saving: false\n  forced-stats: {}\n"
  },
  {
    "path": "start.sh",
    "content": "#!/bin/bash\n# Legendary Paper Minecraft Java Server Docker + Geyser/Floodgate server startup script\n# Author: James A. Chambers - https://jamesachambers.com/minecraft-java-bedrock-server-together-geyser-floodgate/\n# GitHub Repository: https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate\n\n# If running as root, create 'minecraft' user and restart script as 'minecraft' user\nif [ \"$(id -u)\" = '0' ]; then\n    echo \"Script is running as root, switching to 'minecraft' user...\"\n\n    if ! id minecraft >/dev/null 2>&1; then\n        echo \"Creating 'minecraft' user...\"\n        useradd -m -r -s /bin/bash minecraft\n    fi\n\n    chown -R minecraft:minecraft /minecraft\n\n    exec su minecraft -c \"$0 $@\"\nfi\n\necho \"Paper Minecraft Java Server Docker + Geyser/Floodgate script by James A. Chambers\"\necho \"Latest version always at https://github.com/TheRemote/Legendary-Java-Minecraft-Geyser-Floodgate\"\necho \"Don't forget to set up port forwarding on your router!  The default port is 25565 and the Bedrock port is 19132\"\n\nif [ ! -d '/minecraft' ]; then\n    echo \"ERROR:  A named volume was not specified for the minecraft server data.  Please create one with: docker volume create yourvolumename\"\n    echo \"Please pass the new volume to docker like this:  docker run -it -v yourvolumename:/minecraft\"\n    exit 1\nfi\n\n# Randomizer for user agent\nRandNum=$(echo $((1 + $RANDOM % 5000)))\n\nif [ -z \"$Port\" ]; then\n    Port=\"25565\"\nfi\necho \"Port used: $Port\"\n\nif [ -z \"$BedrockPort\" ]; then\n    Port=\"19132\"\nfi\necho \"Bedrock port used: $BedrockPort\"\n\n# Change directory to server directory\ncd /minecraft\n\n# Create backups/downloads folder if it doesn't exist\nif [ ! -d \"/minecraft/downloads\" ]; then\n    mkdir -p /minecraft/downloads\nfi\nif [ ! -d \"/minecraft/config\" ]; then\n    mkdir -p /minecraft/config\nfi\nif [ ! -d \"/minecraft/backups\" ]; then\n    mkdir -p /minecraft/backups\nfi\nif [ ! -d \"/minecraft/plugins/Geyser-Spigot\" ]; then\n    mkdir -p /minecraft/plugins/Geyser-Spigot\nfi\n\n# Check if network interfaces are up\nNetworkChecks=0\nif [ -e '/sbin/route' ]; then\n    DefaultRoute=$(/sbin/route -n | awk '$4 == \"UG\" {print $2}')\nelse\n    DefaultRoute=$(route -n | awk '$4 == \"UG\" {print $2}')\nfi\nwhile [ -z \"$DefaultRoute\" ]; do\n    echo \"Network interface not up, will try again in 1 second\"\n    sleep 1\n    if [ -e '/sbin/route' ]; then\n        DefaultRoute=$(/sbin/route -n | awk '$4 == \"UG\" {print $2}')\n    else\n        DefaultRoute=$(route -n | awk '$4 == \"UG\" {print $2}')\n    fi\n    NetworkChecks=$((NetworkChecks + 1))\n    if [ $NetworkChecks -gt 20 ]; then\n        echo \"Waiting for network interface to come up timed out - starting server without network connection ...\"\n        break\n    fi\ndone\n\n# Take ownership of server files and set correct permissions\nif [ -z \"$NoPermCheck\" ]; then\n    echo \"Taking ownership of all server files/folders in /minecraft...\"\n    sudo -n chown -R $(whoami) /minecraft >/dev/null 2>&1\n    echo \"Complete\"\nelse\n    echo \"Skipping permissions check due to NoPermCheck flag\"\nfi\n\n# Back up server\nif [ -d \"world\" ]; then\n    if [ -n \"$(which pigz)\" ]; then\n        echo \"Backing up server (all cores) to cd minecraft/backups folder\"\n        tarArgs=(-I pigz --exclude='./backups' --exclude='./cache' --exclude='./logs' --exclude='./paperclip.jar')\n        IFS=','\n        read -ra ADDR <<< \"$NoBackup\"\n        for i in \"${ADDR[@]}\"; do\n            tarArgs+=(--exclude=\"./$i\")\n        done\n        tarArgs+=(-pvcf backups/$(date +%Y.%m.%d.%H.%M.%S).tar.gz ./*)\n        tar \"${tarArgs[@]}\"\n    else\n        echo \"Backing up server (single core, pigz not found) to cd minecraft/backups folder\"\n        tarArgs=(--exclude='./backups' --exclude='./cache' --exclude='./logs' --exclude='./paperclip.jar')\n        IFS=','\n        read -ra ADDR <<< \"$NoBackup\"\n        for i in \"${ADDR[@]}\"; do\n            tarArgs+=(--exclude=\"./$i\")\n        done\n        tarArgs+=(-pvcf backups/$(date +%Y.%m.%d.%H.%M.%S).tar.gz ./*)\n        tar \"${tarArgs[@]}\"\n    fi\nfi\n\n# Rotate backups\nif [ -d /minecraft/backups ]; then\n    Rotate=$(\n        pushd /minecraft/backups\n        ls -1tr | head -n -$BackupCount | xargs -d '\\n' rm -f --\n        popd\n    )\nfi\n\n# Copy config files if this is a brand new server\nif [ ! -e \"/minecraft/bukkit.yml\" ]; then\n    cp /scripts/bukkit.yml /minecraft/bukkit.yml\nfi\nif [ ! -e \"/minecraft/config/paper-global.yml\" ]; then\n    cp /scripts/paper-global.yml /minecraft/config/paper-global.yml\nfi\nif [ ! -e \"/minecraft/spigot.yml\" ]; then\n    cp /scripts/spigot.yml /minecraft/spigot.yml\nfi\nif [ ! -e \"/minecraft/server.properties\" ]; then\n    cp /scripts/server.properties /minecraft/server.properties\nfi\nif [ ! -e \"/minecraft/plugins/Geyser-Spigot/config.yml\" ]; then\n    cp /scripts/config.yml /minecraft/plugins/Geyser-Spigot/config.yml\nfi\n\n# Test internet connectivity first\n# Update paperclip.jar\necho \"Updating to most recent paperclip version ...\"\n\n# Test internet connectivity first\nif [ -z \"$QuietCurl\" ]; then\n    curl -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -s https://papermc.io -o /dev/null\nelse\n    curl --no-progress-meter -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -s https://papermc.io -o /dev/null\nfi\n\nif [ \"$?\" != 0 ]; then\n    echo \"Unable to connect to update website (internet connection may be down).  Skipping update ...\"\nelse\n    # Get latest build using PaperMC API v3\n    Build=$(curl -s -L \"https://fill.papermc.io/v3/projects/paper/versions/$Version\" | jq -r '.builds[0]' 2>/dev/null)\n    if [[ -n \"$Build\" && \"$Build\" != \"null\" ]]; then\n        echo \"Latest paperclip build found: $Build\"\n        # Get the SHA256 hash and filename for the download URL (pipe directly to avoid newline issues in commit messages)\n        SHA256=$(curl -s -L \"https://fill.papermc.io/v3/projects/paper/versions/$Version/builds/$Build\" | jq -r '.downloads[\"server:default\"].checksums.sha256' 2>/dev/null)\n        FileName=\"paper-$Version-$Build.jar\"\n        if [[ -n \"$SHA256\" && \"$SHA256\" != \"null\" ]]; then\n            echo \"Downloading Paper $Version build $Build...\"\n            if [ -z \"$QuietCurl\" ]; then\n                curl -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/paperclip.jar \"https://fill-data.papermc.io/v1/objects/$SHA256/$FileName\"\n            else\n                curl --no-progress-meter -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/paperclip.jar \"https://fill-data.papermc.io/v1/objects/$SHA256/$FileName\"\n            fi\n        else\n            echo \"Unable to retrieve download info for Paper build $Build\"\n        fi\n    else\n        echo \"Unable to retrieve latest Paper build (got result of $Build)\"\n    fi\n\n    # Update Floodgate\n    echo \"Updating Floodgate...\"\n    if [ -z \"$QuietCurl\" ]; then\n        curl -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/plugins/Floodgate-Spigot.jar \"https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot\"\n    else\n        curl --no-progress-meter -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/plugins/Floodgate-Spigot.jar \"https://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot\"\n    fi\n\n    # Update Geyser\n    echo \"Updating Geyser...\"\n    if [ -z \"$QuietCurl\" ]; then\n        curl -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/plugins/Geyser-Spigot.jar \"https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot\"\n    else\n        curl --no-progress-meter -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/plugins/Geyser-Spigot.jar \"https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot\"\n    fi\n\n    if [ -z \"$NoViaVersion\" ]; then\n        if [ -n \"$ViaVersionSnapshot\" ]; then\n            # Update ViaVersion from Jenkins CI (snapshot/dev versions)\n            echo \"Updating ViaVersion from Jenkins CI (snapshot)...\"\n            ViaVersionVersion=$(curl -s -k -L \"https://ci.viaversion.com/job/ViaVersion/lastBuild/artifact/build/libs/\" | grep -oE 'href=\"ViaVersion[^\"]+' | head -1 | sed 's/href=\"//')\n            if [ -n \"$ViaVersionVersion\" ]; then\n                echo \"Found ViaVersion: $ViaVersionVersion\"\n                if [ -z \"$QuietCurl\" ]; then\n                    curl -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/plugins/ViaVersion.jar \"https://ci.viaversion.com/job/ViaVersion/lastBuild/artifact/build/libs/$ViaVersionVersion\"\n                else\n                    curl --no-progress-meter -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/plugins/ViaVersion.jar \"https://ci.viaversion.com/job/ViaVersion/lastBuild/artifact/build/libs/$ViaVersionVersion\"\n                fi\n            else\n                echo \"Unable to check for updates to ViaVersion!\"\n            fi\n        else\n            # Update ViaVersion from GitHub Releases (stable versions) - default\n            ViaVersionURL=$(curl -s \"https://api.github.com/repos/ViaVersion/ViaVersion/releases/latest\" | jq -r '.assets[0].browser_download_url' 2>/dev/null)\n            if [[ -n \"$ViaVersionURL\" && \"$ViaVersionURL\" != \"null\" ]]; then\n                ViaVersionTag=$(curl -s \"https://api.github.com/repos/ViaVersion/ViaVersion/releases/latest\" | jq -r '.tag_name' 2>/dev/null)\n                echo \"Updating ViaVersion to $ViaVersionTag...\"\n                if [ -z \"$QuietCurl\" ]; then\n                    curl -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/plugins/ViaVersion.jar \"$ViaVersionURL\"\n                else\n                    curl --no-progress-meter -H \"Accept-Encoding: identity\" -H \"Accept-Language: en\" -L -A \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4.212 Safari/537.36\" -o /minecraft/plugins/ViaVersion.jar \"$ViaVersionURL\"\n                fi\n            else\n                echo \"Unable to check for updates to ViaVersion!\"\n            fi\n        fi\n    else\n        echo \"ViaVersion is disabled -- skipping\"\n    fi\nfi\n\n# Accept EULA\nAcceptEULA=$(echo eula=true >eula.txt)\n\n# Change ports in server.properties\nsed -i \"/server-port=/c\\server-port=$Port\" /minecraft/server.properties\nsed -i \"/query\\.port=/c\\query\\.port=$Port\" /minecraft/server.properties\n# Change Bedrock port in Geyser config\nif [ -e /minecraft/plugins/Geyser-Spigot/config.yml ]; then\n    sed -i -z \"s/  port: [0-9]*/  port: $BedrockPort/\" /minecraft/plugins/Geyser-Spigot/config.yml\nfi\n\n# Start server\necho \"Starting Minecraft server...\"\n\nif [[ -z \"$MaxMemory\" ]] || [[ \"$MaxMemory\" -le 0 ]]; then\n    exec java -XX:+UnlockDiagnosticVMOptions -XX:-UseAESCTRIntrinsics -DPaper.IgnoreJavaVersion=true -Xms400M -jar /minecraft/paperclip.jar\nelse\n    exec java -XX:+UnlockDiagnosticVMOptions -XX:-UseAESCTRIntrinsics -DPaper.IgnoreJavaVersion=true -Xms400M -Xmx${MaxMemory}M -jar /minecraft/paperclip.jar\nfi\n\n# Exit container\nexit 0\n"
  }
]