Skip to content

Commit 18171c8

Browse files
committed
use consistent, tab-based indentation (+ .editorconfig)
1 parent 1a1f74d commit 18171c8

22 files changed

Lines changed: 1009 additions & 1000 deletions

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
indent_size = 4
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
[*.{md,gradle.kts}]
10+
indent_style = space

.gitattributes

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
# https://help.github.com/articles/dealing-with-line-endings/
33
#
44
# Linux start script should use lf
5-
/gradlew text eol=lf
5+
/gradlew text eol=lf
66

77
# These are Windows script files and should use crlf
8-
*.bat text eol=crlf
9-
8+
*.bat text eol=crlf

.github/workflows/build.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
on:
2-
push:
3-
branches:
4-
- "*"
2+
push:
3+
branches:
4+
- "*"
55

66
jobs:
7-
build:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v4
11-
- run: git fetch --prune --unshallow
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- run: git fetch --prune --unshallow
1212

13-
- name: Set up JDK
14-
uses: actions/setup-java@v4
15-
with:
16-
java-version: "21"
17-
distribution: "temurin"
18-
architecture: x64
13+
- name: Set up JDK
14+
uses: actions/setup-java@v4
15+
with:
16+
java-version: "21"
17+
distribution: "temurin"
18+
architecture: x64
1919

20-
- name: Obtain version variables
21-
run: |
22-
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
23-
echo "PREV_VERSION=$(git describe --tags --abbrev=0 | cut -c2-)" >> $GITHUB_ENV
24-
- name: Replace version in plugin.yml
25-
run: |
26-
sed -i "s/^version: <dev>/version: ${PREV_VERSION}-${SHORT_SHA}/" src/main/resources/plugin.yml
20+
- name: Obtain version variables
21+
run: |
22+
echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
23+
echo "PREV_VERSION=$(git describe --tags --abbrev=0 | cut -c2-)" >> $GITHUB_ENV
24+
- name: Replace version in plugin.yml
25+
run: |
26+
sed -i "s/^version: <dev>/version: ${PREV_VERSION}-${SHORT_SHA}/" src/main/resources/plugin.yml
2727
28-
- name: Grant execute permission for gradlew
29-
run: chmod +x gradlew
30-
- name: Build with Gradle
31-
run: ./gradlew jar
28+
- name: Grant execute permission for gradlew
29+
run: chmod +x gradlew
30+
- name: Build with Gradle
31+
run: ./gradlew jar
3232

33-
- name: Upload jar
34-
uses: actions/upload-artifact@v4
35-
with:
36-
name: headmate.jar
37-
path: build/libs/headmate.jar
33+
- name: Upload jar
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: headmate.jar
37+
path: build/libs/headmate.jar

.github/workflows/publish.yml

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,87 @@
11
on:
2-
push:
3-
tags:
4-
- "v*.*.*"
2+
push:
3+
tags:
4+
- "v*.*.*"
55

66
permissions:
7-
contents: write
7+
contents: write
88

99
jobs:
10-
publish:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- run: git fetch --prune --unshallow
10+
publish:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- run: git fetch --prune --unshallow
1515

16-
- name: Set up JDK
17-
uses: actions/setup-java@v4
18-
with:
19-
java-version: "21"
20-
distribution: "temurin"
21-
architecture: x64
16+
- name: Set up JDK
17+
uses: actions/setup-java@v4
18+
with:
19+
java-version: "21"
20+
distribution: "temurin"
21+
architecture: x64
2222

