-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.gradle.kts
193 lines (180 loc) · 7.78 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription.Permission.Default
plugins {
java
id("net.minecrell.plugin-yml.bukkit") version "0.6.0"
id("io.github.goooler.shadow") version "8.1.8"
id("xyz.jpenilla.run-paper") version "2.3.0"
}
group = "de.skyslycer"
version = "1.5.1"
val shadePattern = "$group.hmcwraps.shade"
repositories {
mavenCentral()
maven("https://repo.skyslycer.de/jitpack")
maven("https://repo.skyslycer.de/mirrors")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://oss.sonatype.org/content/groups/public")
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
maven("https://repo.dmulloy2.net/repository/public/")
maven("https://repo.codemc.io/repository/maven-snapshots/")
maven("https://repo.bytecode.space/repository/maven-public/")
maven("https://mvn.lumine.io/repository/maven-public/")
maven("https://repo.codemc.io/repository/maven-public/")
maven("https://repo.triumphteam.dev/snapshots")
maven("https://repo.nexomc.com/snapshots/")
}
dependencies {
implementation(project(":api"))
implementation(libs.packets)
implementation(libs.bundles.adventure)
implementation(libs.configupdater)
implementation(libs.bundles.lamp)
implementation(libs.bstats)
implementation(libs.particles)
implementation(libs.gui)
implementation(libs.nbtapi)
implementation(libs.folialib)
implementation(libs.configurate) {
exclude("org.yaml")
}
implementation(libs.mclogs) {
exclude("com.google.code.gson")
}
compileOnly(depends.spigot)
compileOnly(depends.placeholderapi)
compileOnly(depends.nexo)
compileOnly(depends.oraxen)
compileOnly(depends.itemsadder)
compileOnly(depends.mythicmobs)
}
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
tasks {
shadowJar {
relocate("net.kyori", "$shadePattern.kyori")
relocate("com.bgsoftware.common.config", "$shadePattern.configupdater")
relocate("revxrsal.commands", "$shadePattern.commands")
relocate("dev.triumphteam.gui", "$shadePattern.gui")
relocate("org.spongepowered.configurate", "$shadePattern.config")
relocate("com.github.retrooper.packetevents", "$shadePattern.packets")
relocate("io.github.retrooper.packetevents", "$shadePattern.packets.io")
relocate("org.bstats", "$shadePattern.bstats")
relocate("com.owen1212055.particlehelper", "$shadePattern.particlehelper")
relocate("de.tr7zw.changeme.nbtapi", "$shadePattern.nbtapi")
relocate("kotlin", "$shadePattern.kotlin")
relocate("gs.mclo.java", "$shadePattern.mclogs")
relocate("org.intellij", "$shadePattern.annotations")
relocate("org.jetbrains", "$shadePattern.annotations")
relocate("io.leangen", "$shadePattern.leangen")
relocate("com.tcoded.folialib", "$shadePattern.folialib")
exclude("com/google/**")
//exclude("assets/mappings/block/**")
//exclude("assets/mappings/particle/**")
//exclude("assets/mappings/potion/**")
exclude("lamp_pt.properties")
exclude("lamp_it.properties")
exclude("lamp_fr.properties")
exclude("lamp-bukkit_pt.properties")
exclude("lamp-bukkit_it.properties")
exclude("lamp-bukkit_fr.properties")
archiveClassifier.set("")
minimize {
exclude(dependency("com.tcoded:FoliaLib:.*"))
}
}
build {
dependsOn(shadowJar)
}
compileJava {
options.compilerArgs.add("-parameters")
options.encoding = "UTF-8"
options.isFork = true
options.release = 21
}
runServer {
minecraftVersion("1.21.1")
}
}
bukkit {
main = "de.skyslycer.hmcwraps.HMCWrapsPlugin"
name = "HMCWraps"
description = "The best choice to make your items prettier."
author = "Skyslycer"
softDepend = listOf("PlaceholderAPI", "ItemsAdder", "Oraxen", "MythicMobs", "Crucible", "ProtocolSupport", "ProtocolLib", "ViaVersion", "ViaRewind", "ViaBackwards", "Geyser-Spigot")
apiVersion = "1.17"
foliaSupported = true
permissions {
register("hmcwraps.admin") {
description = "Gives access to all commands."
default = Default.OP
}
register("hmcwraps.management") {
description = "Gives access to every command except the reload and the convert command."
}
register("hmcwraps.commands.physical") {
description = "Gives access to all commands related to physical wraps."
}
register("hmcwraps.commands.virtual") {
description = "Gives access to all commands related to virtual wraps."
}
register("hmcwraps.commands.reload") {
description = "Gives access to the reload command."
children = listOf("hmcwraps.admin")
}
register("hmcwraps.commands.convert") {
description = "Gives access to the convert command."
children = listOf("hmcwraps.admin")
}
register("hmcwraps.commands.wrap") {
description = "Gives access to wrap an item using commands (virtual)."
children = listOf("hmcwraps.management", "hmcwraps.admin", "hmcwraps.commands.virtual")
}
register("hmcwraps.commands.wrap.self") {
description = "Gives access to wrap an item using commands (virtual). The player can only wrap his own tools, not the tools from others."
}
register("hmcwraps.commands.unwrap") {
description = "Gives access to unwrap an item using commands (virtual)."
children = listOf("hmcwraps.management", "hmcwraps.admin", "hmcwraps.commands.virtual")
}
register("hmcwraps.commands.unwrap.self") {
description = "Gives access to unwrap an item using commands (virtual). The player can only unwrap his own tools, not the tools from others."
}
register("hmcwraps.commands.give.wrapper") {
description = "Gives access to giving physical wrappers to players."
children = listOf("hmcwraps.management", "hmcwraps.admin", "hmcwraps.commands.physical")
}
register("hmcwraps.commands.give.unwrapper") {
description = "Gives access to giving physical unwrappers to players."
children = listOf("hmcwraps.management", "hmcwraps.admin", "hmcwraps.commands.physical")
}
register("hmcwraps.commands.preview") {
description = "Gives access to starting a preview on behalf of others."
children = listOf("hmcwraps.management", "hmcwraps.admin")
}
register("hmcwraps.commands.list") {
description = "Gives access to the list command."
children = listOf("hmcwraps.management", "hmcwraps.admin")
}
register("hmcwraps.wraps") {
description = "Gives access to the wraps inventory (has to be enabled in config)."
children = listOf("hmcwraps.management", "hmcwraps.admin")
}
register("hmcwraps.debug") {
description = "Gives access to debug commands."
children = listOf("hmcwraps.admin")
}
register("hmcwraps.commands.create") {
description = "Gives access to the create command."
children = listOf("hmcwraps.admin")
}
register("hmcwraps.shortcut.disable") {
description = "If this permission is applied to a player, the shortcut function is disabled only for that player."
}
register("hmcwraps.commands.open") {
description = "Gives access to open the wrap inventory for another player."
children = listOf("hmcwraps.management", "hmcwraps.admin")
}
}
}