From 288c4f611b72b022bc310a375e42f89ceab1e1df Mon Sep 17 00:00:00 2001 From: rfresh2 <89827146+rfresh2@users.noreply.github.com> Date: Wed, 12 Jul 2023 23:17:58 -0700 Subject: [PATCH] update readme and clarify license --- .github/FUNDING.yml | 2 -- .github/ISSUE_TEMPLATE/blank_issue.md | 4 --- .github/ISSUE_TEMPLATE/new_version.md | 14 -------- .github/workflows/.keep | 1 + .github/workflows/bedrock-ci.yml | 41 ----------------------- .github/workflows/build-gh-pages.yml | 22 ------------ .github/workflows/ci.yml | 29 ---------------- .github/workflows/tag.yml | 34 ------------------- LICENSE | 4 +-- LICENSE-Pork2b2tBot | 16 +++++++++ README.md | 21 ++++++------ TODO | 10 ------ src/main/java/com/zenith/util/Config.java | 12 +++---- 13 files changed, 35 insertions(+), 175 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/ISSUE_TEMPLATE/blank_issue.md delete mode 100644 .github/ISSUE_TEMPLATE/new_version.md create mode 100644 .github/workflows/.keep delete mode 100644 .github/workflows/bedrock-ci.yml delete mode 100644 .github/workflows/build-gh-pages.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/tag.yml create mode 100644 LICENSE-Pork2b2tBot delete mode 100644 TODO diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 2fff9cdc0..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -# These are supported funding model platforms - diff --git a/.github/ISSUE_TEMPLATE/blank_issue.md b/.github/ISSUE_TEMPLATE/blank_issue.md deleted file mode 100644 index a61c4847e..000000000 --- a/.github/ISSUE_TEMPLATE/blank_issue.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -name: Blank Issue -about: Open a new issue ---- diff --git a/.github/ISSUE_TEMPLATE/new_version.md b/.github/ISSUE_TEMPLATE/new_version.md deleted file mode 100644 index 32d21bdd4..000000000 --- a/.github/ISSUE_TEMPLATE/new_version.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -name: New Version -about: Add a new minecraft version to MCD -title: 'Add version: ' ---- - -- [ ] Version folder containing "version.json" created -- [ ] "version.json" filled out appropriately -- [ ] Added version to dataPath.json -- [ ] "version" field of dataPath.json points to new version folder -- [ ] Version added to common/versions.json -- [ ] Version added to ReadMe - -Additional Requirements For This Update: diff --git a/.github/workflows/.keep b/.github/workflows/.keep new file mode 100644 index 000000000..258cd5725 --- /dev/null +++ b/.github/workflows/.keep @@ -0,0 +1 @@ +todo diff --git a/.github/workflows/bedrock-ci.yml b/.github/workflows/bedrock-ci.yml deleted file mode 100644 index beeba374f..000000000 --- a/.github/workflows/bedrock-ci.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: bedrock-ci - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 12 - - steps: - - name: Use Node.js 14.x - uses: actions/setup-node@v1 - with: - node-version: 14.x - - uses: actions/checkout@v2 - with: - repository: PrismarineJS/node-minecraft-data - submodules: recursive - path: node-mcdata - - run: rm -rf minecraft-data - - uses: actions/checkout@v2 - with: - path: node-mcdata/minecraft-data - - uses: actions/checkout@v2 - with: - repository: PrismarineJS/bedrock-protocol - path: bedrock-protocol - - run: ls -R . - - run: | - cd bedrock-protocol - npm uninstall minecraft-data - npm install ../node-mcdata - npm i - cd ../node-mcdata - npm run generate:data - - run: npm test - working-directory: bedrock-protocol diff --git a/.github/workflows/build-gh-pages.yml b/.github/workflows/build-gh-pages.yml deleted file mode 100644 index 03ffeb107..000000000 --- a/.github/workflows/build-gh-pages.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Repository Dispatch -on: - repository_dispatch: - types: [node-mcData-release] -jobs: - myEvent: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - fetch-depth: 0 - ref: web - - name: Use Node.js 14.x - uses: actions/setup-node@v1 - with: - node-version: 14.x - - name: Run tool - run: | - npm install - git config user.name 'rom1504bot' - git config user.email 'rom1504bot@users.noreply.github.com' - npm run gh-publish diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 79da75392..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: CI - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - - steps: - - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - - run: npm install - working-directory: tools/js - - run: npm build - working-directory: tools/js - - run: npm test - working-directory: tools/js diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index 8597f0a2c..000000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: 'tag' -on: - push: - branches: - - master -jobs: - tag: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-ecosystem/action-regex-match@v2 - id: regex-match - with: - text: ${{ github.event.head_commit.message }} - regex: '^Release ([0-9]+\.[0-9]+\.[0-9]+)' - - name: Create Release - if: steps.regex-match.outputs.match != '' - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.regex-match.outputs.group1 }} - release_name: Release ${{ steps.regex-match.outputs.group1 }} - body: ${{ steps.regex-match.outputs.group1 }} - draft: false - prerelease: false - - uses: peter-evans/repository-dispatch@v1 - if: ${{ steps.regex-match.outputs.match != '' }} - with: - token: ${{ secrets.PAT_PASSWORD }} - repository: PrismarineJS/node-minecraft-data - event-type: mcData-release - client-payload: '{"tag": "${{ steps.regex-match.outputs.group1 }}"}' diff --git a/LICENSE b/LICENSE index 2ce24472c..e6d8a27ba 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ Adapted from The MIT License (MIT) -Copyright (c) 2016-$today.year DaPorkchop_ +Copyright 2023 rfresh2 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, @@ -8,7 +8,7 @@ modify, merge, publish, distribute, sublicense, and/or sell copies of the Softwa is furnished to do so, subject to the following conditions: Any persons and/or organizations using this software must include the above copyright notice and this permission notice, -provide sufficient credit to the original authors of the project (IE: DaPorkchop_), as well as provide a link to the original project. +provide sufficient credit to the original authors of the project (IE: rfresh2), as well as provide a link to the original project. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS diff --git a/LICENSE-Pork2b2tBot b/LICENSE-Pork2b2tBot new file mode 100644 index 000000000..ea9ad347c --- /dev/null +++ b/LICENSE-Pork2b2tBot @@ -0,0 +1,16 @@ +Adapted from The MIT License (MIT) + +Copyright 2023 DaPorkchop_ + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, +modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following conditions: + +Any persons and/or organizations using this software must include the above copyright notice and this permission notice, +provide sufficient credit to the original authors of the project (IE: DaPorkchop_), as well as provide a link to the original project. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 48d3e8806..10d691a1a 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # ZenithProxy -Discord Server: ([ZProxy](https://discord.gg/mf9uUvuUCU), [rProxy](https://discord.gg/Gvyb4g6c34)) +Discord Server: [rfresh's dev server](https://discord.gg/nJZrSaRKtb) -Minecraft 1.12.2 proxy/bot. Primarily for use on 2b2t.org. +Minecraft 1.12.2 proxy/bot. Intended for use on 2b2t.org but will work on any server. The primary purpose is to Minecraft accounts always online and be securely shared by multiple people. -This project also provides the data for the [2b2t.vc API](https://api.2b2t.vc) and [Discord Bot](https://bot.2b2t.vc). +This project is also used to support the [2b2t.vc API](https://api.2b2t.vc) and [Discord Bot](https://bot.2b2t.vc). # What is a proxy? @@ -43,22 +43,23 @@ player movements, spectator mode, discord chat relay, and more. * Advanced AntiAFK with pathing and gravity * 2b2t Queue Skip * Reconnects and skips the queue when the proxy is online for 6 hours (2b2t's max connection time) -* AutoUpdater that automatically pulls and restarts the proxy at convenient times +* Modules including AutoEat, AutoDisconnect, AutoReconnect, AutoRespawn, AutoTotem, KillAura, Spammer, AutoReply * Many, many, more features. # Getting Started ## Prerequisites -1. Linux or Windows server. I recommend DigitalOcean `2 GB Memory / 1 AMD vCPU` in the NYC-1 region for +1. Linux or Windows server. I recommend DigitalOcean's `1 GB Memory / 1 vCPU` in the NYC-1 region for minimal ping to 2b2t. 2b2t allows a maximum of 3 accounts concurrently connected per IP address. -2. JDK17 and git installed. - * JDK17's path must be set on the JAVA_HOME environment variable or create a gradle.properties file with `org.gradle.java.home=/path/to/jdk17` + [Free DigitalOcean $200 credit for new accounts](https://m.do.co/c/3a3a226e4936). +2. JDK17+ and git installed. + * JDK17+'s path must be set on the JAVA_HOME environment variable or create a gradle.properties file with `org.gradle.java.home=/path/to/jdk17` ## Setup 1. `git clone git@github.com:rfresh2/ZenithProxy.git` -2. Execute in CLI: `./start.sh` (Linux) or `./start.bat` (Windows). Close the instance with `CTRL-C`. +2. Execute in CLI: `./start.sh` (Linux) or `.\start.bat` (Windows). Close the instance with `CTRL-C`. 3. Edit `config.json`. Important sections: * `authentication` -> Input your Minecraft account details * You must disable 2FA on your Microsoft account and may need to approve the proxy's @@ -81,9 +82,9 @@ player movements, spectator mode, discord chat relay, and more. ## Run -* `./start.sh` (Linux) or `./start.bat` (Windows) or `./gradlew run` (Universal) -* Type `help` in your terminal to get a list of available commands. +* `./start.sh` (Linux) or `.\start.bat` (Windows) or `./gradlew run` (Universal) * The discord prefix is `.` by default. e.g. `.connect` or `.disconnect`. +* Type `.help` in discord or `help` in the terminal to get a list of available commands. # Developers diff --git a/TODO b/TODO deleted file mode 100644 index 0d4d992b3..000000000 --- a/TODO +++ /dev/null @@ -1,10 +0,0 @@ -TODO: - - -- antiafk that pauses after alot of lagbacks (illegal movement) -- have the proxy passively track 2b2t's antiafk pulses and handles modules accordingly to fulfill at least 1 pulse per 20 mins (additionally notifies the player or account owner on discord if they haven't pulsed for a certain time and when they will get kicked) - -autoreply: - -spectator: -- etoggle for players \ No newline at end of file diff --git a/src/main/java/com/zenith/util/Config.java b/src/main/java/com/zenith/util/Config.java index 600979057..d3bea8241 100644 --- a/src/main/java/com/zenith/util/Config.java +++ b/src/main/java/com/zenith/util/Config.java @@ -37,8 +37,7 @@ public enum AccountType { public static final class Client { public Extra extra = new Extra(); public Server server = new Server(); - // auto-connect proxy on process start - public boolean autoConnect = false; + public boolean autoConnect = false; // auto-connect proxy on process start public static final class Extra { public AntiAFK antiafk = new AntiAFK(); @@ -205,9 +204,9 @@ public static final class Spammer { public long delayTicks = 200; public boolean randomOrder = false; public List messages = asList( - "/stats", - "/stats", - "/stats" + "ZenithProxy on top!", + "I just skipped queue thanks to ZenithProxy!", + "I love undertimer slopper!" ); } @@ -318,10 +317,9 @@ public static final class Discord { public String visualRangeMentionRoleId = ""; public String prefix = "."; public boolean reportCoords = false; - // internal use for update command state persistence public boolean mentionRoleOnPrioUpdate = true; public boolean mentionRoleOnPrioBanUpdate = true; - public boolean isUpdating = false; + public boolean isUpdating = false; // internal use for update command state persistence public QueueWarning queueWarning = new QueueWarning(); public ChatRelay chatRelay = new ChatRelay();