Skip to content

Commit 69714fd

Browse files
Some refactoring
* Update to 1.21.11 * Paper plugin * Update CommandAPI * Use new translator
1 parent 5cd22de commit 69714fd

18 files changed

+503
-275
lines changed

.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ build/
66
!**/src/test/**/build/
77

88
### IntelliJ IDEA ###
9-
.idea/modules.xml
10-
.idea/jarRepositories.xml
11-
.idea/compiler.xml
12-
.idea/libraries/
9+
.idea/
1310
*.iws
1411
*.iml
1512
*.ipr

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.3

build.gradle.kts

Lines changed: 73 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,84 @@
1+
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
2+
import net.minecrell.pluginyml.paper.PaperPluginDescription
3+
14
plugins {
25
id("java-library")
3-
id("xyz.jpenilla.run-paper") version "2.1.0" // Adds runServer and runMojangMappedServer tasks for testing
46
id("maven-publish")
5-
id("com.github.johnrengelman.shadow") version "8.1.1"
7+
id("xyz.jpenilla.run-paper") version "3.0.2"
8+
id("com.gradleup.shadow") version "9.3.1"
9+
id("de.eldoria.plugin-yml.paper") version "0.8.0"
610
}
711

812
group = "de.oliver"
913
description = "Economy plugin"
10-
version = "1.0.3"
11-
val mcVersion = "1.20.4"
14+
version = getFEVersion()
1215

1316
repositories {
1417
mavenLocal()
1518
mavenCentral()
16-
maven("https://repo.codemc.org/repository/maven-public/")
19+
maven (url = "https://maven.fancyspaces.net/fancyinnovations/releases")
20+
maven (url = "https://maven.fancyspaces.net/fancyinnovations/snapshots")
21+
maven(url = "https://repo.fancyinnovations.com/snapshots")
22+
maven(url = "https://repo.fancyinnovations.com/releases")
1723
maven("https://repo.papermc.io/repository/maven-public/")
18-
maven("https://jitpack.io")
24+
maven("https://repo.codemc.org/repository/maven-public/")
1925
maven("https://repo.alessiodp.com/releases/")
2026
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
21-
maven("https://repo.fancyplugins.de/releases/")
27+
maven("https://nexus.hc.to/content/repositories/pub_releases")
2228
}
2329

2430
dependencies {
25-
compileOnly("io.papermc.paper:paper-api:$mcVersion-R0.1-SNAPSHOT")
31+
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
2632

27-
implementation("de.oliver:FancyLib:1.0.5")
33+
implementation("de.oliver:FancyLib:38")
34+
implementation("de.oliver:config:1.0.1")
35+
implementation("de.oliver.FancyAnalytics:java-sdk:0.0.6")
36+
implementation("de.oliver.FancyAnalytics:mc-api:0.1.13")
37+
implementation("de.oliver.FancyAnalytics:logger:0.0.8")
2838

29-
compileOnly("com.github.MilkBowl:VaultAPI:1.7.1")
39+
compileOnly("net.milkbowl.vault:VaultAPI:1.7")
3040

3141
compileOnly("me.clip:placeholderapi:2.11.5")
3242

33-
val commandapiVersion = "9.3.0"
34-
implementation("dev.jorel:commandapi-bukkit-shade:$commandapiVersion")
35-
compileOnly("dev.jorel:commandapi-annotations:$commandapiVersion")
36-
annotationProcessor("dev.jorel:commandapi-annotations:$commandapiVersion")
43+
val commandapiVersion = "11.1.0"
44+
implementation("dev.jorel:commandapi-paper-shade:$commandapiVersion")
45+
compileOnly("dev.jorel:commandapi-paper-annotations:$commandapiVersion")
46+
annotationProcessor("dev.jorel:commandapi-paper-annotations:$commandapiVersion")
47+
48+
implementation("io.github.revxrsal:lamp.common:4.0.0-rc.12")
49+
implementation("io.github.revxrsal:lamp.bukkit:4.0.0-rc.12")
50+
}
51+
52+
paper {
53+
name = "FancyEconomy"
54+
main = "de.oliver.fancyeconomy.FancyEconomy"
55+
bootstrapper = "de.oliver.fancyeconomy.FancyEconomyBootstrapper"
56+
loader = "de.oliver.fancyeconomy.FancyEconomyLoader"
57+
foliaSupported = true
58+
version = getFEVersion()
59+
description = "Simple and lightweight economy plugin with support for multiple currencies and a powerful API"
60+
apiVersion = "1.19"
61+
load = BukkitPluginDescription.PluginLoadOrder.POSTWORLD
62+
serverDependencies {
63+
register("Vault") {
64+
required = false
65+
load = PaperPluginDescription.RelativeLoadOrder.BEFORE
66+
}
67+
register("PlaceholderAPI") {
68+
required = false
69+
load = PaperPluginDescription.RelativeLoadOrder.BEFORE
70+
}
71+
}
72+
hasOpenClassloader = true
3773
}
3874

