-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: switch to helper for creating identifiers * chore: initial work on refactoring external providers * chore: bump minecraft version to 1.21.4 * chore: finish off pronoun provider refactor * fix: require player for /pronouns unset * chore: reformat code * feat: add pronoun length limit (closes #18) and update docs in README
- Loading branch information
1 parent
46e949b
commit bf5117d
Showing
20 changed files
with
626 additions
and
408 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
name: Build | ||
on: [pull_request, push] | ||
on: [ pull_request, push ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
- name: Validate gradle wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
- name: Setup JDK 21 | ||
uses: actions/setup-java@v1 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 21 | ||
distribution: temurin | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v4 | ||
- name: Ensure gradlew is executable | ||
run: chmod +x ./gradlew | ||
|
||
- name: Build with gradle | ||
uses: gradle/gradle-build-action@v2 | ||
with: | ||
arguments: build | ||
run: ./gradlew build | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Artifacts | ||
path: build/libs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
pluginManagement { | ||
repositories { | ||
maven { | ||
name = "FabricMC" | ||
url = uri("https://maven.fabricmc.net/") | ||
} | ||
maven { | ||
name = "Cotton" | ||
url = uri("https://server.bbkr.space/artifactory/libs-release") | ||
} | ||
gradlePluginPortal() | ||
mavenCentral() | ||
} | ||
repositories { | ||
maven { | ||
name = "FabricMC" | ||
url = uri("https://maven.fabricmc.net/") | ||
} | ||
maven { | ||
name = "Cotton" | ||
url = uri("https://server.bbkr.space/artifactory/libs-release") | ||
} | ||
gradlePluginPortal() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
rootProject.name = "player-pronouns" | ||
|
||
dependencyResolutionManagement { | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("libs.versions.toml")) | ||
} | ||
} | ||
versionCatalogs { | ||
create("libs") { | ||
from(files("libs.versions.toml")) | ||
} | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/dev/ashhhleyyy/playerpronouns/api/ExtraPronounProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dev.ashhhleyyy.playerpronouns.api; | ||
|
||
import net.minecraft.text.Text; | ||
import net.minecraft.util.Identifier; | ||
|
||
import java.util.Optional; | ||
import java.util.UUID; | ||
import java.util.concurrent.CompletableFuture; | ||
|
||
/** | ||
* A provider that can add extra pronouns for a user based on remote data. | ||
*/ | ||
public interface ExtraPronounProvider { | ||
CompletableFuture<Optional<String>> provideExtras(UUID playerId); | ||
|
||
Identifier getId(); | ||
|
||
Text getName(); | ||
|
||
boolean enabled(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.