TheCosmic04 / Minecraft-Screen

A minecraft plugin that allows to share your screen in minecraft.
7 stars 3 forks source link

MinecraftScreens

A 1.15.2 minecraft plugin that allows to share your screen in minecraft. (this plugin was inspired by Fundy's video I made minecraft in minecraft)

Requirements to screen share:

Client setup:

  1. You will need to install node js.
  2. download the node js client.
  3. open a cmd in the folder and execute this command npm i jimp then npm i robotjs (Note: if there are some errors while installing robotjs try start a cmd as administrator and use npm install --global windows-build-tools).

To start the client now use node client.js

Usage:

  1. First you have to install the plugin in the server by putting it in your server plugin folder.
  2. Create a screen using the command /screen create [width] <height> (if the height is not provided the server will automaticly generate it based on the given width).
  3. Once the screen was created it will give a token (if the token wasnt given you can get it with /screen info all), you can click on the token to copy it.
  4. Now follow the instructions to setup the client.
  5. Once you have the token and have the client setup start the nodejs client using in a cmd inside the folder node client.js.
  6. The client will ask you the ip of the server, if the server is not on localhost type the server ip, then it will ask the port where the plugin server is opened (default: 1234) if the port was changed type the custom port, then fianlly it will ask you the screen token.
  7. If everything was sucessfull the client will say the screen size in console and start sharing the screen, if it wasnt sucessfull because the token is invalid or the screen is already begin used it will ask the screen token again.

Note: Currently screens dont persist between restarts! after a server restart you will need to recreate the screen as all old ones wont work anymore.

Command usage:

Edit and build:

Dipendencies: spigot 1.15.2

Intellij:

  1. create a new java project.
  2. download spigot build tools and use the command java -jar BuildTools.jar --rev 1.15.2 to generate the library.
  3. go in File > Project Structure > Modules > Dipendencies and press the + button on the left, select jars and add the jar file generated with the build tools.
  4. download the plugin src.
  5. put all the files in the src folder isnide your project.
  6. edit the code
  7. after editing the code to build it go in File > Project Structure > Artifacts press the + button at the top, select JAR > from module with dependencies (Leave default options), then to build go to Build > Build Artifacts > Build.

Client configs:

To edit the configs go to the config.json file and edit the json fields. (Note: if a field is invalid the default value will be choosen).

Planed features: