Coder Social home page Coder Social logo

qumecs / 2bored2wait Goto Github PK

View Code? Open in Web Editor NEW

This project forked from themoonisacheese/2bored2wait

0.0 0.0 0.0 315 KB

A proxy to wait out 2b2t.org's way too long queue. Includes a small webserver and a REST-like API for external control

License: GNU General Public License v3.0

CSS 2.35% HTML 13.76% JavaScript 82.82% Dockerfile 0.88% Shell 0.20%

2bored2wait's Introduction

Contributors Forks Stargazers Issues Donate


Logo

2bored2wait

A proxy to wait out 2b2t.org's way too long queue. Includes a small webserver a REST-like API for external control

Report Bug | Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. How to use
  4. Configuration
  5. Roadmap and known issues
  6. Contributing
  7. License
  8. Testing

About The Project

A proxy to wait out 2b2t.org's way too long queue.
Please Note that because of security reasons this tool doesn't auto-update! Also 2b2w does not show ETA from 2b2t.
The ETA is calculated based on position in the queue. This results in better ETA most of the time.

Built With

  • node.js
  • npm
  • HTML

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

Please optain all required items

Installation

x86 and x64 (most home computers):

  1. Read the code to ensure I'm not stealing your credentials. I'm not, but you shouldn't take my word for it. If you don't know how to read it, downloading stuff off the internet and giving it your password is probably a bad idea anyway.
  2. Download the executable here
  3. (Optional) Take a look at config/default.json, edit your values and place the config under ${USER}/.2bored2wait/config/local.json

Other Platforms (including ARM / Raspberry Pi):

  1. Download and install node.js version 14 or above and git. You need git even if you download the repository as zip because it is to install the dependencies via npm.
  2. Open a terminal then clone this repo then cd into folder:
 git clone https://github.com/themoonisacheese/2bored2wait
 cd 2bored2wait
  1. Run npm install to install te required libraries
  2. Start the program with npm start.

Docker

  1. Read the code to ensure I'm not stealing your credentials. I'm not, but you shouldn't take my word for it. If you don't know how to read it, downloading stuff off the internet and giving it your password is probably a bad idea anyway.
  2. docker run -d -p 80:8080 -p 25565:25565 -e NODE_CONFIG='{"username":"[email protected]","mcPassword":"password","updatemessage":"n","BotToken":""}' 2bored2wait/2bored2wait:latest. The docker image is automatically up to date after each push to this repo. Docker images are available for amd64 and arm64 among other platforms.
  3. Open a browser and navigate to http://localhost
  4. Press the "Start queuing" button. The queue position indicator auto-updates, but sometimes it takes a while to start counting (like 1 min).
  5. Once the queue reaches a low number, connect to the Minecraft server at address localhost.
  6. After you log off, click the "stop queuing" button. This is really important, as you will not actually disconnect from 2b2t until you do that.

If you want to change the configuration or you don't want your credentials in the bash history you will have to mount config/local.json manually.

Configuration

  • You can change all credentials and whether you want update messages by simply editing the values in local.js or deleting that file.

How to use

  1. Read the code to ensure I'm not stealing your credentials. I'm not, but you shouldn't take my word for it. If you don't know how to read it, downloading stuff off the internet and giving it your password is probably a bad idea anyway.
  2. Run npm start
  3. It will now ask for your Minecraft email and password (or permission to use saved launcher data instead). If you want update messages then you need to type Y otherwise N. If you are using the discord bot you need to add your token. Then answer Y or N if you want to save your Minecraft credentials. If you answer N you will need to re-enter your Minecraft login information into the console each time you start the program.
  4. Refer to Commands on how to use 2b2w from the console. Otherwise keep on reading for the web interface.
  5. Now open a browser and navigate to http://localhost: your web port here (default 80).
  6. Press the "Start queuing" button. The queue position indicator auto-updates, but sometimes it takes a while to start counting (like 1 min).
  7. Once the queue reaches a low number, connect to the Minecraft server at address localhost.
  8. After you log off, click the "stop queuing" button. This is really important, as you will not actually disconnect from 2b2t until you do that.

Commands

All commands can be used through discord or simply typed in the console window.

  • start will start the queue. It takes between 15-30 seconds for the bot to update with the queue position.
  • start 14:00 will start at 2pm.
  • play 8:00 will try to calculate the right time to join so you can play at 8:00
  • update will send an update to the current channel with your position and ETA.
  • stop will stop the queue.

Roadmap and known issues

See the open issues for a list of proposed features (and known issues).

  • Starting the queue will revoke your Minecraft token. this means that you will not be able to join normal Minecraft servers until you restart the game
  • If you connect after the queue is finished or reconnect the proxy will send cached data. Otherwise you would fly in an empty world. However not all data will be resend. You can move out of render distance (I find going through a nether portal works best) and return to fix this issue. Sometimes the client renders a cached chunk with a blank texture.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GPL-3.0 License. See this for more information.

Testing

  • Run npm test to run test.js

2bored2wait's People

Contributors

averagecomet250 avatar dependabot[bot] avatar dsetareh avatar edofullin avatar elisaado avatar etiaro avatar filipton avatar francescozucca avatar furriousfox avatar gislinielsen avatar hari01584 avatar hazzal avatar martindevelopment avatar moondarker avatar mrgeorgen avatar nanospearing avatar nullenvk avatar polyfish0 avatar qualk avatar rekonnected avatar rob9315 avatar rolkoztm avatar themoonisacheese avatar whodiduexpect avatar wylie39 avatar xhendrikg avatar zax2002 avatar zillyhuhn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.