3975
java {
40-
toolchain.languageVersion.set(JavaLanguageVersion.of(17))
76+
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
4177
}
4278

4379
tasks {
4480
runServer {
45-
minecraftVersion(mcVersion)
81+
minecraftVersion("1.21.11")
4682
}
4783

4884
shadowJar {
@@ -54,7 +90,7 @@ tasks {
5490
repositories {
5591
maven {
5692
name = "fancypluginsReleases"
57-
url = uri("https://repo.fancyplugins.de/releases")
93+
url = uri("https://repo.fancyinnovations.com/releases")
5894
credentials(PasswordCredentials::class)
5995
authentication {
6096
isAllowInsecureProtocol = true
@@ -64,7 +100,7 @@ tasks {
64100

65101
maven {
66102
name = "fancypluginsSnapshots"
67-
url = uri("https://repo.fancyplugins.de/snapshots")
103+
url = uri("https://repo.fancyinnovations.com/snapshots")
68104
credentials(PasswordCredentials::class)
69105
authentication {
70106
isAllowInsecureProtocol = true
@@ -76,7 +112,7 @@ tasks {
76112
create<MavenPublication>("maven") {
77113
groupId = project.group.toString()
78114
artifactId = project.name
79-
version = project.version.toString()
115+
version = getFEVersion()
80116
from(project.components["java"])
81117
}
82118
}
@@ -91,20 +127,34 @@ tasks {
91127

92128
// Set the release flag. This configures what version bytecode the compiler will emit, as well as what JDK APIs are usable.
93129
// See https://openjdk.java.net/jeps/247 for more information.
94-
options.release.set(17)
130+
options.release.set(21)
95131
}
96132
javadoc {
97133
options.encoding = Charsets.UTF_8.name() // We want UTF-8 for everything
98134
}
99135
processResources {
100136
filteringCharset = Charsets.UTF_8.name() // We want UTF-8 for everything
137+
101138
val props = mapOf(
102-
"version" to project.version,
103139
"description" to project.description,
140+
"version" to getFEVersion(),
141+
"commit_hash" to "",
142+
"channel" to (System.getenv("RELEASE_CHANNEL") ?: "").ifEmpty { "undefined" },
143+
"platform" to (System.getenv("RELEASE_PLATFORM") ?: "").ifEmpty { "undefined" }
104144
)
145+
105146
inputs.properties(props)
106-
filesMatching("plugin.yml") {
147+
148+
filesMatching("paper-plugin.yml") {
149+
expand(props)
150+
}
151+
152+
filesMatching("version.yml") {
107153
expand(props)
108154
}
109155
}
110-
}
156+
}
157+
158+
fun getFEVersion(): String {
159+
return file("VERSION").readText()
160+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Sun May 07 19:18:42 CEST 2023
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)