Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Old commits #11

Open
wants to merge 311 commits into
base: ranking-and-ban-notifications
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
311 commits
Select commit Hold shift + click to select a range
83fe910
- test
Grzybol Mar 17, 2024
1527ed1
Merge pull request #23 from Grzybol/test2
Grzybol Mar 17, 2024
7681522
Update maven.yml
Grzybol Mar 17, 2024
acbf5d5
Update maven.yml
Grzybol Mar 17, 2024
dbb7bb6
Update maven.yml
Grzybol Mar 17, 2024
485ea13
Update maven.yml
Grzybol Mar 17, 2024
3c50797
Update maven.yml
Grzybol Mar 17, 2024
473517c
Update maven.yml
Grzybol Mar 17, 2024
5de7e92
Update maven.yml
Grzybol Mar 17, 2024
9bef656
Update maven.yml
Grzybol Mar 17, 2024
0972e6e
Update maven.yml
Grzybol Mar 17, 2024
2dbd45a
Update maven.yml
Grzybol Mar 17, 2024
0542ce8
Update maven.yml
Grzybol Mar 17, 2024
d88b22d
Update maven.yml
Grzybol Mar 17, 2024
1e9448c
Update maven.yml
Grzybol Mar 17, 2024
efa7b57
Update maven.yml
Grzybol Mar 17, 2024
d8d04e1
- added antyweb command to /be help
Grzybol Mar 17, 2024
b2d0c99
- added antyweb command to /be help
Grzybol Mar 17, 2024
49e2027
- added /be firework <power> - for infinite firework with given power
Grzybol Mar 17, 2024
265027a
Merge pull request #24 from Grzybol/infinite-firework
Grzybol Mar 17, 2024
02f0421
- fixed flight sound with infinite firework
Grzybol Mar 17, 2024
626890c
- added check if player is on the ground before applying firework effect
Grzybol Mar 17, 2024
046c5ac
Merge pull request #25 from Grzybol/fixes
Grzybol Mar 17, 2024
b0af517
- added eltyra check
Grzybol Mar 17, 2024
0b16e43
- fixes
Grzybol Mar 17, 2024
04c7937
Merge pull request #26 from Grzybol/fixes2
Grzybol Mar 17, 2024
1a84e70
Update maven.yml
Grzybol Mar 17, 2024
cb64786
- added configurable firework cooldown
Grzybol Mar 17, 2024
163c55f
Merge pull request #27 from Grzybol/firework-cooldown
Grzybol Mar 17, 2024
8bc3320
Update maven.yml
Grzybol Mar 17, 2024
b304903
- test
Grzybol Mar 17, 2024
2408b4e
- GitHub Actions test
Grzybol Mar 17, 2024
345ff67
- GitHub Actions test
Grzybol Mar 17, 2024
bee9823
Update maven.yml
Grzybol Mar 17, 2024
a237161
- GitHub Actions test
Grzybol Mar 17, 2024
af9c772
Update maven.yml
Grzybol Mar 17, 2024
0a7ae17
- added command for shitty imitation ofElytra effect (more like long …
Grzybol Mar 18, 2024
27e1d82
Merge pull request #28 from Grzybol/addElytra-command
Grzybol Mar 18, 2024
29be776
Deploy to server - Github Actions
Grzybol Mar 18, 2024
9cef9b4
- test of GitHub Actions server deploy
Grzybol Mar 18, 2024
95ca428
Update maven.yml
Grzybol Mar 18, 2024
d433d80
- test of GitHub Actions server deploy
Grzybol Mar 18, 2024
840fa88
- test of GitHub Actions server deploy
Grzybol Mar 18, 2024
c4e1aa4
Update maven.yml
Grzybol Mar 18, 2024
4ddad13
Create SSH_TEST.yml
Grzybol Mar 18, 2024
7fa3a1a
Merge pull request #29 from Grzybol/ssh-test
Grzybol Mar 18, 2024
95be62f
Update SSH_TEST.yml
Grzybol Mar 18, 2024
a36abcd
Update maven.yml
Grzybol Mar 18, 2024
23f382d
- test of GitHub Actions server deploy
Grzybol Mar 18, 2024
3517393
Update maven.yml
Grzybol Mar 18, 2024
d7f811a
- test of GitHub Actions server deploy
Grzybol Mar 18, 2024
5649dd7
Update maven.yml
Grzybol Mar 18, 2024
a2afe0f
- test of GitHub Actions server deploy
Grzybol Mar 18, 2024
6b3194b
Update maven.yml
Grzybol Mar 18, 2024
24f7b4e
- test of GitHub Actions server deploy
Grzybol Mar 18, 2024
77a8b1d
Update maven.yml
Grzybol Mar 18, 2024
0a41d8e
- test of GitHub Actions server deploy
Grzybol Mar 19, 2024
2e46cb1
auto backup and auto old version removal
Grzybol Mar 19, 2024
a942dfd
- test of GitHub Actions server deploy
Grzybol Mar 19, 2024
32b5d10
fixed auto backup
Grzybol Mar 19, 2024
5f45117
- test of GitHub Actions server deploy
Grzybol Mar 19, 2024
1df94c6
- added WorldGuard
Grzybol Apr 4, 2024
97ca72e
Merge pull request #30 from Grzybol/UPDATE-4.0
Grzybol Apr 4, 2024
c3228e3
GHA fix
Grzybol Apr 4, 2024
453e7b3
Merge pull request #31 from Grzybol/GHA-fix
Grzybol Apr 4, 2024
d7f0773
- fixes
Grzybol Apr 4, 2024
8f1b7dc
Merge pull request #32 from Grzybol/fixes_v4
Grzybol Apr 4, 2024
2c1fd7d
- fixes
Grzybol Apr 4, 2024
acdb9a8
- added zephyer effect
Grzybol Apr 4, 2024
50b0d10
Merge pull request #33 from Grzybol/zephyr-effect
Grzybol Apr 4, 2024
2a8676a
- fix
Grzybol Apr 4, 2024
9ed07bf
Merge pull request #34 from Grzybol/zephyr-fix
Grzybol Apr 4, 2024
32a00bb
- fix
Grzybol Apr 4, 2024
b5f3456
- fix
Grzybol Apr 4, 2024
7e4d201
- fix
Grzybol Apr 4, 2024
c833de3
Merge pull request #35 from Grzybol/zephyr-fix2
Grzybol Apr 4, 2024
137287f
- fix
Grzybol Apr 4, 2024
89c41d9
Merge pull request #36 from Grzybol/zephyr-patches
Grzybol Apr 4, 2024
ee47423
- fix
Grzybol Apr 4, 2024
f44c941
Merge pull request #37 from Grzybol/zephyr-patches2
Grzybol Apr 4, 2024
1db4aad
- final fix I hope
Grzybol Apr 5, 2024
dcd1f80
Merge pull request #38 from Grzybol/zephyr-patches3
Grzybol Apr 5, 2024
6725020
- From now on Zephyr effect does not work while wearing Elytra to pre…
Grzybol Apr 5, 2024
20ab405
Merge pull request #39 from Grzybol/zephyr-patch4
Grzybol Apr 5, 2024
22c990b
- fix xD
Grzybol Apr 5, 2024
47df6c7
Merge pull request #40 from Grzybol/zephyr-patch6
Grzybol Apr 5, 2024
8de9bd4
- fixes...
Grzybol Apr 5, 2024
d6f2306
- fixes...
Grzybol Apr 5, 2024
7b3bc32
- final fixes
Grzybol Apr 5, 2024
0eabf92
- working version
Grzybol Apr 5, 2024
3df5d66
Merge pull request #41 from Grzybol/zephyr-patches7
Grzybol Apr 5, 2024
9047a60
- added Flamethrower and Zephyr to the /be help
Grzybol Apr 5, 2024
804e5b8
- added and adjusted logging levels
Grzybol Apr 5, 2024
1a53f40
- added chestplate check for zephyr effect
Grzybol Apr 5, 2024
7e5f95d
- message fix
Grzybol Apr 6, 2024
f907fee
- first custom mob
Grzybol Apr 6, 2024
bf52810
- first custom mob fix xD
Grzybol Apr 6, 2024
17e19b1
- custom damage to custom mobs
Grzybol Apr 6, 2024
fd46b41
- working "Average Damage" bonus rip-off from Metin2 xDDD. Thi effect…
Grzybol Apr 7, 2024
695524c
- working custom spawners
Grzybol Apr 7, 2024
46436fa
- fixes, adjustments
Grzybol Apr 8, 2024
be902fa
- fixed mob HP updating
Grzybol Apr 8, 2024
23ae021
- CustomMobs refactor
Grzybol Apr 9, 2024
f8d61b3
- added more debug
Grzybol Apr 9, 2024
af04072
Merge pull request #42 from Grzybol/patch-4.1.0
Grzybol Apr 9, 2024
0e563bc
- fixes
Grzybol Apr 9, 2024
eb2dee0
- fixes and code adjustment
Grzybol Apr 9, 2024
5a1800f
Merge pull request #43 from Grzybol/release-4.2.0
Grzybol Apr 9, 2024
9038e8c
- fix
Grzybol Apr 9, 2024
4cac111
Merge pull request #44 from Grzybol/release-4.2.0
Grzybol Apr 9, 2024
b9e7907
- added unbreaking to EMKS
Grzybol Apr 9, 2024
5391b51
Merge pull request #45 from Grzybol/release-4.2.0
Grzybol Apr 9, 2024
f060aae
- fixes
Grzybol Apr 9, 2024
9ff6c28
Merge pull request #46 from Grzybol/release-4.2.0
Grzybol Apr 9, 2024
261234d
- more fixes
Grzybol Apr 9, 2024
648c1c5
Merge pull request #47 from Grzybol/release-4.2.0
Grzybol Apr 9, 2024
bb80065
- fixes
Grzybol Apr 9, 2024
80fe767
- added customizable mob attack speed.
Grzybol Apr 9, 2024
cd7e3bb
Merge pull request #48 from Grzybol/release-4.2.0
Grzybol Apr 9, 2024
dee1ddf
- fixes
Grzybol Apr 9, 2024
7b20cee
Merge pull request #49 from Grzybol/release-4.2.0
Grzybol Apr 9, 2024
153dd14
- fixes
Grzybol Apr 10, 2024
5cb2a4a
-spawners fix
Grzybol Apr 10, 2024
7fb890a
- added /be spawnmob <mobName> <amount> command
Grzybol Apr 10, 2024
a71b184
Merge pull request #50 from Grzybol/release-4.2.0
Grzybol Apr 10, 2024
c288f6e
- working release 4.2.0
Grzybol Apr 10, 2024
95bdd99
Release 4.2.0
Grzybol Apr 10, 2024
ab7941a
- AvgDmgBonus fix
Grzybol Apr 10, 2024
f0038b2
Merge pull request #52 from Grzybol/patch-4.2.0
Grzybol Apr 10, 2024
c6b2caa
- fixes
Grzybol Apr 11, 2024
476fc3a
- added checking whole players equipped inventory to sum the "Average…
Grzybol Apr 11, 2024
b193e3e
Merge pull request #53 from Grzybol/patch-4.2.0
Grzybol Apr 11, 2024
f5646fb
- fixes
Grzybol Apr 12, 2024
19a8c2c
- fixed GUI
Grzybol Apr 12, 2024
7221ce7
Merge pull request #54 from Grzybol/patch-4.2.0
Grzybol Apr 12, 2024
a19bbcd
- fixed avgdmg bonus drop with the new dropitem class
Grzybol Apr 13, 2024
2199878
Merge pull request #55 from Grzybol/patch-4.2.0
Grzybol Apr 13, 2024
311ff91
- patch 4.2.15
Grzybol Apr 13, 2024
1d0939c
Merge pull request #56 from Grzybol/patch-4.2.0
Grzybol Apr 13, 2024
285ee55
Patch 4.2.21
Grzybol Apr 13, 2024
d5cc519
Merge pull request #57 from Grzybol/patch-4.2.0
Grzybol Apr 13, 2024
b2a589f
Patch 4.2.60
Grzybol Apr 13, 2024
4120995
Patch 4.2.60
Grzybol Apr 13, 2024
3b5f14f
Patch 4.2.60
Grzybol Apr 14, 2024
f77909d
Release 4.3.0
Grzybol Apr 17, 2024
b8f9b0e
Merge pull request #59 from Grzybol/release-4.3.0
Grzybol Apr 17, 2024
4f78128
- patch xD
Grzybol Apr 17, 2024
0ae3733
- fixed doubled events
Grzybol Apr 17, 2024
40ae1e0
- changed Average Damage distribution
Grzybol Apr 17, 2024
a178475
Merge pull request #60 from Grzybol/patch-4.3.0
Grzybol Apr 17, 2024
8cafb1b
- fix
Grzybol Apr 18, 2024
9033b09
Merge pull request #61 from Grzybol/patch-4.3.0
Grzybol Apr 18, 2024
2be5d40
- fix
Grzybol Apr 18, 2024
c0f89a0
Merge pull request #62 from Grzybol/patch-4.3.0
Grzybol Apr 18, 2024
591ff06
- added permission for '/be reroll' - betterelo.reroll
Grzybol Apr 18, 2024
5d33b2a
added permission for '/be reroll' - betterelo.reroll
Grzybol Apr 18, 2024
38d1361
- added feedback if no permission for '/be reroll'
Grzybol Apr 18, 2024
c36a290
- logging changes and stuff
Grzybol Apr 19, 2024
5cc5a44
adjusted Average Damage drop
Grzybol Apr 19, 2024
319ba59
AvgDmg change screen fix
Grzybol Apr 21, 2024
bcd345e
AvgDmg change screen fix
Grzybol Apr 21, 2024
3e6c12d
Merge pull request #64 from Grzybol/patch-4.3.0
Grzybol Apr 21, 2024
9dea6f5
- added new command /be enchantitem
Grzybol Apr 26, 2024
b5e1b09
- fixes
Grzybol Apr 26, 2024
f3be99a
Update issue templates
Grzybol Apr 27, 2024
78a7013
- fixes
Grzybol Apr 27, 2024
e1cf09e
Merge pull request #65 from Grzybol/patch-4.3.0
Grzybol Apr 27, 2024
78d9d05
- fixed customMobs
Grzybol Jun 21, 2024
889d3ca
Merge pull request #66 from Grzybol/patch-4.30.1
Grzybol Jun 21, 2024
da10956
- fixed customMobs!!! now spider works
Grzybol Jun 21, 2024
3e1df98
Merge pull request #67 from Grzybol/patch-4.30.1
Grzybol Jun 21, 2024
87f1f56
- mobs are removing Cobwebs from now
Grzybol Jun 24, 2024
597705d
- fixes
Grzybol Jun 25, 2024
dc8ce41
- changed Mob defense bonus to 0.1 of previous value
Grzybol Jun 25, 2024
5e0187d
- damage to mobs is reduced by their armor and defense
Grzybol Jun 26, 2024
7307fc9
- fix
Grzybol Jun 26, 2024
5da9b0b
- fix
Grzybol Jun 26, 2024
75b0175
- fix
Grzybol Jun 26, 2024
8788100
- fixed dmg calculations
Grzybol Jun 27, 2024
0efb8f3
Merge pull request #68 from Grzybol/patch-4.30.1
Grzybol Jun 27, 2024
c7d9c60
- fixes
Grzybol Jun 28, 2024
baa6cc4
- fixed droptable command
Grzybol Jun 28, 2024
d1d5813
- added display of current AvgDmg bonus in /be reroll
Grzybol Jun 29, 2024
3b4370f
- roving also 1 cobweb above, not only at the legs height
Grzybol Jun 29, 2024
3970967
- configurable armor and damage (vanilla minecraft) attributes for mo…
Grzybol Jun 30, 2024
0490db1
- fixes
Grzybol Jul 7, 2024
4270307
- 2x elo gain fix
Grzybol Jul 7, 2024
d24aa90
Merge pull request #69 from Grzybol/release-4.4
Grzybol Jul 7, 2024
990e3bc
- fixes
Grzybol Jul 8, 2024
2e9376a
Public release.yml
Grzybol Jul 8, 2024
ca1789e
Update maven-publish.yml
Grzybol Jul 8, 2024
043e1c6
Merge pull request #70 from Grzybol/release-4.5.0
Grzybol Jul 8, 2024
260273b
Update maven.yml
Grzybol Jul 8, 2024
c627a00
- fixed elo gain
Grzybol Jul 8, 2024
c8c547b
- added /be forcespawn <spawnername>
Grzybol Jul 8, 2024
5bb0d0c
- fixes
Grzybol Jul 9, 2024
d359819
- configurable maxDistance for spawners
Grzybol Jul 9, 2024
9fbea54
- fixed log levels
Grzybol Jul 9, 2024
ba1b29f
- fixed mob teleport
Grzybol Jul 9, 2024
e1ee0bf
Merge pull request #71 from Grzybol/master
Grzybol Jul 12, 2024
250d143
- fixed log levels
Grzybol Jul 12, 2024
58c31e9
Merge pull request #72 from Grzybol/release-4.5.0
Grzybol Jul 12, 2024
e9684a5
Update README.md
Grzybol Jul 12, 2024
df1e2df
Update README.md
Grzybol Jul 12, 2024
09767a3
Update README.md
Grzybol Jul 12, 2024
8fc8435
- added example config files
Grzybol Jul 12, 2024
4b5ff69
Merge pull request #73 from Grzybol/master
Grzybol Jul 12, 2024
b799605
Public release 4.6
Grzybol Jul 12, 2024
b73ab08
Merge pull request #74 from Grzybol/release-4.6.0
Grzybol Jul 12, 2024
d99d8cb
- blocks placed on CREATIVE gamemode don't have placed_by_player meta…
Grzybol Jul 13, 2024
d2c5c48
- mounted mobs first commit
Grzybol Jul 14, 2024
d64ade4
- finally working version
Grzybol Jul 14, 2024
d1246ba
Merge pull request #75 from Grzybol/mouted-mobs
Grzybol Jul 14, 2024
8286ee9
- custom mobs can we mounted with other custom mobs!
Grzybol Jul 14, 2024
da22fdd
- added custom armor support for husk,witherskeleton and something e…
Grzybol Jul 15, 2024
652167c
- moved to operating on persistent item metadata instead of reading l…
Grzybol Jul 16, 2024
73b63d5
- fix
Grzybol Jul 16, 2024
e4d593d
Merge pull request #76 from Grzybol/persistent-item-metadata
Grzybol Jul 16, 2024
59372b3
- added timer to count execution time of onEntityDamageByEntity
Grzybol Jul 17, 2024
f7b52c1
- fix
Grzybol Jul 17, 2024
eeadefe
- mob health regen fix
Grzybol Jul 17, 2024
5ba3566
- attacks on mobs or players have not delay now
Grzybol Jul 17, 2024
16f2f23
- fix
Grzybol Jul 17, 2024
54d7525
Merge pull request #77 from Grzybol/customDamageHandling
Grzybol Jul 17, 2024
0844e1f
- FIX
Grzybol Jul 18, 2024
7207adb
- fix
Grzybol Jul 19, 2024
d6c48e3
- added custom knockbackResistance attribute for mobs
Grzybol Jul 19, 2024
9a02f99
- fixes
Grzybol Jul 23, 2024
e7bdbe2
Merge pull request #78 from Grzybol/release-4.7.0
Grzybol Jul 23, 2024
0127c7e
- fixes
Grzybol Jul 24, 2024
83864b7
- finally integrated elo into custom mobs
Grzybol Jul 26, 2024
18d5416
- fix
Grzybol Jul 26, 2024
012da65
- fixed example sword
Grzybol Jul 26, 2024
244c953
- fixed example sword
Grzybol Jul 26, 2024
067af9b
- elo loss when killed by CustomMob
Grzybol Jul 26, 2024
ee9638e
- fixed PvP damage from avgdmg bonus
Grzybol Aug 3, 2024
e5fe81c
- fixes
Grzybol Aug 7, 2024
c76f35e
- fixed Mob name formatting
Grzybol Oct 13, 2024
1338b12
- added vanilla dmg to custom mobs
Grzybol Oct 18, 2024
27566ad
- added commands description
Grzybol Oct 22, 2024
9a1219e
- added soft dependency on ElasticBuffer plugin
Grzybol Nov 14, 2024
023cefc
Merge pull request #79 from Grzybol/release-4.8.0
Grzybol Nov 14, 2024
d0e5ce6
- fixed plugin name logging to kibana
Grzybol Nov 14, 2024
49a5f1c
- ElasticBuffer integration
Grzybol Nov 20, 2024
8da0f70
- log adjustments
Grzybol Nov 25, 2024
811d0a4
- "average Damage" bonus no can be rerolled just by "dropping" Enach…
Grzybol Jan 26, 2025
a8a2add
- adjusted AvgDmg spread
Grzybol Jan 26, 2025
9dfa03c
- adjusted AvgDmg spread
Grzybol Jan 26, 2025
c6e843b
release 4.9.0
Grzybol Jan 28, 2025
f2b63db
Merge pull request #81 from Grzybol/release-4.9.0
Grzybol Jan 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
20 changes: 20 additions & 0 deletions .github/workflows/SSH_TEST.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: SSH Connection Test

on:
workflow_dispatch:

jobs:
test-ssh-connection:
runs-on: ubuntu-latest
steps:
- name: Setup SSH Keys and Test SSH Connection
run: |
mkdir -p ~/.ssh
echo "${{ secrets.SSH_PRIVATE_KEY }}" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
ssh -o BatchMode=yes -o ConnectTimeout=5 ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "echo SSH connection successful"
env:
SERVER_IP: ${{ secrets.SERVER_IP }}
SERVER_USER: ${{ secrets.SERVER_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
62 changes: 62 additions & 0 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Public release
#
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # To ensure tags are fetched as well
token: ${{ secrets.GITHUB_TOKEN }} # Użyj GITHUB_TOKEN do checkout
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven and Auto-Versioning
run: mvn -B build-helper:parse-version versions:set versions:commit package --file pom.xml
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: minecraft-plugin
path: target/*.jar
- name: Extract version and artifact name
id: extract_info
run: |
JAR_NAME=$(ls target/*.jar)
ARTIFACT_NAME=$(basename $JAR_NAME)
VERSION=$(echo $ARTIFACT_NAME | grep -oP '(?<=-)\d+\.\d+\.\d+(?=-SNAPSHOT)')
echo "::set-output name=version::v$VERSION"
echo "::set-output name=artifact_name::$ARTIFACT_NAME"
- name: Create and Push Tag
run: |
git config user.name "GitHub Actions"
git config user.email "github-actions@users.noreply.github.com"
git tag ${{ steps.extract_info.outputs.version }}
git push https://x-access-token:${{ secrets.BE_ACCESS_TOKEN }}@github.com/${{ github.repository }} ${{ steps.extract_info.outputs.version }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.extract_info.outputs.artifact_name }}
tag_name: ${{ steps.extract_info.outputs.version }}
files: target/*.jar
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


142 changes: 142 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Java CI with Maven, Auto-Versioning, and Release
#
on:
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'warning'
type: choice
options:
- info
- warning
- debug
permissions:
contents: write
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # To ensure tags are fetched as well
token: ${{ secrets.GITHUB_TOKEN }} # Użyj GITHUB_TOKEN do checkout
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven and Auto-Versioning
run: mvn -B build-helper:parse-version versions:set versions:commit package --file pom.xml
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: minecraft-plugin
path: target/*.jar
- name: Extract version and artifact name
id: extract_info
run: |
JAR_NAME=$(ls target/*.jar)
ARTIFACT_NAME=$(basename $JAR_NAME)
VERSION=$(echo $ARTIFACT_NAME | grep -oP '(?<=-)\d+\.\d+\.\d+(?=-SNAPSHOT)')
echo "::set-output name=version::v$VERSION"
echo "::set-output name=artifact_name::$ARTIFACT_NAME"
- name: Create and Push Tag
run: |
git config user.name "GitHub Actions"
git config user.email "github-actions@users.noreply.github.com"
git tag ${{ steps.extract_info.outputs.version }}
git push https://x-access-token:${{ secrets.BE_ACCESS_TOKEN }}@github.com/${{ github.repository }} ${{ steps.extract_info.outputs.version }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.extract_info.outputs.artifact_name }}
tag_name: ${{ steps.extract_info.outputs.version }}
files: target/*.jar
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

backup-plugins:
needs: build-and-release
runs-on: ubuntu-latest
steps:
- name: Setup SSH Keys
run: |
mkdir -p ~/.ssh
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
env:
SERVER_IP: ${{ secrets.SERVER_IP }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Test SSH Connection
run: |
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh -o BatchMode=yes -o ConnectTimeout=5 $SERVER_USER@$SERVER_IP "echo SSH connection successful"
env:
SERVER_IP: ${{ secrets.SERVER_IP }}
SERVER_USER: ${{ secrets.SERVER_USER }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Backup Current Plugins
run: |
DATE=$(date +%Y%m%d-%H%M%S)
BACKUP_FILE="minecraft-plugins-backup-$DATE.tgz"
ssh $SERVER_USER@$SERVER_IP "tar czvf $PLUGINS_BACKUP_PATH/$BACKUP_FILE -C $SERVER_PATH ."
env:
SERVER_IP: ${{ secrets.SERVER_IP }}
SERVER_USER: ${{ secrets.SERVER_USER }}
SERVER_PATH: ${{ secrets.SERVER_PATH }}
PLUGINS_BACKUP_PATH: ${{ secrets.PLUGINS_BACKUP_PATH }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}


deploy-to-server:
needs: [build-and-release, backup-plugins]
runs-on: ubuntu-latest
steps:
- name: Setup SSH directory and accept server host key
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
env:
SERVER_IP: ${{ secrets.SERVER_IP }}

- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: minecraft-plugin
- name: List downloaded files
run: |
ls -R
# Lub, aby znaleźć wszystkie pliki JAR w bieżącym katalogu roboczym i jego podkatalogach:
find . -name "*.jar"

- name: Remove Previous Plugin Versions from Server
env:
SERVER_IP: ${{ secrets.SERVER_IP }}
SERVER_USER: ${{ secrets.SERVER_USER }}
SERVER_PATH: ${{ secrets.SERVER_PATH }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh $SERVER_USER@$SERVER_IP "rm -f $SERVER_PATH/BetterElo-*.jar"


- name: Deploy JAR to Server
env:
SERVER_IP: ${{ secrets.SERVER_IP }}
SERVER_USER: ${{ secrets.SERVER_USER }}
SERVER_PATH: ${{ secrets.SERVER_PATH }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo "$SSH_PRIVATE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
scp ./BetterElo-*.jar $SERVER_USER@$SERVER_IP:$SERVER_PATH
if: ${{ always() }}
20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading