Skip to content

Commit

Permalink
Shadow PowerNBT(not need install in plugins)
Browse files Browse the repository at this point in the history
  • Loading branch information
way-zer committed Aug 4, 2019
1 parent 8784ae9 commit 0f38fad
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ An extensible custom item minecraft plugin
see [Wiki](https://github.com/way-zer/SuperItem/wiki)
## For Chinese
see README.zh.md
## Thanks
* [LibraryManager](https://github.com/way-zer/LibraryManager) (shadowed) For runtime dependencies management
* [PowerNBT](https://github.com/steakteam/PowerNBT) (shadowed) For NBT support
## License
you should leave link to [this](https://github.com/way-zer/SuperItem/) and keep the author name in command help
feel free to fork and pull requests
File renamed without changes.
35 changes: 22 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,35 @@ allprojects{
}
shadowJar {
// minimize()
dependencies{
include(dependency(':LibraryManager:'))
}
exclude "example/*"
configurations = [project.configurations.shadow]
relocate("me.dpohvar.powernbt.api","cf.wayzer.util.nbt")
relocate("me.dpohvar.powernbt.utils","cf.wayzer.util.nbt.utils")
// exclude("me/**")
// exclude("example/**")
// exclude("(?!plugin).yml")
include("*.jar")
//for NBT
include("me/dpohvar/powernbt/api/**")
include("me/dpohvar/powernbt/utils/**")

include("cf/wayzer/**")
include("*.kts")
include("META-INF/**")
include("plugin.yml")
}


//start

dependencies{
compile 'cf.wayzer:LibraryManager:1.2'
shadow 'cf.wayzer:LibraryManager:1.2'
shadow(files("$rootDir/lib/PowerNBT.jar"))
compile "org.jetbrains.kotlin:kotlin-script-util:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-scripting-jvm-host:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

compileOnly "org.spigotmc:spigot-api:$mc_version"
compileOnly "net.md-5:bungeecord-chat:$bc_version"
compileOnly files("$rootDir/lib/PowerNBT.jar")
// compile "me.dpohvar.powernbt:PowerNBT:0.8.9.2"
}
version "1.3-SNAPSHOT"
Expand Down Expand Up @@ -72,15 +83,13 @@ task buildArtifact(type: Zip){
include "**/*.class"
into("items")
}
from(jar.getArchiveFile()){
rename(".jar","-developLib.jar")
}
// from(jar.getArchiveFile()){
// rename(".jar","-developLib.jar")
// }
from("Scripts")
from(shadowJar.getArchiveFile()){
rename("-all","")
}
archiveFileName = "SuperItem-${version.toString()}.zip"
archiveFileName = "SuperItem-${rootProject.version}.zip"
destinationDirectory =file("$rootDir/artifacts/")
}
artifacts {
buildArtifact
}
3 changes: 0 additions & 3 deletions lib/PowerNBT.jar

This file was deleted.

1 change: 1 addition & 0 deletions src/main/kotlin/cf/wayzer/SuperItem/features/NBT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import java.util.logging.Level
* 具体设置参照Wiki: <a>https://minecraft.gamepedia.com/Attribute</a>
* @sss me.dpohvar.powernbt.api.NBTManager
*/
@Suppress("unused")
class NBT(override vararg val defaultData: AttributeModifier) : Feature<Array<out NBT.AttributeModifier>>(), Feature.OnPostLoad {
enum class AttributeType(val attributeName: String, val max: Double) {
MaxHealth("generic.maxHealth", 1024.0),
Expand Down

0 comments on commit 0f38fad

Please sign in to comment.