23-
- name: Obtain version variables
24-
run: |
25-
echo "PREV_VERSION=$(git describe --tags --abbrev=0 `git rev-list --tags --skip=1 --max-count=1` | cut -c2-)" >> $GITHUB_ENV
26-
echo "VERSION=$(git describe --tags --abbrev=0 | cut -c2-)" >> $GITHUB_ENV
27-
- name: Replace version in plugin.yml
28-
run: |
29-
sed -i "s/^version: <dev>/version: ${VERSION}/" src/main/resources/plugin.yml
30-
- name: Generate changelog
31-
run: |
32-
echo -e "**Changes** since v${PREV_VERSION}\n" > changelog.md
33-
git log --no-merges --pretty=format:"- %s" v${PREV_VERSION}..v${VERSION} | grep "\[change\]" | sed "s/\s*\[[^]]*\]//g" | tac >> changelog.md
34-
echo -e "\nView on GitHub: https://github.com/tizu69/plugin-headmate/compare/v${PREV_VERSION}...v${VERSION}" >> changelog.md
35-
echo "CHANGELOG<<EOF" >> "$GITHUB_ENV"
36-
cat changelog.md >> "$GITHUB_ENV"
37-
echo "EOF" >> "$GITHUB_ENV"
38-
echo "$(cat changelog.md)" >> $GITHUB_STEP_SUMMARY
23+
- name: Obtain version variables
24+
run: |
25+
echo "PREV_VERSION=$(git describe --tags --abbrev=0 `git rev-list --tags --skip=1 --max-count=1` | cut -c2-)" >> $GITHUB_ENV
26+
echo "VERSION=$(git describe --tags --abbrev=0 | cut -c2-)" >> $GITHUB_ENV
27+
- name: Replace version in plugin.yml
28+
run: |
29+
sed -i "s/^version: <dev>/version: ${VERSION}/" src/main/resources/plugin.yml
30+
- name: Generate changelog
31+
run: |
32+
echo -e "**Changes** since v${PREV_VERSION}\n" > changelog.md
33+
git log --no-merges --pretty=format:"- %s" v${PREV_VERSION}..v${VERSION} | grep "\[change\]" | sed "s/\s*\[[^]]*\]//g" | tac >> changelog.md
34+
echo -e "\nView on GitHub: https://github.com/tizu69/plugin-headmate/compare/v${PREV_VERSION}...v${VERSION}" >> changelog.md
35+
echo "CHANGELOG<<EOF" >> "$GITHUB_ENV"
36+
cat changelog.md >> "$GITHUB_ENV"
37+
echo "EOF" >> "$GITHUB_ENV"
38+
echo "$(cat changelog.md)" >> $GITHUB_STEP_SUMMARY
3939
40-
- name: Grant execute permission for gradlew
41-
run: chmod +x gradlew
42-
- name: Build with Gradle
43-
run: ./gradlew jar
40+
- name: Grant execute permission for gradlew
41+
run: chmod +x gradlew
42+
- name: Build with Gradle
43+
run: ./gradlew jar
4444

