Skip to content

Commit 51affb2

Browse files
committed
Add README and update project metadata
1 parent 4f99869 commit 51affb2

File tree

4 files changed

+67
-4
lines changed

4 files changed

+67
-4
lines changed

README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# SimpleFabricScoreboard
2+
A lightweight Kotlin module for Minecraft Fabric providing a simple and flexible API for managing scoreboard sideboards.
3+
4+
## Features
5+
- Easy creation and management of scoreboard sideboards.
6+
- Support for dynamic content updates.
7+
- Packet based.
8+
- Integration with Minecraft's native scoreboard system.
9+
- Lightweight and efficient.
10+
- Designed for Fabric modding environment.
11+
- Kotlin-based for modern development practices.
12+
- Good documentation and examples.
13+
- Active maintenance and updates.
14+
- Compatible with the latest Minecraft versions.
15+
- Modular design for easy integration into existing projects.
16+
- Support for multiple sideboards simultaneously.
17+
- User-friendly API for developers of all skill levels.
18+
19+
## Installation
20+
To use SimpleFabricScoreboard in your Fabric mod, add the following dependency to your `build.gradle.kts` file:
21+
```kotlin
22+
//build.gradle.kts
23+
dependencies {
24+
modImplementation("de.hotkeyyy:simplefabricscoreboard:1.0.3")
25+
}
26+
```
27+
28+
## Usage (Kotlin Example)
29+
30+
register a sideboard and set its content:
31+
```kotlin
32+
val board = ScoreboardManager.createScoreboard(
33+
"Test Board",
34+
server,
35+
Text.of("Line 1"),
36+
Text.of("Line 2"),
37+
Text.of("Line 3"),
38+
Text.of("Line 4"),
39+
)
40+
41+
ScoreboardManager.setPlayerScoreboard(player, board)
42+
```
43+
44+
update content dynamically:
45+
```kotlin
46+
board.updateLine(3, Text.of("Updated Line 3"))
47+
```
48+
remove the sideboard from a player:
49+
```kotlin
50+
ScoreboardManager.removePlayerScoreboard(player)
51+
```
52+
remove all sideboards:
53+
```kotlin
54+
ScoreboardManager.clearAllBoards()
55+
```
56+
57+
## Contributing
58+
Issues and pull requests are welcome! Feel free to contribute to the project by submitting bug reports, feature requests, or code contributions.
59+
60+
61+

build.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ configure<PublishingExtension> {
106106

107107
register<MavenPublication>("maven") {
108108
from(components["java"])
109+
artifactId = "${project.property("archives_base_name")}"
109110
pom {
110-
name.set(project.name)
111+
name.set(project.name.lowercase())
111112
description.set(project.description ?: project.name)
112113
url.set("https://github.com/hotkeyyy/simplefabricscoreboard")
113114
licenses {
@@ -141,6 +142,7 @@ configure<PublishingExtension> {
141142
// JReleaser Konfiguration
142143
jreleaser {
143144
project {
145+
name = "simplefabricscoreboard"
144146
description = "A lightweight Kotlin module for Minecraft Fabric providing a simple and flexible API for managing scoreboards."
145147
authors = listOf("Hotkeyyy")
146148
license = "Apache-2.0"

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ yarn_mappings=1.21.5+build.1
77
loader_version=0.17.3
88
kotlin_loader_version=1.13.6+kotlin.2.2.20
99
# Mod Properties
10-
mod_version=1.0.3
10+
mod_version=1.0.4
1111
maven_group=de.hotkeyyy
1212
archives_base_name=simplefabricscoreboard
1313
# Dependencies

src/main/kotlin/de/hotkeyyy/simplefabricscoreboard/scoreboard/ScoreboardManager.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ object ScoreboardManager {
3434
fun createScoreboard(
3535
name: String,
3636
displayName: Text,
37-
vararg lines: Text,
38-
server: net.minecraft.server.MinecraftServer
37+
server: net.minecraft.server.MinecraftServer,
38+
vararg lines: Text
3939
): Simplescoreboard {
4040
val board = Simplescoreboard(name, displayName, server)
4141
board.setLines(*lines)

0 commit comments

Comments
 (0)