Skip to content

Commit

Permalink
Merge pull request #606 from Shynixn/development
Browse files Browse the repository at this point in the history
Merge changes to master --release
  • Loading branch information
Shynixn authored Jan 31, 2025
2 parents ea8c7bc + d3ac372 commit 69e5754
Show file tree
Hide file tree
Showing 19 changed files with 299 additions and 85 deletions.
33 changes: 16 additions & 17 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ plugins {
}

group = "com.github.shynixn"
version = "7.11.1"
version = "7.12.0"

repositories {
mavenLocal()
mavenCentral()
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven(System.getenv("SHYNIXN_MCUTILS_REPOSITORY")) // All MCUTILS libraries are private and not OpenSource.
maven(System.getenv("SHYNIXN_MCUTILS_REPOSITORY_2025")) // All MCUTILS libraries are private and not OpenSource.
}

Expand All @@ -33,10 +32,10 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2")

// Custom dependencies
implementation("com.github.shynixn.mcutils:common:2025.1")
implementation("com.github.shynixn.mcutils:packet:2025.1")
implementation("com.github.shynixn.mcutils:database:2024.8")
implementation("com.github.shynixn.mcutils:sign:2024.3")
implementation("com.github.shynixn.mcutils:common:2025.4")
implementation("com.github.shynixn.mcutils:packet:2025.3")
implementation("com.github.shynixn.mcutils:database:2025.2")
implementation("com.github.shynixn.mcutils:sign:2025.1")
}

