Skip to content

Commit

Permalink
Fix project name
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Jul 28, 2024
1 parent 29411fb commit ab22b44
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,24 @@ plugins {
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.1.1" // Generates plugin.yml based on the Gradle config
}

fun underscoreCase(string: String): String {
return string.lowercase().replace(' ', '_')
fun capitaliseFirstLetter(string: String): String {
return string.first().uppercase() + string.slice(IntRange(1, string.length - 1))
}

fun pascalCase(string: String): String {
return string.replace(" ", "")
fun underscoreCase(kebabCaseString: String): String {
return kebabCaseString.lowercase().replace('-', '_')
}

fun pascalCase(kebabCaseString: String): String {
var pascalCaseString = ""

val splitString = kebabCaseString.split("-")

for (part in splitString) {
pascalCaseString += capitaliseFirstLetter(part)
}

return pascalCaseString
}

val author = "Slqmy"
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
}

rootProject.name = "Template Paper Plugin"
rootProject.name = "template-paper-plugin"

0 comments on commit ab22b44

Please sign in to comment.