Skip to content

Commit

Permalink
blindly pull from Eredrim
Browse files Browse the repository at this point in the history
what could possibly go wrong?
  • Loading branch information
slipcor authored May 12, 2021
2 parents 9b74b0e + 4f48b14 commit 484bcd5
Show file tree
Hide file tree
Showing 219 changed files with 8,880 additions and 7,150 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Maven deploy release
on:
release:
types:
- published

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Maven settings
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: eredrim
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Deploy the package
run: mvn --batch-mode deploy -DaltDeploymentRepository="eredrim::default::https://repo.eredrim.fr/repository/maven-releases/"
env:
MAVEN_USERNAME: ${{ secrets.MVN_USER }}
MAVEN_PASSWORD: ${{ secrets.MVN_PASSWORD }}
55 changes: 55 additions & 0 deletions .github/workflows/deploy-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Maven deploy snapshot
on:
push:
branches:
- master

jobs:
deploy:
if: "!contains(github.event.head_commit.message, '[release]') && !contains(github.event.head_commit.message, '[doc]')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Maven settings
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: eredrim
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Get project version number
run: |
mvn_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "mvn_version=${mvn_version}" >> $GITHUB_ENV
- name: Check if version already exists on repository
run: |
http_code=$(curl -s -o /dev/null -w "%{http_code}" https://repo.eredrim.fr/repository/maven-snapshots/net/slipcor/pvparena/${{ env.mvn_version }}/maven-metadata.xml)
echo "version_http_code=${http_code}" >> $GITHUB_ENV
- name: Calculate build version with metadata
if: ${{ env.version_http_code == 200 }}
run: |
curl https://repo.eredrim.fr/repository/maven-snapshots/net/slipcor/pvparena/${{ env.mvn_version }}/maven-metadata.xml -o metadata.xml
build_number=$(grep -oP '(?<=buildNumber>)[^<]+' "metadata.xml")
echo "build_version=$((build_number + 1))" >> $GITHUB_ENV
- name: Generate a new build version
if: ${{ env.version_http_code != 200 }}
run: echo "build_version=1" >> $GITHUB_ENV

- name: Deploy the package
run: mvn --batch-mode deploy -DbuildVersion=-b${{ env.build_version }} -DaltDeploymentRepository="eredrim::default::https://repo.eredrim.fr/repository/maven-snapshots/"
env:
MAVEN_USERNAME: ${{ secrets.MVN_USER }}
MAVEN_PASSWORD: ${{ secrets.MVN_PASSWORD }}

- name: Post discord notification
run: |
commits=`echo "${{ join(github.event.commits.*.message, '\n - ') }}" | tr '\n' ' '`
avatar_url=https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
bot_username="Build notification"
payload_json='{ "username": "'$bot_username'", "avatar_url": "'$avatar_url'", "content": "A new dev build of PVP arena is available! Download it by saving the attached file.", "embeds": [{"description": ":spiral_note_pad: **New commits:**\n\n - '$commits'"}] }'
curl -X POST ${{ secrets.DISCORD_WEBHOOK_URL }} -F payload_json="${payload_json}"
curl -X POST ${{ secrets.DISCORD_WEBHOOK_URL }} -F username="${bot_username}" -F avatar_url="${avatar_url}" -F file=@target/pvparena-${{ env.mvn_version }}-b${{ env.build_version }}.jar
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

# Maven
target/
dependency-reduced-pom.xml


/bin/
Expand Down
347 changes: 0 additions & 347 deletions doc/changelog.md

This file was deleted.

87 changes: 47 additions & 40 deletions doc/commands.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,78 @@
*Note that `/pvparena` and `/pa` are the same. Furthermore, those commands only work as-is if you have only one arena, OR entered edit mode with an arena if you have more than one arena:
`/pa [arenaname] edit`*
# Command list

## Command list
Click on a command to get its syntax, usage examples and more information about its working. Commands `/pvparena` and
`/pa` are the same.

Click on a command to view more information about it.
> 🚩 **Note:**
> You always have to precise your arena name in commands (like `/pa myArena enable`) except for these cases:
> - For global admin commands
> - After you joined an arena
> - When you're editing an arena (see [`/pa edit`](commands/edit.md) command)
> - When you have only one arena
### Global Admin Commands
_(Permission: pvparena.admin)_
<br>

## Global Admin Commands

> ℹ Permission: pvparena.admin
Command | Shorthand | Definition
------------- | ------------- | -------------
[/pa debug](commands/debug.md) | /pa !d | Debugs nodes
[/pa debug](commands/debug.md) | /pa !d | Debug nodes
[/pa modules](commands/modules.md) | /pa !mi | Manage modules
[/pa reload](commands/reload.md) | /pa !r | Reload arena configs
[/pa install](commands/install.md) | /pa !i | Installs a module
[/pa uninstall](commands/uninstall.md) | /pa !ui | Uninstalls a module
[/pa update](commands/update.md) | /pa !u | Updates a module

### Arena Administration Commands
## Arena Administration Commands

_(Permission: pvparena.admin OR ownership AND pvparena.create)_
> Permission: pvparena.admin OR both ownership and pvparena.create
Command | Shorthand | Definition
------------- | ------------- | -------------
[/pa blacklist \(or whitelist\)](commands/blacklist.md) | /pa !bl (!wl) | Manage arena blacklists or whitelists
[/pa check](commands/check.md) | /pa !ch | Checks an arena configuration
[/pa blacklist](commands/blacklist.md) | /pa !bl | Manage arena blacklists
[/pa check](commands/check.md) | /pa !ch | Check an arena configuration
[/pa class](commands/class.md) | /pa !cl | Manage arena classes
[/pa classchest](commands/classchest.md) | /pa !cc | Manage arena class chests
[/pa create](commands/create.md) | /pa !c | Creates an arena
[/pa disable](commands/disable.md) | /pa !dis | Disables an arena.
/pa edit | /pa !e | Toggles editing of an arena
[/pa enable](commands/enable.md) | /pa !en | Enables an arena.
[/pa forcewin](commands/forcewin.md) | /pa !fw | Forces a player/team to win.
[/pa create](commands/create.md) | /pa !c | Create an arena
[/pa disable](commands/disable.md) | /pa !dis | Disable an arena.
[/pa edit](commands/edit.md) | /pa !e | Toggle editing of an arena
[/pa enable](commands/enable.md) | /pa !en | Enable an arena.
[/pa forcewin](commands/forcewin.md) | /pa !fw | Force a player/team to win.
[/pa gamemode](commands/gamemode.md) | /pa !gm | Change the general gamemode of an arena
[/pa goal](commands/goal.md) | /pa !g | Manage arena goals
[/pa playerjoin](commands/playerjoin.md) | /pa !pj | Make a player join
[/pa protection](commands/protection.md) | /pa !p | Manages arena protections
[/pa region](commands/region.md) | /pa !rg | Manages arena regions
[/pa regionclear](commands/regionclear.md) | /pa !rc | Manages arena region clearing exceptions
[/pa regionflags](commands/regionflags.md) | /pa !rf | Manages arena flags
[/pa regiontype](commands/regiontype.md) | /pa !rt | Changes a region type
[/pa regions](commands/regions.md) | /pa !rs | Debugs regions | ^
[/pa protection](commands/protection.md) | /pa !p | Manage arena protections
[/pa region](commands/region.md) | /pa !rg | Manage arena regions
[/pa regionclear](commands/regionclear.md) | /pa !rc | Manage arena region clearing exceptions
[/pa regionflags](commands/regionflags.md) | /pa !rf | Manage arena flags
[/pa regiontype](commands/regiontype.md) | /pa !rt | Change a region type
[/pa regions](commands/regions.md) | /pa !rs | Debug regions
[/pa reload](commands/reload.md) | /pa !rl | Reload arena configs
[/pa remove](commands/remove.md) | /pa !rm | Removes an arena.
[/pa round](commands/round.md) | /pa !rd | Manages arena rounds
[/pa remove](commands/remove.md) | /pa !rm | Remove an arena.
[/pa round](commands/round.md) | /pa !rd | Manage arena rounds
[/pa set](commands/set.md) | /pa !s | Set an arena config setting
[/pa setowner](commands/setowner.md) | /pa !so | Sets the owner of an arena
[/pa spawn](commands/spawn.md) | /pa !sp | Manage arena spawns
[/pa start](commands/start.md) | /pa !go | Force starts an arena.
[/pa stop](commands/stop.md) | /pa !st | Force stops an arena.
[/pa teams](commands/teams.md) | /pa !ts | Manages arena teams
[/pa teleport](commands/teleport.md) | /pa !tp | Teleports you to an arena spawnpoint
[/pa togglemod \[module\]](commands/togglemod.md) | /pa !tm | Activates/Deactivates module
[/pa teams](commands/teams.md) | /pa !ts | Manage arena teams
[/pa teleport](commands/teleport.md) | /pa !tp | Teleport you to an arena spawnpoint
[/pa togglemod](commands/togglemod.md) | /pa !tm | Enable or disable a module for an arena
[/pa whitelist](commands/whitelist.md) | /pa !wl | Manage arena whitelists

### Arena Standard Commands
## Arena Standard Commands

_(Permission: pvparena.user (defaults to true))_
> Permission: pvparena.user (defaults to true)
Command | Shorthand | Definition
------------- | ------------- | -------------
/pa arenaclass | /pa -ac | Changes your class, if allowed (/pa -ac [classname])
/pa list | none | List available arenas (red: disabled, yellow: edit, green: running)
/pa chat | /pa -c | Sets arena chat mode
/pa info | /pa -i | Displays the active modules of an arena and its settings
/pa join {team} | /pa -j | Joins an arena
[/pa arenaclass](commands/arenaclass.md) | /pa -ac | Change your class, if allowed
/pa chat | /pa -c | Set arena chat mode
/pa info | /pa -i | Display the active modules of an arena and its settings
/pa help | /pa -h | Basic help. Splits into subsections.
[/pa join](commands/join.md) | /pa -j | Join an arena (specifying a team or not)
/pa leave | /pa -l | Leave an arena
/pa ready | /pa -r | Readys you up or lists who is ready
/pa list | none | List available arenas (red: disabled, yellow: edit, green: running)
[/pa ready](commands/ready.md) | /pa -r | Ready you up or list who is ready
/pa spectate | /pa -s | Spectate an arena
[/pa stats](commands/stats.md) | /pa -s | Shows [arena/global] statistics
/pa version | /pa -v | Shows detailed version information
[/pa stats](commands/stats.md) | /pa -s | Show [arena/global] statistics
/pa version | /pa -v | Show detailed version information
22 changes: 22 additions & 0 deletions doc/commands/arenaclass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Arenaclass command

## Description

This command allow players to change their class if it's allowed. It must be typed inside an arena.

## Usage Examples

Command | Definition
------------- | -------------
/pa arenaclass [className] | switch you current arena class

Example: `/pa -ac assassin` - get the assassin class

## Details

You can change you class in two cases :
- Before a match, when you're waiting in lounge
- During a match if `ingameClassSwitch` arena setting is enabled

> 🚩**Tip:**
> With `classSwitchAfterRespawn` you can delay ingame class switching on next respawn
20 changes: 11 additions & 9 deletions doc/commands/blacklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,20 @@

## Description

This command manages the block place / break blacklist for an arena.
This command manages the block place / break blacklist for an arena. With this, you are able to forbid
some actions to arena players.

## Usage Examples
## Usage

Command | Definition
------------- | -------------
/pa ctf blacklist clear | clear the general blacklist
/pa ctf blacklist break clear | clear the BREAK blacklist
/pa ctf blacklist break add SNOW | add SNOW to the BREAK blacklist
/pa ctf blacklist place show | show the PLACE blacklist
/pa ctf blacklist break remove SNOW | remove SNOW from the BREAK blacklist
/pa [arena] blacklist clear | clear the general blacklist
/pa [arena] blacklist [break/place] clear | clear the BREAK or the PLACE blacklist
/pa [arena] blacklist [break/place] show | show a blacklist content
/pa [arena] blacklist [break/place] add [block] | add a block to a blacklist
/pa [arena] blacklist [break/place] remove [block] | remove a block from a blacklist

## Details
Example: `/pa ctf blacklist break add SNOW` - add SNOW block to the BREAK blacklist

Both ENUMs and ITEM IDs work, you can even add DATA values, e.g. WOOL:13
> **🚩 Tip:**
> [`/pa whitelist`](whitelist.md) command works exactly in the same way
5 changes: 3 additions & 2 deletions doc/commands/check.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ The check command basically tries to parse an arena config, in case you are unsu

Command | Definition
------------- | -------------
/pa check myArena | debug the arena "myArena"
/pa check Teams | debug the arena "Teams"
/pa check [arena] | check the config of an arena

Example: `/pa check myArena` - debug the arena "myArena"

## Hazards

Expand Down
13 changes: 9 additions & 4 deletions doc/commands/class.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@

This command manages the arena classes. You can use it to show, edit and remove arena classes.

## Usage Examples
## Usage

Command | Definition
------------- | -------------
/pa test class load Tank | Give you the class items of the Class "Tank" of the arena "test"
/pa temp class save Test | Save your inventory to the class items of the Class "Test" of the arena "temp"
/pa team class remove Blue | Remove the class "Blue" from the arena "team"
/pa [arena] class load [class] | Preview the class items of the class directly in your inventory
/pa [arena] class save [class] | Save your inventory to the class items of a class
/pa [arena] class remove [class] | Remove a class from an arena

Example: use `/pa temp class save Test` to save your inventory to the class "Test" of the arena "temp"

> **🚩 Tip:**
> Type `/pa leave` to leave class preview
## Hazards

Expand Down
18 changes: 4 additions & 14 deletions doc/commands/classchest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@

## Description

This command manages the arena class chests. You use it to define a class item chest.
If you want, you can save class inventories inside chests instead of using [/pa class](class.md) command.

## Usage Examples
## Usage

Command | Definition
------------- | -------------
/pa test classchest Ranger | Define the chest containing the items of the class "Ranger" from the arena "test"
/pa [arena] classchest [class] | Use a chest to store items of a class. You have to look at the chest.

## Hazards

-

## Details

Look at a chest you want to set

## ToDo

-
Example: `/pa test classchest Ranger` - Define the chest containing the items of the class "Ranger" from the arena "test".
18 changes: 3 additions & 15 deletions doc/commands/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,10 @@

The create command basically creates a standard, boring, arena. Given legacy types enhance this, but still you will probably want to customize your arena and definately continue setting it up by setting spawn points.

## Usage Examples
## Usage

Command | Definition
------------- | -------------
/pa create teamArena | create a standard Teams Arena
/pa create capture ctf | create a Capture The Flag Arena called "capture"
/pa create [arenaName] (free) | Create an arena. Arena uses team gamemode by default, add `free` parameter to use FFA gamemode instead.

## Details

In order to have a quicker start when setting up an arena, you can use the oldschool legacy types, which will be supported until v2.0 I guess. Those types add pre-definitions to define how the arena works in general. You can still go ahead and adjust the goal setup to your needs!

Valid legacy types include:

- ctf
- free
- ctp
- sabotage
- tank
- spleef
Example: `/pa create ffa free` - create a free for all arena named "ffa"
7 changes: 4 additions & 3 deletions doc/commands/debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@

The debug command is used to spam the log file with a hell lot more of information, based on your current issue, or just in general when unsure where the issue comes from.

## Usage Examples
## Usage

Command | Definition
------------- | -------------
/pa debug all | debug ALL classes
/pa debug 4 | debug class number 4
/pa debug 4,7 | debug class 4 and 7
/pa debug [value] | debug class or arena where name equals to `value`
/pa debug none | disable debugging

Example: `/pa debug 4,7` - debug class 4 and 7

## Hazards

The way PVP Arena debugs is known to **spam** a LOT. This rises exponentially the more people you have on. So if you want to debug and are unsure if you're debugging the right thing,
Expand Down
7 changes: 4 additions & 3 deletions doc/commands/disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

This command disables arenas, force stopping them in the first place.

## Usage Examples
## Usage

Command | Definition
------------- | -------------
/pa test disable | disable the "test" arena
/pa temp disable | disable the "temp" arena
/pa [arena] disable | disable an arena

Example: `/pa test disable` - disable the "test" arena

## Details

Expand Down
Loading

0 comments on commit 484bcd5

Please sign in to comment.