tasks.withType<KotlinCompile> {
Expand All @@ -53,7 +52,7 @@ java {
*/
tasks.withType<ShadowJar> {
dependsOn("jar")
archiveName = "${baseName}-${version}-shadowjar.${extension}"
archiveFileName.set("${archiveBaseName.get()}-${archiveVersion.get()}-shadowjar.${archiveExtension.get()}")
exclude("DebugProbesKt.bin")
exclude("module-info.class")
}
Expand All @@ -72,8 +71,8 @@ tasks.register("pluginJars") {
*/
tasks.register("relocatePluginJar", ShadowJar::class.java) {
dependsOn("shadowJar")
from(zipTree(File("./build/libs/" + (tasks.getByName("shadowJar") as Jar).archiveName)))
archiveName = "${baseName}-${version}-relocate.${extension}"
from(zipTree(File("./build/libs/" + (tasks.getByName("shadowJar") as Jar).archiveFileName.get())))
archiveFileName.set("${archiveBaseName.get()}-${archiveVersion.get()}-relocate.${archiveExtension.get()}")
relocate("org.bstats", "com.github.shynixn.blockball.lib.org.bstats")
relocate("com.fasterxml", "com.github.shynixn.blockball.lib.com.fasterxml")
relocate("com.github.shynixn.mcutils", "com.github.shynixn.blockball.lib.com.github.shynixn.mcutils")
Expand All @@ -84,8 +83,8 @@ tasks.register("relocatePluginJar", ShadowJar::class.java) {
*/
tasks.register("pluginJarLatest", ShadowJar::class.java) {
dependsOn("relocatePluginJar")
from(zipTree(File("./build/libs/" + (tasks.getByName("relocatePluginJar") as Jar).archiveName)))
archiveName = "${baseName}-${version}-latest.${extension}"
from(zipTree(File("./build/libs/" + (tasks.getByName("relocatePluginJar") as Jar).archiveFileName.get())))
archiveFileName.set("${archiveBaseName.get()}-${archiveVersion.get()}-latest.${archiveExtension.get()}")
// destinationDir = File("C:\\temp\\plugins")

exclude("com/github/shynixn/blockball/lib/com/github/shynixn/mcutils/packet/nms/v1_8_R3/**")
Expand Down Expand Up @@ -140,8 +139,8 @@ tasks.register("pluginJarPremium", com.github.jengelman.gradle.plugins.shadow.ta
*/
tasks.register("relocateLegacyPluginJar", ShadowJar::class.java) {
dependsOn("shadowJar")
from(zipTree(File("./build/libs/" + (tasks.getByName("shadowJar") as Jar).archiveName)))
archiveName = "${baseName}-${version}-legacy-relocate.${extension}"
from(zipTree(File("./build/libs/" + (tasks.getByName("shadowJar") as Jar).archiveFileName.get())))
archiveFileName.set("${archiveBaseName.get()}-${archiveVersion.get()}-legacy-relocate.${archiveExtension.get()}")
relocate("kotlin", "com.github.shynixn.blockball.lib.kotlin")
relocate("kotlinx", "com.github.shynixn.blockball.lib.kotlinx")
relocate("org.intellij", "com.github.shynixn.blockball.lib.org.intelli")
Expand Down Expand Up @@ -169,8 +168,8 @@ tasks.register("relocateLegacyPluginJar", ShadowJar::class.java) {
*/
tasks.register("pluginJarLegacy", ShadowJar::class.java) {
dependsOn("relocateLegacyPluginJar")
from(zipTree(File("./build/libs/" + (tasks.getByName("relocateLegacyPluginJar") as Jar).archiveName)))
archiveName = "${baseName}-${version}-legacy.${extension}"
from(zipTree(File("./build/libs/" + (tasks.getByName("relocateLegacyPluginJar") as Jar).archiveFileName.get())))
archiveFileName.set("${archiveBaseName.get()}-${archiveVersion.get()}-legacy.${archiveExtension.get()}")
// destinationDir = File("C:\\temp\\plugins")
exclude("com/github/shynixn/mcutils/**")
exclude("com/github/shynixn/mccoroutine/**")
Expand Down Expand Up @@ -223,11 +222,11 @@ tasks.register("languageFile") {
implContents.add(" override val names: List<String>\n" +
" get() = listOf(\"en_us\", \"es_es\", \"zh_cn\")")

for (i in 0 until lines.size) {
for (i in lines.indices) {
val key = lines[i]

if (key.toCharArray()[0].isLetter()) {
var text = ""
var text: String

var j = i
while (true){
Expand Down
10 changes: 9 additions & 1 deletion docs/wiki/docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,19 @@ Transitions the game to the final period. Executing this command again stops it.
### /blockball referee setball

```
/blockball referee setball
/blockball referee setball [x] [y] [z] [yaw] [pitch] [world]
```

Teleports the ball to the position of the referee.

### /blockball referee setballrel

```
/blockball referee setballrel [forward] [sideward]
```

Teleports the ball to the relative position of the referee.

### /blockball referee whistleresume

```
Expand Down
67 changes: 37 additions & 30 deletions docs/wiki/docs/placeholders.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,50 @@ The following placeholders are available in BlockBall and can also be used via P
or ``%blockball_game_blueScore_mygame%``. This is only relevant in external plugins. For placeholders in BlockBall, you
can directly use the placeholders below.

| Game Context Placeholders | Description |
|------------------------------------|---------------------------------------------------------------------------------------------------------------|
| %blockball_game_name% | Id of the game |
| %blockball_game_displayName% | DisplayName of the game |
| %blockball_game_maxPlayers% | Max amount of players who can join this game |
| %blockball_game_players% | Current amount of players in this game |
| %blockball_game_redScore% | Score of the red team |
| %blockball_game_redPlayers% | Amount of players who are currently in the red team |
| %blockball_game_redMaxPlayers% | Max amount of players who can join the red team |
| %blockball_game_blueScore% | Score of the blue team |
| %blockball_game_bluePlayers% | Amount of players who are currently in the blue team |
| %blockball_game_blueMaxPlayers% | Max amount of players who can join the blue team |
| %blockball_game_time% | Remaining time until the match ends |
| %blockball_game_lastHitPlayerName% | Name of the player who was the last one to hit the ball, returns an empty text if no one has hit the ball yet |
| %blockball_game_lastHitPlayerTeam% | DisplayName of the team of the player who was the last one to hit the ball. |
| %blockball_game_state% | Returns JOINABLE,RUNNING,DISABLED |
| %blockball_game_stateDisplayName% | Returns the state color formatted from the language file |
| %blockball_game_isEnabled% | true if the game is enabled, false if not |
| %blockball_game_isJoinAble% | true if the game is joinable, false if not |
| %blockball_game_remainingPlayers% | Remaining amount of players required to start a match in minigame mode |
| Game Context Placeholders | Description |
|-------------------------------------|---------------------------------------------------------------------------------------------------------------|
| %blockball_game_name% | Id of the game |
| %blockball_game_displayName% | DisplayName of the game |
| %blockball_game_maxPlayers% | Max amount of players who can join this game |
| %blockball_game_players% | Current amount of players in this game |
| %blockball_game_redDisplayName% | Name of team red |
| %blockball_game_redScore% | Score of the red team |
| %blockball_game_redPlayers% | Amount of players who are currently in the red team |
| %blockball_game_redMaxPlayers% | Max amount of players who can join the red team |
| %blockball_game_blueDisplayName% | Name of team blue |
| %blockball_game_blueScore% | Score of the blue team |
| %blockball_game_bluePlayers% | Amount of players who are currently in the blue team |
| %blockball_game_blueMaxPlayers% | Max amount of players who can join the blue team |
| %blockball_game_time% | Remaining time until the match ends |
| %blockball_game_lastHitPlayerName% | Name of the player who was the last one to hit the ball, returns an empty text if no one has hit the ball yet |
| %blockball_game_lastHitPlayerTeam% | DisplayName of the team of the player who was the last one to hit the ball. |
| %blockball_game_state% | Returns JOINABLE,RUNNING,DISABLED |
| %blockball_game_stateDisplayName% | Returns the state color formatted from the language file |
| %blockball_game_isEnabled% | true if the game is enabled, false if not |
| %blockball_game_isJoinAble% | true if the game is joinable, false if not |
| %blockball_game_remainingPlayers% | Remaining amount of players required to start a match in minigame mode |
| %blockball_game_refereeDisplayName% | Name of team referee |

| Player Context Placeholders | Description |
|---------------------------------|----------------------------------------------------------------|
| %blockball_player_name% | Name of the player during a BlockBall event e.g. scoring goal |
| %blockball_player_team% | Name of the team the player is currently in: red, blue |
| %blockball_player_isInGame% | true if the player is in a game, false if not |
| %blockball_player_isInTeamRed% | true if the player is in a game and in team red, false if not |
| %blockball_player_isInTeamBlue% | true if the player is in a game and in team blue, false if not |
| Player Context Placeholders | Description |
|------------------------------------|----------------------------------------------------------------|
| %blockball_player_name% | Name of the player during a BlockBall event e.g. scoring goal |
| %blockball_player_team% | Name of the team the player is currently in: red, blue |
| %blockball_player_teamDisplayName% | Display name of the team the player is currently in. |
| %blockball_player_isInGame% | true if the player is in a game, false if not |
| %blockball_player_isInTeamRed% | true if the player is in a game and in team red, false if not |
| %blockball_player_isInTeamBlue% | true if the player is in a game and in team blue, false if not |

| Stats Placeholders (Patreon Only) | Description |
|------------------------------------------|-----------------------------------------------------------------------------------|
| %blockball_player_goals% | Amount of goals a player has scored |
| %blockball_player_goalsFull% | Amount of goals a player has scored by playing full games. |
| %blockball_player_goalsCurrent% | Amount of goals a player has scored during the current game. |
| %blockball_player_ownGoals% | Amount of own goals a player has scored |
| %blockball_player_ownGoalsFull% | Amount of own goals a player has scored by playing full games. |
| %blockball_player_ownGoalsCurrent% | Amount of own goals a player has scored during the current game. |
| %blockball_player_totalGoals% | Amount of goals and own goals a player has scored |
| %blockball_player_totalGoalsFull% | Amount of goals and own goals a player has scored by playing full games. |
| %blockball_player_totalGoalsCurrent% | Amount of goals and own goals a player has scored during the current game. |
| %blockball_player_games% | Amount of games a player has started playing |
| %blockball_player_gamesFull% | Amount of games a player has fully played |
| %blockball_player_wins% | Amount of wins a player has got by playing |
Expand All @@ -63,9 +70,9 @@ The following placeholders are available in BlockBall and can also be used via P
!!! note "LeaderBoard"
Replace **top_1** with **top_2** or **top_3** etc. to build a leaderboard.

| LeaderBoard Placeholders (Patreon Only) | Description |
|----------------------------------------------------|----------------------------------------------------------------------------------------------|
| %blockball_leaderboard_goals_name_top_1% | The name of the player which has the most amount of scored goals |
| LeaderBoard Placeholders (Patreon Only) | Description |
|---------------------------------------------------------|----------------------------------------------------------------------------------------------|
| %blockball_leaderboard_goals_name_top_1% | The name of the player which has the most amount of scored goals |
| %blockball_leaderboard_goals_value_top_1% | The most amount of scored goals |
| %blockball_leaderboard_goalsFull_name_top_1% | The name of the player which has the most amount of scored goals by playing full games |
| %blockball_leaderboard_goalsFull_value_top_1% | The most amount of scored goals by playing full games |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.github.shynixn.mcutils.common.sound.SoundServiceImpl
import com.github.shynixn.mcutils.database.api.CachePlayerRepository
import com.github.shynixn.mcutils.database.api.PlayerDataRepository
import com.github.shynixn.mcutils.database.impl.AutoSavePlayerDataRepositoryImpl
import com.github.shynixn.mcutils.database.impl.CachePlayerDataRepositoryImpl
import com.github.shynixn.mcutils.database.impl.CachedPlayerDataRepositoryImpl
import com.github.shynixn.mcutils.database.impl.ConfigSelectedRepositoryImpl
import com.github.shynixn.mcutils.packet.api.PacketService
import com.github.shynixn.mcutils.packet.api.RayTracingService
Expand Down Expand Up @@ -84,7 +84,7 @@ class BlockBallDependencyInjectionModule(
)
val playerDataRepository = AutoSavePlayerDataRepositoryImpl(
1000 * 60L * plugin.config.getInt("database.autoSaveIntervalMinutes"),
CachePlayerDataRepositoryImpl(configSelectedPlayerDataRepository, plugin.minecraftDispatcher),
CachedPlayerDataRepositoryImpl(configSelectedPlayerDataRepository, plugin.minecraftDispatcher),
plugin.scope, plugin.minecraftDispatcher
)
module.addService<PlayerDataRepository<PlayerInformation>>(playerDataRepository)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,8 @@ class BlockBallLanguageImpl : BlockBallLanguage {
override var playerNotFoundMessage = LanguageItem("&0&l[&f&lBlockBall&0&l]&c Player %1$1s not found.")

override var queueTimeOutMessage = LanguageItem("&0&l[&f&lBlockBall&0&l]&c Not enough players joined in time to start the game.")

override var cannotParseNumberMessage = LanguageItem("&0&l[&f&lBlockBall&0&l]&c Cannot parse number.")

override var cannotParseWorldMessage = LanguageItem("&0&l[&f&lBlockBall&0&l]&c Cannot find world.")
}
Original file line number Diff line number Diff line change
Expand Up @@ -187,4 +187,8 @@ interface BlockBallLanguage : LanguageProvider {
var playerNotFoundMessage: LanguageItem

var queueTimeOutMessage: LanguageItem

var cannotParseNumberMessage: LanguageItem

var cannotParseWorldMessage: LanguageItem
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ class ArenaMeta {
soundMetaKick.name = "ENTITY_ZOMBIE_ATTACK_WOODEN_DOOR,ENTITY_ZOMBIE_ATTACK_DOOR_WOOD,ZOMBIE_WOOD"
soundMetaKick.volume = 10.0
soundMetaKick.pitch = 1.5

blueTeamMeta.displayName = "&9Team Blue"
redTeamMeta.displayName = "&cTeam Red"
refereeTeamMeta.displayName = "&fTeam Referee"
ballMeta.soundEffects[BallActionType.ONKICK] = soundMetaKick
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class BossBarMeta {
/** Is bossbar visible. */
var enabled: Boolean = true
/** Displaying message. */
var message: String = "&cTeam Red %blockball_game_redScore% : &9%blockball_game_blueScore% Team Blue"
var message: String = "%blockball_game_redDisplayName% %blockball_game_redScore% : &9%blockball_game_blueScore% %blockball_game_blueDisplayName%"
/** Percentage filled in the bossbar. */
var percentage: Double = 100.0
/** Style of the bossbar. */
Expand Down
Loading

0 comments on commit 69e5754

Please sign in to comment.