-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ashcon Partovi <ashcon@partovi.net>
- Loading branch information
0 parents
commit d69d7c7
Showing
838 changed files
with
72,932 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# List of Github usernames that must approve pull requests. | ||
# https://help.github.com/articles/about-codeowners/ | ||
|
||
* @Electroid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: build | ||
on: | ||
push: | ||
paths: | ||
- src/ | ||
- pom.xml | ||
pull_request: | ||
paths: | ||
- src/ | ||
- pom.xml | ||
schedule: | ||
- cron: 0 1 * * * | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v1 | ||
- name: setup | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 1.8 | ||
- name: install | ||
if: github.ref == 'refs/heads/master' | ||
run: mvn -U deploy -s settings.xml | ||
env: | ||
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
- name: version | ||
run: | | ||
mvn versions:set \ | ||
-DnewVersion=1.8-SNAPSHOT-${GITHUB_SHA::8} | ||
- name: install | ||
if: github.ref != 'refs/heads/master' | ||
run: mvn -U install | ||
- name: deploy | ||
if: success() && github.ref == 'refs/heads/master' | ||
run: | | ||
mvn compile jib:build \ | ||
-Djib.to.auth.username=${{ secrets.DOCKER_USERNAME }} \ | ||
-Djib.to.auth.password=${{ secrets.DOCKER_PASSWORD }} \ | ||
-Djib.to.image=${{ secrets.DOCKER_IMAGE }} \ | ||
-Djib.to.tags=latest,$(date +%F) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Maven generated files | ||
target | ||
*.jar | ||
dependency-reduced-pom.xml | ||
|
||
# Mac OSX generated files | ||
.DS_Store | ||
|
||
# Eclipse generated files | ||
.classpath | ||
.project | ||
.settings | ||
|
||
# IntelliJ IDEA | ||
.idea | ||
*.iml | ||
|
||
# Vim generated files | ||
*~ | ||
*.swp | ||
|
||
# XCode 3 and 4 generated files | ||
*.mode1 | ||
*.mode1v3 | ||
*.mode2v3 | ||
*.perspective | ||
*.perspectivev3 | ||
*.pbxuser | ||
*.xcworkspace | ||
xcuserdata | ||
*class | ||
|
||
# CrowdIn files | ||
Commons/core/src/main/i18n/translations/* | ||
|
||
# Minecraft generated files | ||
/server/ | ||
maps.zip |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
PGM | ||
=== | ||
|
||
The original PvP Game Manager for Minecraft. | ||
|
||
Overview | ||
-------- | ||
|
||
Back in 2011, a Minecraft map creator named dewtroid released a PvP map called [Airship Battle.](https://www.youtube.com/watch?v=3dLo8ytygWs) At the time, there were no comprehensive Bukkit plugins to manage PvP matches, so everything was done manually. Then, a young developer named [Apple](https://github.com/tonybruess) came along and created the first version of "PGM" (also known as **P**vP **G**ame **M**anager) to automate the process of playing PvP matches. Later, he would establish the popular Minecraft server network, `Overcast Network` (also know as `oc.tc`). After the network went through a cycle of hyper-growth, stabilization, and eventual closure in 2016, its [plugins](https://github.com/OvercastNetwork/ProjectAres) were open sourced for the community to enjoy. | ||
|
||
This project is an earlier fork of those plugins with three major changes: 1) using [Minecraft 1.8](https://github.com/Electroid/SportPaper), the biggest ask by the community, 2) no backend, website, or API to make server hosting more cost effective, and 3) no dependency injection to make contributing more accesible. | ||
|
||
Documents | ||
--------- | ||
|
||
1. [`LICENSE`](LICENSE) - any forks or modifications to this project must be kept public. | ||
2. [`CODE_OF_CONDUCT`](docs/CODE_OF_CONDUCT.md) - guidelines that contributors and server owners must agree to. | ||
3. [`RUNNING`](docs/RUNNING.md) - how to host and run a PGM server. | ||
4. [`CONTRIBUTING`](docs/CONTRIBUTING.md) - how to build, compile, and submit changes to the project. | ||
|
||
|
||
Governance | ||
---------- | ||
|
||
The lead maintainer of this project is [Electroid](https://github.com/Electroid), a former administrator and software developer at `oc.tc`. As the project grows, we'll scale the governance model to meet those needs. If you're interested in donating to the project or running PGM commercially, contact him for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to make participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, sex characteristics, gender identity and expression, | ||
level of experience, education, socio-economic status, nationality, personal | ||
appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces **and community servers**, and it also applies when | ||
an individual is representing the project or its community in public spaces. | ||
Examples of representing a project or community include using an official | ||
project e-mail address, posting via an official social media account, or acting | ||
as an appointed representative at an online or offline event. Representation of | ||
a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the [project lead](https://github.com/Electroid). All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Contributing | ||
=========== | ||
|
||
We're really excited to have you join the community of contributors for the PGM project! Before we jump into the nitty-gritty details, let's go over the design choices and philisophy of the project so we're all on the same page. | ||
|
||
Philosophy | ||
---------- | ||
|
||
1. [**Simplicity**](https://thevaluable.dev/kiss-principle-explained/) | ||
|
||
The most important principle is maintaing simplicity, both for contributors and players. When thinking about your changes, make sure your code is easy to comprehend, not overly complex or abstracted, and doesn't include unnecessary third-party libraries. If your changes affect gameplay, make sure players can easily adapt to them. | ||
|
||
2. [**Collaboration**](https://deepsource.io/blog/code-review-best-practices/) | ||
|
||
You can save a good amount of time during code review if you share your ideas and gameplan *before* writing any code. We encourage submitting [draft](https://github.blog/2019-02-14-introducing-draft-pull-requests/) pull requests, even if your code doesn't compile or work, to get feedback on the design of your changes. Break up your changes into smaller, incremental pull requests with a "soft" max of 200 lines changed. | ||
|
||
3. [**Out-of-the-box**](https://www.smithsonianmag.com/arts-culture/how-steve-jobs-love-of-simplicity-fueled-a-design-revolution-23868877/) | ||
|
||
Players, contributors, and server owners should be able to enjoy PGM "out-of-the-box" without any extra plugins or requirments. No website, database, or external API should be required to run a server on your local machine. | ||
|
||
Dependencies | ||
------------ | ||
You'll need to make sure your machine has the following dependencies before compiling PGM. The instructions will vary by operation system, so click on each link to read the detailed steps. | ||
|
||
* [Java 8](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html) - the Java Virtual Machine required to run the Minecraft server and PGM plugin. | ||
* [Maven](https://maven.apache.org/install.html) - a compilation tool to bundle all the Java dependencies into `.jar` file | ||
* [Docker](https://docs.docker.com/v17.09/engine/installation/) *(optional)* - a container tool to quickly and easily run your changes. | ||
|
||
Steps | ||
--------- | ||
|
||
1. Clone the repository on your machine. | ||
|
||
```bash | ||
git clone git@github.com:Electroid/PGM.git | ||
``` | ||
|
||
2. Make your changes (leauge system, anyone?) | ||
|
||
3. Run the code formatter, we follow Google's [code style.](https://google.github.io/styleguide/javaguide.html) | ||
|
||
```bash | ||
mvn com.coveo:fmt-maven-plugin:format | ||
``` | ||
|
||
4. Use one of two options to compile a new version with your changes. | ||
```bash | ||
mvn clean install # creates .jar in target/ which you would copy to your plugins folder | ||
mvn clean compile jib:dockerBuild # builds a Docker container named "pgm" which is a full server | ||
``` | ||
|
||
5. Commit your changes, using the `-s` tag to [certify](https://developercertificate.org) the origin of your code. | ||
```bash | ||
git commit -s -m "A short description of your changes" | ||
``` | ||
|
||
6. Submit your pull request for review and feedback. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Running a Server | ||
================ | ||
|
||
Now that you've read about the project, it's time to set up a server to play with your friends! We'll walk through the "traditional" way of running a PGM server, similar to how you would run a Bukkit server. If you want to learn more about running servers, please see some additional documentation [here.](https://bukkit.gamepedia.com/Setting_up_a_server) | ||
|
||
Installation | ||
------------ | ||
|
||
1. Select the folder where you want to store your server files. | ||
```bash | ||
cd /path/to/folder | ||
``` | ||
|
||
2. Download the latest version of [SportPaper](https://github.com/Electroid/SportPaper), a fork of the Minecraft 1.8 server. | ||
```bash | ||
curl https://pkg.ashcon.app/sportpaper -o sportpaper.jar | ||
curl https://pkg.ashcon.app/sportpaper-config -o sportpaper.yml | ||
``` | ||
|
||
3. Create a plugins folder and download the latest version of PGM. | ||
```bash | ||
mkdir plugins | ||
curl https://pkg.ashcon.app/pgm -o plugins/pgm.jar | ||
``` | ||
|
||
4. Add your maps to the maps folder, if you don't have any, skip this step. | ||
```bash | ||
cp -r /path/to/map-0/ plugins/PGM/maps/map-0 | ||
``` | ||
|
||
5. Run the server and enjoy playing PvP games with your friends! | ||
```bash | ||
java -jar sportpaper.jar nogui | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0"?> | ||
<map proto="1.0.0"> | ||
<name>Airship Battle</name> | ||
<version>1.0.4</version> | ||
<objective>Leak lava from the enemy's obsidian core into the void.</objective> | ||
<authors> | ||
<author uuid="30e27366-0b14-4076-8f55-0819ece49ce3">dewtroid</author> | ||
</authors> | ||
<filters> | ||
<filter name="deny-dispenser"> | ||
<not> | ||
<block>dispenser</block> | ||
</not> | ||
</filter> | ||
<filter name="deny-obsidian"> | ||
<not> | ||
<block>obsidian</block> | ||
</not> | ||
</filter> | ||
</filters> | ||
<teams> | ||
<team color="blue" max="50">Blue Team</team> | ||
<team color="dark red" max="50">Red Team</team> | ||
</teams> | ||
<regions> | ||
<apply block-place="deny-dispenser" message="Dispensers are disabled on this map!"> | ||
<rectangle min="-oo,-oo" max="oo,oo"/> | ||
</apply> | ||
<apply leave="deny-all" message="Don't exit the playing field!"> | ||
<rectangle min="-102,-4" max="102,125"/> <!-- Main area --> | ||
<rectangle min="-36,-16" max="13,-2"/> <!-- Area between spawn tunnels --> | ||
</apply> | ||
<apply block="deny-all" message="Don't edit blocks outside the playing field!"> | ||
<negative> | ||
<union name="map"> | ||
<rectangle min="-100,-2" max="100,123"/> <!-- Main area --> | ||
<rectangle min="-36,-14" max="13,-2"/> <!-- Area between spawn tunnels --> | ||
</union> | ||
</negative> | ||
</apply> | ||
<apply block-break="deny-obsidian" message="You may not break obsidian outside the core area!"> | ||
<complement> | ||
<region name="map"/> | ||
<cuboid min="13,85,23" max="18,92,30"/> | ||
<cuboid min="-41,85,23" max="-36,92,30"/> | ||
</complement> | ||
</apply> | ||
</regions> | ||
<itemremove> | ||
<item>shears</item> | ||
<item>obsidian</item> | ||
<item>gold block</item> | ||
<item>dispenser</item> | ||
</itemremove> | ||
<spawns> | ||
<spawn team="blue" yaw="270"> | ||
<cuboid min="4.5,91,-34" max="7.5,91,-31"/> | ||
</spawn> | ||
<spawn team="red" yaw="90"> | ||
<cuboid min="-30.5,91,-34" max="-27.5,91,-31"/> | ||
</spawn> | ||
<default yaw="180"> | ||
<cylinder base="-11.5,90,-33" radius="3" height="0"/> | ||
</default> | ||
</spawns> | ||
<cores material="obsidian" leak="10"> | ||
<core team="blue"> | ||
<cuboid min="13,85,23" max="18,92,30"/> | ||
</core> | ||
<core team="red"> | ||
<cuboid min="-41,85,23" max="-36,92,30"/> | ||
</core> | ||
</cores> | ||
<maxbuildheight>125</maxbuildheight> | ||
</map> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.