45-
- name: Create GitHub Release
46-
uses: softprops/action-gh-release@v2
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49-
with:
50-
tag_name: v${{ env.VERSION }}
51-
name: v${{ env.VERSION }}
52-
body_path: changelog.md
53-
files: build/libs/headmate.jar
54-
- name: Publish to CurseForge
55-
uses: itsmeow/curseforge-upload@v1
56-
with:
57-
token: ${{ secrets.CURSEFORGE_API_TOKEN }}
58-
project_id: 1286566
59-
game_endpoint: bukkit
60-
game_versions: "12988"
61-
file_path: build/libs/headmate.jar
62-
changelog: ${{ env.CHANGELOG }}
63-
release_type: release
64-
- name: Publish to Modrinth
65-
uses: RubixDev/modrinth-upload@v1
66-
with:
67-
token: ${{ secrets.MODRINTH_TOKEN }}
68-
project_id: AhwqWlyK
69-
file_path: build/libs/headmate.jar
70-
name: headmate ${{ env.VERSION }}
71-
version: ${{ env.VERSION }}
72-
changelog: ${{ env.CHANGELOG }}
73-
game_versions: 1.21.5
74-
loaders: paper,purpur
75-
featured: true
76-
release_type: release
77-
- name: Publish to Hangar
78-
uses: benwoo1110/hangar-upload-action@v1
79-
with:
80-
api_token: ${{ secrets.HANGAR_TOKEN }}
81-
slug: "headmate"
82-
version: ${{ env.VERSION }}
83-
channel: release
84-
files: |
85-
[{ "path": "build/libs/headmate.jar", "platforms": ["PAPER"] }]
86-
platform_dependencies: |
87-
{ "PAPER": ["1.21"] }
45+
- name: Create GitHub Release
46+
uses: softprops/action-gh-release@v2
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
with:
50+
tag_name: v${{ env.VERSION }}
51+
name: v${{ env.VERSION }}
52+
body_path: changelog.md
53+
files: build/libs/headmate.jar
54+
- name: Publish to CurseForge
55+
uses: itsmeow/curseforge-upload@v1
56+
with:
57+
token: ${{ secrets.CURSEFORGE_API_TOKEN }}
58+
project_id: 1286566
59+
game_endpoint: bukkit
60+
game_versions: "12988"
61+
file_path: build/libs/headmate.jar
62+
changelog: ${{ env.CHANGELOG }}
63+
release_type: release
64+
- name: Publish to Modrinth
65+
uses: RubixDev/modrinth-upload@v1
66+
with:
67+
token: ${{ secrets.MODRINTH_TOKEN }}
68+
project_id: AhwqWlyK
69+
file_path: build/libs/headmate.jar
70+
name: headmate ${{ env.VERSION }}
71+
version: ${{ env.VERSION }}
72+
changelog: ${{ env.CHANGELOG }}
73+
game_versions: 1.21.5
74+
loaders: paper,purpur
75+
featured: true
76+
release_type: release
77+
- name: Publish to Hangar
78+
uses: benwoo1110/hangar-upload-action@v1
79+
with:
80+
api_token: ${{ secrets.HANGAR_TOKEN }}
81+
slug: "headmate"
82+
version: ${{ env.VERSION }}
83+
channel: release
84+
files: |
85+
[{ "path": "build/libs/headmate.jar", "platforms": ["PAPER"] }]
86+
platform_dependencies: |
87+
{ "PAPER": ["1.21"] }

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2020
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
21+
SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ custom block by simply placing it while in pass-through mode.
4040

4141
## To-do
4242

43-
- scaling should be relative to the face the head is positioned against
43+
- scaling should be relative to the face the head is positioned against

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ tasks {
2222
runServer {
2323
minecraftVersion("1.21.5")
2424
}
25-
}
25+
}

src/main/java/dev/tizu/headmate/ThisPlugin.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@
99
import dev.tizu.headmate.wand.WandListener;
1010

1111
public class ThisPlugin extends JavaPlugin {
12-
public static ThisPlugin instance;
12+
public static ThisPlugin instance;
1313

14-
@Override
15-
public void onEnable() {
16-
saveResource("config.yml", /* replace */ false);
17-
saveDefaultConfig();
14+
@Override
15+
public void onEnable() {
16+
saveResource("config.yml", /* replace */ false);
17+
saveDefaultConfig();
1818

19-
instance = this;
20-
Bukkit.getPluginManager().registerEvents(new EditorListener(), this);
21-
Bukkit.getPluginManager().registerEvents(new HeadmateMigrators.Listeners(), this);
22-
Bukkit.getPluginManager().registerEvents(new Menu.MenuListener(), this);
23-
Bukkit.getPluginManager().registerEvents(new WandListener(), this);
24-
}
25-
}
19+
instance = this;
20+
Bukkit.getPluginManager().registerEvents(new EditorListener(), this);
21+
Bukkit.getPluginManager().registerEvents(new HeadmateMigrators.Listeners(), this);
22+
Bukkit.getPluginManager().registerEvents(new Menu.MenuListener(), this);
23+
Bukkit.getPluginManager().registerEvents(new WandListener(), this);
24+
}
25+
}

0 commit comments

Comments
 (0)