Skip to content

Instantly share code, notes, and snippets.

@roxandtol
Last active November 20, 2023 18:04
Show Gist options
  • Save roxandtol/3db6ba2bcfb504f294d9c7bc9858aedd to your computer and use it in GitHub Desktop.
Save roxandtol/3db6ba2bcfb504f294d9c7bc9858aedd to your computer and use it in GitHub Desktop.
Installing & Setting up Cinema Mod

Requirements (Client side)

Requirements (Server Side)


Step 1: Create the server

This should be pretty straight foward, just download the paper jar from their website, create a start script, and add all plugins (except CinemaMod if you want to build it from source)

Step 2: Build the CinemaMod plugin from source

THIS STEP IS NO LONGER NEEDED, SINCE IT'S UP TO DATE, BUT IF YOU STILL WANT TO FOR ANY REASON, FOLLOW THIS THIS STEP

You'll want to have git and maven installed in your computer for this.

  1. Open the terminal and run git clone https://github.com/CinemaMod/CinemaMod
  2. Go into the bukkit folder (cd CinemaMod\bukkit if you're on Windows, cd CinemaMod/bukkit if you're on Linux or MacOS)
  3. Build the plugin with maven by running mvn clean install
  4. You'll have a folder in the bukkit folder called target. Open it and you'll see the CinemaMod plugin jar, move it into the plugins folder

Step 3: Create the world

For this, you just need to start the server, accept the EULA and wait. Then you can put an already made world or just use the vanilla world. You'll want to know the coords of the screens. I recommend making the screens have a ratio of 16:9 (16 blocks lenght, 9 blocks height), so most videos will work with no issues. You can also make a preview screen, and the recommended size for it is 3 * 2. Screen

Step 4: Setting up the WorldGuard regions

After setting up the theatre, you'll want to grab a WorldEdit want (wooden axe), and select 2 corners that cover the entire theatre Region selection

and then create a region with the command /rg define (region name), I recommend putting the area of the theatre + theatre as the region name, so for example, if it's in a cave, use cave_theatre
as the region name and etcetera. This will determine who can hear and see the screen (within restrictions). If you don’t create a region, CinemaMod will auto-generate a temporary 200x200x64 region around the screen, as long you have that enabled in config.yml, which is probably a bit too big for you.

The region isn’t the only deciding factor, in the current version, if you go out of a 64 block
radius of the screen location, the video stops rendering but audio still plays. Make sure to keep
your theater under a 64 block radius from the upper left corner of the screen.

Step 5: Getting theater info

We need to get some info about the theatre before we can plug it into the config file, these thing are:

  • Coordinates of the upper left corner of your screen
  • Direction your screen will be facing
  • Width and height of your screen
  • World the screen is in (by default, this is world)

Finding coordinates of screen

You can just use WorldEdit for this, just put a block in your top left corner, and left click it with the wand, you'll see a message with the coords of the block Top Left Top left corner WE

Getting the direction of the screen

To figure out the direction, look at the screen, as if you were watching it, then turn around backwards, open you F3 menu and look for Facing Direction

Then, you'll want to mark down the opposite direction (In this example, I have east, so I would put west), Input this in all capital letters

Finding Width and Height of screen

We'll also use WorldEdit for this, since it's the easiest. Just put 3 blocks in each of the corners. Screen Corners

Measure the distance between A and B, that will be your lenght, lenght

and measure the distance between B and C, that will be your height. height

Finding world of the screen

Unless you're running Multiverse Core 2, this should be world, although if you're in the nether or end, it will be world_nether and world_the_end respectively

Step 6: Changing the configuration

Setting up YouTube support:

If you want to play YouTube videos with CinemaMod, you'll need to get an API key. You can do that by:

  1. Going into the Google Cloud page for the API Enable API

  2. Click on Credentials Credentials menu

  3. Click on Create Credentials and then API Key . Cloud credentials

After getting the API key, we need to input it in the config.yml of the plugin, where it says youtube-data-api-key:, it should be around the top.

Setting up the theatres:

After getting all the info in Step 5, we can just drop the dimensions and everything about the theatre in the config file, and change the name if you want. This would be the example config following the the examples in the screenshots Theatre config

And with that, you've finished! All that's left to do is restart the server, and that's it! Bad Apple

The supported services are YouTube videos/streams, Twitch streams, and direct links to videos(E.G https://www.example.com/videos/test.mp4)

NOTE: If you are going to self-host videos, you must have SSL (https) certified link, and a publicly accessible server
NOTE: if you join in a theater region while a video is playing, it may not play for you. To fix this just leave the theater region and walk back in. NOTE: CinemaMod will go through a rewrite soon that will make so you don't need ffmpeg installed on the machine to run local videos, but as of right now, you will need it


Commands:

  • /request (url)
    • Requests a video to be added to the queue
  • /forceskip
    • Force skips a video
  • /voteskip
    • Votes to skip a video
  • /lockqueue
    • Locks queue
  • /volume
    • Opens volume GUI. You can change volume, playback resolution and a few other mod options Mod settings
  • /playing
    • Shows currently playing video URL
  • /history
    • Show your video request history

If you need support, join the CinemaMod discord server! Several members of the community will be more than happy to help you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment