Skip to content

Commit b9fcb2d

Browse files
authored
SimpleReserve v2 (#7)
* WIP kotlin rewrite * Fix certain branches of join logic on both method * Cleanup * Update README
1 parent 39df13a commit b9fcb2d

27 files changed

+951
-722
lines changed

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_size = 4
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
9+
[*.{kt,kts}]
10+
ktlint_code_style = intellij_idea
11+
12+
[*{.yml,yaml}]
13+
indent_style = space
14+
indent_size = 2
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build
2+
on:
3+
workflow_call:
4+
outputs:
5+
version:
6+
description: Built version
7+
value: ${{ jobs.build.outputs.version }}
8+
9+
jobs:
10+
build:
11+
name: Gradle Build
12+
runs-on: ubuntu-24.04
13+
outputs:
14+
version: ${{ steps.version.outputs.version }}
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Setup Java
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'temurin'
23+
java-version: 21
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
- name: Gradle Build
27+
run: ./gradlew build shadowJar
28+
- name: Get Version
29+
id: version
30+
run: echo "version=$(./gradlew --console plain --quiet currentVersion -Prelease.quiet)" >> $GITHUB_OUTPUT
31+
- name: Upload build
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: build
35+
path: build/libs/*.jar
36+
retention-days: 7
37+
if-no-files-found: error
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Create Version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
versionIncrementer:
7+
type: choice
8+
description: Override the default version incrementer according to https://axion-release-plugin.readthedocs.io/en/latest/configuration/version/#incrementing
9+
default: default
10+
options:
11+
- default
12+
- incrementPatch
13+
- incrementMinor
14+
- incrementMajor
15+
- incrementPrerelease
16+
17+
jobs:
18+
release:
19+
name: Gradle Release
20+
runs-on: ubuntu-24.04
21+
outputs:
22+
version: ${{ steps.version.outputs.version }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
ssh-key: "${{ secrets.COMMIT_KEY }}"
27+
fetch-depth: 0
28+
- uses: webfactory/[email protected]
29+
with:
30+
ssh-private-key: ${{ secrets.COMMIT_KEY }}
31+
- name: Setup Java
32+
uses: actions/setup-java@v4
33+
with:
34+
distribution: 'temurin'
35+
java-version: 21
36+
- uses: gradle/actions/setup-gradle@v4
37+
- name: Gradle Release
38+
if: ${{ inputs.versionIncrementer == 'default' }}
39+
run: ./gradlew release
40+
- name: Gradle Release w/ Increment Override
41+
if: ${{ inputs.versionIncrementer != 'default' }}
42+
run: ./gradlew release -Prelease.versionIncrementer=${{ inputs.versionIncrementer }}

.github/workflows/pr-workflow.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,4 @@ on: pull_request
33

44
jobs:
55
build:
6-
name: Gradle Build
7-
runs-on: ubuntu-latest
8-
steps:
9-
- uses: actions/checkout@v1
10-
- uses: actions/setup-java@v1
11-
with:
12-
java-version: 11
13-
- uses: actions/cache@v1
14-
with:
15-
path: ~/.gradle/wrapper
16-
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
17-
- uses: actions/cache@v1
18-
with:
19-
path: ~/.gradle/caches
20-
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
21-
restore-keys: |
22-
${{ runner.os }}-gradle-caches-
23-
- uses: eskatos/gradle-command-action@v1
24-
with:
25-
arguments: build
6+
uses: ./.github/workflows/build-workflow.yml
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Publish
2+
on:
3+
push:
4+
branches: ['master', 'main']
5+
tags:
6+
- "v[0-9]+.[0-9]+.[0-9]+"
7+
8+
jobs:
9+
build:
10+
uses: ./.github/workflows/build-workflow.yml
11+
release:
12+
needs: build
13+
name: Create Release
14+
runs-on: ubuntu-24.04
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Download build
18+
uses: actions/download-artifact@v4
19+
with:
20+
name: build
21+
path: build
22+
- name: Release
23+
uses: docker://antonyurchenko/git-release:v6
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
RELEASE_NAME: ${{ needs.build.outputs.version }}
27+
PRE_RELEASE: ${{ github.ref_type == 'branch' }}
28+
UNRELEASED: ${{ github.ref_type == 'branch' && 'update' || '' }}
29+
UNRELEASED_TAG: latest-snapshot
30+
ALLOW_EMPTY_CHANGELOG: ${{ github.ref_type == 'branch' && 'true' || 'false' }}
31+
with:
32+
args: build/*.jar

.github/workflows/release-workflow.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.gitignore

Lines changed: 71 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,91 @@
11

2-
# Created by https://www.gitignore.io/api/intellij,java,gradle
3-
4-
### Intellij ###
5-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android
6-
Studio and Webstorm
7-
8-
*.iml
9-
10-
## Directory-based project format:
11-
.idea/
12-
# if you remove the above rule, at least ignore the following:
13-
14-
# User-specific stuff:
15-
# .idea/workspace.xml
16-
# .idea/tasks.xml
17-
# .idea/dictionaries
18-
# .idea/shelf
19-
20-
# Sensitive or high-churn files:
21-
# .idea/dataSources.ids
22-
# .idea/dataSources.xml
23-
# .idea/sqlDataSources.xml
24-
# .idea/dynamic.xml
25-
# .idea/uiDesigner.xml
26-
27-
# Gradle:
28-
# .idea/gradle.xml
29-
# .idea/libraries
30-
31-
# Mongo Explorer plugin:
32-
# .idea/mongoSettings.xml
33-
34-
## File-based project format:
35-
*.ipr
2+
# Created by https://www.gitignore.io/api/gradle,intellij+all
3+
# Edit at https://www.gitignore.io/?templates=gradle,intellij+all
4+
5+
### Intellij+all ###
6+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
7+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
8+
9+
# User-specific stuff
10+
.idea/**/workspace.xml
11+
.idea/**/tasks.xml
12+
.idea/**/usage.statistics.xml
13+
.idea/**/dictionaries
14+
.idea/**/shelf
15+
16+
# Generated files
17+
.idea/**/contentModel.xml
18+
19+
# Sensitive or high-churn files
20+
.idea/**/dataSources/
21+
.idea/**/dataSources.ids
22+
.idea/**/dataSources.local.xml
23+
.idea/**/sqlDataSources.xml
24+
.idea/**/dynamic.xml
25+
.idea/**/uiDesigner.xml
26+
.idea/**/dbnavigator.xml
27+
28+
# Gradle
29+
.idea/**/gradle.xml
30+
.idea/**/libraries
31+
32+
# Gradle and Maven with auto-import
33+
# When using Gradle or Maven with auto-import, you should exclude module files,
34+
# since they will be recreated, and may cause churn. Uncomment if using
35+
# auto-import.
36+
# .idea/modules.xml
37+
# .idea/*.iml
38+
# .idea/modules
39+
40+
# CMake
41+
cmake-build-*/
42+
43+
# Mongo Explorer plugin
44+
.idea/**/mongoSettings.xml
45+
46+
# File-based project format
3647
*.iws
3748

38-
## Plugin-specific files:
39-
4049
# IntelliJ
41-
/out/
50+
out/
4251

4352
# mpeltonen/sbt-idea plugin
4453
.idea_modules/
4554

4655
# JIRA plugin
4756
atlassian-ide-plugin.xml
4857

58+
# Cursive Clojure plugin
59+
.idea/replstate.xml
60+
4961
# Crashlytics plugin (for Android Studio and IntelliJ)
5062
com_crashlytics_export_strings.xml
5163
crashlytics.properties
5264
crashlytics-build.properties
5365
fabric.properties
5466

67+
# Editor-based Rest Client
68+
.idea/httpRequests
5569

56-
### Java ###
57-
*.class
70+
# Android studio 3.1+ serialized cache file
71+
.idea/caches/build_file_checksums.ser
5872

59-
# Mobile Tools for Java (J2ME)
60-
.mtj.tmp/
73+
### Intellij+all Patch ###
74+
# Ignores the whole .idea folder and all .iml files
75+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
6176

62-
# Package Files #
63-
*.jar
64-
*.war
65-
*.ear
77+
.idea/
6678

67-
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
68-
hs_err_pid*
79+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
6980

81+
*.iml
82+
modules.xml
83+
.idea/misc.xml
84+
*.ipr
7085

7186
### Gradle ###
7287
.gradle
73-
build/
88+
/build/
7489

7590
# Ignore Gradle GUI config
7691
gradle-app.setting
@@ -80,3 +95,11 @@ gradle-app.setting
8095

8196
# Cache of project
8297
.gradletasknamecache
98+
99+
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
100+
# gradle/wrapper/gradle-wrapper.properties
101+
102+
### Gradle Patch ###
103+
**/build/
104+
105+
# End of https://www.gitignore.io/api/gradle,intellij+all

CHANGELOG.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
# Changelog
22

33
## [Unreleased]
4+
### Added
5+
- MIT license
6+
7+
### Changed
8+
- Rewrote plugin in Kotlin
9+
- MC 1.21, Java 21, Kotlin 2.1
10+
- **BREAKING**: New config format
11+
12+
### Removed
13+
- Help command (duplicated built-in usage functionality)
14+
15+
### Fixed
16+
- Close listeners on reload
17+
- `KICK` method will now function for players with both kick and full permissions and `BOTH` reserve method
418

519
## [1.0.1] - 2020-06-28
620
### Changed
@@ -13,8 +27,7 @@
1327
- Github Actions for build and automated releases
1428

1529
### Changed
16-
- Adopt semver
17-
- axion-release plugin
30+
- Adopt semver via axion-release plugin
1831
- Target MC version 1.15
1932

2033
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 SimpleMC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)