Skip to content

Commit

Permalink
Merge pull request #210 from Arckenver/feat/3.0-papermc
Browse files Browse the repository at this point in the history
feat: complete rewrite for papermc
  • Loading branch information
Arckenver authored Dec 22, 2024
2 parents 824ae3d + 22cec78 commit 63b7b73
Show file tree
Hide file tree
Showing 224 changed files with 6,517 additions and 12,088 deletions.
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

25 changes: 19 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
build
.gradle
.settings
bin
.classpath
**/build/
!src/**/build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Avoid ignore Gradle wrappper properties
!gradle-wrapper.properties

# Cache of project
.gradletasknamecache

# Eclipse Gradle plugin generated files
# Eclipse Core
.project
.idea
/.nb-gradle/
# JDT-specific (Eclipse Java Development Tools)
.classpath
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
# Nations

*See the [official sponge forums thread](https://forums.spongepowered.org/t/nations-v0-1-towny-like-protection-plugin/12127).*
11 changes: 0 additions & 11 deletions build.gradle

This file was deleted.

105 changes: 105 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import io.papermc.paperweight.userdev.ReobfArtifactConfiguration
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription

plugins {
kotlin("jvm") version "2.1.0"
kotlin("plugin.serialization") version "2.0.0"
id("io.papermc.paperweight.userdev") version "1.7.7"
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
}

group = "com.arckenver"
version = "3.0-SNAPSHOT"

paperweight.reobfArtifactConfiguration = ReobfArtifactConfiguration.MOJANG_PRODUCTION

repositories {
mavenCentral()
maven {
url = uri("https://jitpack.io")
}
}

dependencies {
compileOnly(kotlin("stdlib"))
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
implementation("com.cronutils:cron-utils:9.2.0")

paperweight.paperDevBundle("1.21.4-R0.1-SNAPSHOT")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
compileOnly("com.github.ElgarL:groupmanager:3.2")
compileOnly("xyz.jpenilla:squaremap-api:1.3.3")
implementation("net.kyori:adventure-platform-bukkit:4.3.4")
implementation("net.kyori:adventure-text-serializer-legacy:4.17.0")
implementation("net.kyori:adventure-text-serializer-gson:4.17.0")

testImplementation(kotlin("test"))
testImplementation("se.lovef:kotlin-assert-utils:0.10.1")
}

bukkit {
main = "com.arckenver.nations.bukkit.NationsPlugin"
apiVersion = "1.21"
authors = listOf("Arckenver")
website = "https://github.com/Arckenver/Nations"
depend = listOf("Vault")
commands {
register("nation") {
description = ""
aliases = listOf("n")
permission = "nations.command.nation"
usage = ""
}
register("zone") {
description = ""
aliases = listOf("z")
permission = "nations.command.zone"
usage = ""
}
register("nationadmin") {
description = ""
aliases = listOf("na")
permission = "nations.command.nationadmin"
usage = ""
}
}
permissions {
register("nations.command.nation") {
description = "Allows using all nation commands"
default = BukkitPluginDescription.Permission.Default.TRUE
}
register("nations.command.zone") {
description = "Allows using all zone commands"
default = BukkitPluginDescription.Permission.Default.TRUE
}
register("nations.command.nationadmin") {
description = "Allows using all nationadmin commands"
default = BukkitPluginDescription.Permission.Default.OP
}
register("nations.admin.bypass.build") {
description = "Allows bypassing build protection on all territories"
default = BukkitPluginDescription.Permission.Default.OP
}
register("nations.admin.bypass.interact") {
description = "Allows bypassing interaction protection on all territories"
default = BukkitPluginDescription.Permission.Default.OP
}
}
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}

tasks.named<Jar>("jar") {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(configurations.runtimeClasspath.get().map {
if (it.isDirectory) it else zipTree(it)
})
}

tasks.named<Test>("test") {
useJUnitPlatform()
}
2 changes: 2 additions & 0 deletions debug/spigot/spigot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
settings:
restart-on-crash: false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Wed Nov 16 14:16:13 NZDT 2016
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.13-all.zip
Loading

0 comments on commit 63b7b73

Please sign in to comment.