Hey there, you've found one of the projects I've been doing for fun! Not much to see here yet as I'm still working on the more intricate parts of this system. This little past-time project I've taken up is here to help Java beginners figure out how to start using Spigot, and give them some utils that can make your life easier.
If I ever end up completing this project, I'll put a Maven import tutorial here so you can clone this repo for yourself, use the api and maybe get a head start on making your own minigames to show off!
This mini project is for reference only, this project has not been developed to be put to use in a production environment.
Proper, well-made Game Loaders are custom-made for servers, by developers who have catered the resources, style, paradigm, configuration and features all to their specific server and loader. This game loader has been created independently, and cannot interact with outside elements without that functionality being deliberately added through modification of the plugin. Some correct uses of this projects source are:
- Taking code for your own projects
- Loading on development servers to make small mini-games for your friends OR show off to potential employers
- Learning from the way code here is set out and how you can improve your own
If you are looking for a loader that can cater to players on your network, please reach out to a qualified developer on SpigotMC or another source who will be able to advise and help you on creating a loader and games that best suit you and your servers needs.
I will not provide any support for 'incorrect' uses of this projects code
- Installing a game You can do this either by loading the game from inside the API by extending the Game abstract class, or by putting an independent jar into the plugins 'games' directory.
- Installing a map You can do this by loading a game on the server, a data folder for the game will be created in the 'games' folder with a 'maps' folder inside, your map goes in there. The game will add a map.yml
- Setting spawn locations
Edit the map.yml and add spawns in the format
locations.spawn.teamname.spawnname.x/y/z
, neutral team is teamless Example:
locations:
spawn:
neutral:
a:
x: 0.5
y: 64
z: 0.5
b:
x: 10.5
y: 64
z: -10.5
- Maven (Maven 3)
- Spigot BuildTools 1.8.8
- Git (Obviously)
Whilst I don't really recommend you try installing this yet, since I'm still actively working on it, I'm not going to stop you, but at least let me help you do it right haha.
- Git clone this repository using
git clone https://github.com/MachoPiggies/Minecraft-Minigame-Loader.git
or the CLI if you're weird - Open the repository preferably in Intellij, IntelliJ should automatically load the Maven project, if it doesn't a message with the button "Load Maven Build" will appear in the bottom right
- Once Maven has built successfully, go to the Maven tab on the far right, find 'game-loader', open 'Lifecycle' under it and click 'install', if you can't find it, run
maven clean install
- This will install this repository into your m2 folder since I don't have my own Nexus repository
- Once this is done, you should see some of the errors start clearing up. Go to the pom.xml of gameloader, any red dependencies means that they haven't installed properly, send me a DM if this is happening and I can help
- Once you want to export the plugin, go to the same UI where you installed the loader, but go to 'game-loader-plugin' instead and hit 'package'
- Once you've done that, your plugin jar should appear in the 'target' file inside the game loader plugin folder
- To require the API with or without the plugin to use in your own games, follow steps 1-5
- After that, you can add the API as a normal Maven dependency
- The API MUST be shaded if the game loader plugin is not in your server
<dependency>
<groupId>com.machopiggies</groupId>
<artifactId>game-loader-api</artifactId>
<version>0.0.1</version>
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>com.machopiggies:game-loader-api</include>
</includes>
</artifactSet>
<minimizeJar>true</minimizeJar>
<filters>
<filter>
<artifact>com.machopiggies:game-loader-api</artifact>
<includes>
<include>com/machopiggies/gameloaderapi/**</include>
</includes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>