Skip to content

Commit

Permalink
Rename methods to be more correct and consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
esotericenderman committed Jul 28, 2024
1 parent ab22b44 commit bd7468e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ fun capitaliseFirstLetter(string: String): String {
return string.first().uppercase() + string.slice(IntRange(1, string.length - 1))
}

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

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

val splitString = kebabCaseString.split("-")
Expand All @@ -29,7 +29,7 @@ fun pascalCase(kebabCaseString: String): String {

val author = "Slqmy"

group = "net." + author.lowercase() + "." + underscoreCase(rootProject.name)
group = "net." + author.lowercase() + "." + snakecase(rootProject.name)
version = "1.0.0-SNAPSHOT"
description = "Test plugin for paperweight-userdev"

Expand Down Expand Up @@ -83,7 +83,7 @@ tasks {
// Configure plugin.yml generation
// - name, version, and description are inherited from the Gradle project.
bukkitPluginYaml {
main = project.group.toString() + "." + pascalCase(rootProject.name)
main = project.group.toString() + "." + pascalcase(rootProject.name)
load = BukkitPluginYaml.PluginLoadOrder.STARTUP
authors.add(author)
apiVersion = paperApiVersion
Expand Down

0 comments on commit bd7468e

Please sign in to comment.