Skip to content

Commit

Permalink
minor config adjustments, gitignore changes, github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bierdosenhalter committed Nov 21, 2024
1 parent cd05840 commit 1aafe92
Show file tree
Hide file tree
Showing 6 changed files with 214 additions and 59 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:

- package-ecosystem: "gradle"
directory: "/"
schedule:
interval: "daily"
assignees:
- "crayne"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
assignees:
- "crayne"
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: release

on:
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
steps:

- name: Git
uses: actions/checkout@v4

- name: Java
uses: actions/[email protected]
with:
java-version: '21'
distribution: 'temurin'
check-latest: true

- name: Cache
uses: actions/[email protected]
with:
path: ~/.m2
key: '${{ runner.os }}-m2-${{ hashFiles(''**/pom.xml'') }}'
restore-keys: '${{ runner.os }}-m2'

- name: Package
run: mvn --batch-mode --show-version --errors package --file pom.xml

- name: Draft
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: 'automated release at commit ${{ github.sha }}'
draft: false
prerelease: false

- name: Release
uses: csexton/release-asset-action@v3
with:
pattern: "target/AntiIllegals-*.jar"
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ steps.create_release.outputs.upload_url }}
145 changes: 110 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,38 +1,113 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/

### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
# User-specific stuff
.idea/

*.iml
*.ipr
*.iws

# IntelliJ
out/

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

target/

pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next

release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
.mvn/wrapper/maven-wrapper.jar
.flattened-pom.xml

### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/

### VS Code ###
.vscode/

### Mac OS ###
.DS_Store
# Common working directory
run/
25 changes: 19 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@
<modelVersion>4.0.0</modelVersion>

<groupId>org.crayne</groupId>
<artifactId>metacolor</artifactId>
<version>1.0-SNAPSHOT</version>
<artifactId>MetaColor</artifactId>
<version>1.0.1-SNAPSHOT</version>

<description>Name coloring plugin, inspired by 0b0t's playtime name color feature, rewards users with extra name
colors depending on their joining date and playtime.
</description>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<java.version>21</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<minecraft.version>1.20.1</minecraft.version>
</properties>

<repositories>
Expand All @@ -34,13 +40,13 @@
<dependency>
<groupId>io.papermc.paper</groupId>
<artifactId>paper-api</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<version>${minecraft.version}-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot-api</artifactId>
<version>1.19.4-R0.1-SNAPSHOT</version>
<version>${minecraft.version}-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand All @@ -54,6 +60,13 @@
<artifactId>jcabi-aspects</artifactId>
<version>0.25.1</version>
</dependency>
<dependency>
<groupId>org.zeroBzeroT</groupId>
<artifactId>DonationAPI</artifactId>
<version>1.0.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/DonationAPI-1.0.2.jar</systemPath>
</dependency>
</dependencies>

</project>
29 changes: 14 additions & 15 deletions src/main/resources/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,29 @@ playtime_joindate_requirements:
- "flag=-1,-1"

# colors:
- "dark_red=768,730"
- "red=96,91"
- "gray=0,0"
- "white=3,3"
- "green=6,6"
- "blue=12,11"
- "dark_purple=24,23"
- "gold=48,46"
- "red=96,91"
- "yellow=192,183"
- "dark_green=-1,-1"
- "green=6,6"
- "aqua=384,365"
- "dark_aqua=-1,-1"
- "dark_blue=-1,-1"
- "blue=12,11"
- "dark_gray=768,730"
- "dark_green=1536,1460"
- "dark_blue=2304,2190"
- "dark_red=3072,2920"
- "dark_aqua=3840,3650"

- "light_purple=-1,-1"
- "dark_purple=24,23"
- "white=3,3"
- "gray=0,0"
- "dark_gray=1536,1460"
- "black=-1,-1"

# text decorations:
- "bold=384,365"
- "underlined=-1,-1"
- "italic=1536,1460"

- "underlined=-1,-1"
- "strikethrough=-1,-1"
- "obfuscated=-1,-1"

Expand All @@ -86,9 +88,6 @@ playtime_joindate_requirements:
whitelists:
donators:
color_palette:
- "dark_aqua"
- "dark_blue"
- "dark_green"
- "light_purple"

# whitelisted_users are automatically handled using the DonationAPI
Expand Down
8 changes: 5 additions & 3 deletions src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
main: org.crayne.ptjdnc.NameColorPlugin
name: PTJDNC
version: 1.0
api-version: 1.19
description: "namecolor plugin inspired by 0b0t playtime namecolor for newer minecraft versions"
version: ${project.version}
api-version: 1.20
description: ${project.description}
authors: [ crayne, bierdosenhalter ]
depend: [ DonationAPI ]

commands:
namecolor:
Expand Down

0 comments on commit 1aafe92

Please sign in to comment.