forked from TabooLib/zaphkiel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
74 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,34 @@ | ||
plugins { | ||
id 'java' | ||
id 'com.github.johnrengelman.shadow' version '4.0.4' | ||
id 'org.jetbrains.kotlin.jvm' version '1.2.41' | ||
id 'io.izzel.taboolib' version '1.2' | ||
id 'org.jetbrains.kotlin.jvm' version '1.4.0-rc' | ||
} | ||
|
||
configurations { | ||
group = 'ink.ptms.zaphkiel' | ||
version = '1.3-SNAPSHOT' | ||
group = 'ink.ptms.zaphkiel' | ||
version = '1.2' | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
|
||
tasks.build.dependsOn tasks.shadowJar | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding = 'UTF-8' | ||
} | ||
|
||
defaultTasks 'clean', 'build' | ||
taboolib { | ||
tabooLibVersion = '5.36' | ||
loaderVersion = '2.6' | ||
classifier = null | ||
} | ||
|
||
repositories { | ||
maven { url "http://ptms.ink:8081/repository/codemc-nms/" } | ||
maven { url "http://ptms.ink:8081/repository/maven-releases/" } | ||
mavenCentral() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
compile 'org.spigotmc:spigot:1.14.4-R0.1-20191211.040645-13' | ||
compile 'io.izzel.taboolib:TabooLib:5.17:all' | ||
compile 'io.izzel.taboolib.loader:TabooLibloader:1.5:all' | ||
compile "org.jetbrains.kotlin:kotlin-stdlib:1.2.41" | ||
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.41" | ||
compileOnly fileTree(dir: 'libs', includes: ['*.jar']) | ||
} | ||
|
||
shadowJar { | ||
dependencies { | ||
include dependency('io.izzel.taboolib.loader:.*') | ||
} | ||
relocate 'io.izzel.taboolib.loader', project.group | ||
compile 'ink.ptms.core:v11600:11600:all' | ||
compile 'org.jetbrains.kotlin:kotlin-stdlib' | ||
compileOnly fileTree(dir: 'libs', includes: ['*.jar']) | ||
} | ||
|
||
processResources { | ||
from(sourceSets.main.resources.srcDirs) { | ||
include 'plugin.yml' | ||
expand 'version': project.version | ||
} | ||
} | ||
|
||
compileKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
} | ||
} | ||
|
||
compileTestKotlin { | ||
kotlinOptions { | ||
jvmTarget = "1.8" | ||
include "plugin.yml" | ||
expand name: rootProject.name, main: project.group + ".boot.PluginBoot", version: project.version, "libVersion": taboolib.tabooLibVersion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-bin.zip | ||
distributionUrl=https://skymc.oss-cn-shanghai.aliyuncs.com/files/gradle-6.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
package ink.ptms.zaphkiel; | ||
package ink.ptms.zaphkiel | ||
|
||
import io.izzel.taboolib.loader.Plugin; | ||
import io.izzel.taboolib.module.config.TConfig; | ||
import io.izzel.taboolib.module.inject.TInject; | ||
import io.izzel.taboolib.module.inject.TSchedule; | ||
import io.izzel.taboolib.module.locale.logger.TLogger; | ||
|
||
import java.io.File; | ||
import ink.ptms.zaphkiel.ZaphkielAPI.folderDisplay | ||
import ink.ptms.zaphkiel.ZaphkielAPI.folderItem | ||
import ink.ptms.zaphkiel.ZaphkielAPI.reloadDisplay | ||
import ink.ptms.zaphkiel.ZaphkielAPI.reloadItem | ||
import io.izzel.taboolib.loader.Plugin | ||
import io.izzel.taboolib.module.config.TConfig | ||
import io.izzel.taboolib.module.inject.TInject | ||
import io.izzel.taboolib.module.inject.TSchedule | ||
import io.izzel.taboolib.module.locale.logger.TLogger | ||
|
||
/** | ||
* @Author sky | ||
* @Since 2019-12-15 20:09 | ||
*/ | ||
@Plugin.Version(5.17) | ||
public class Zaphkiel extends Plugin { | ||
object Zaphkiel : Plugin() { | ||
|
||
@TInject | ||
public static final TLogger LOGS = null; | ||
lateinit var conf: TConfig | ||
private set | ||
|
||
@TInject | ||
public static final TConfig CONF = null; | ||
lateinit var logger: TLogger | ||
private set | ||
|
||
@TSchedule(delay = 20) | ||
public static void reload() { | ||
if (!ZaphkielAPI.INSTANCE.getFolderItem().exists()) { | ||
getPlugin().saveResource("item/def.yml", true); | ||
fun reload() { | ||
if (!folderItem.exists()) { | ||
plugin.saveResource("item/def.yml", true) | ||
} | ||
if (!ZaphkielAPI.INSTANCE.getFolderDisplay().exists()) { | ||
getPlugin().saveResource("display/def.yml", true); | ||
if (!folderDisplay.exists()) { | ||
plugin.saveResource("display/def.yml", true) | ||
} | ||
ZaphkielAPI.INSTANCE.reloadDisplay(); | ||
ZaphkielAPI.INSTANCE.reloadItem(); | ||
reloadDisplay() | ||
reloadItem() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,13 @@ | ||
name: Zaphkiel | ||
main: ink.ptms.zaphkiel.Zaphkiel | ||
author: 坏黑 | ||
api-version: 1.13 | ||
|
||
version: ${version} | ||
|
||
# Powered by TabooLib 5.0 # | ||
|
||
|
||
name: ${name} | ||
main: ${main} | ||
version: ${version} | ||
authors: | ||
- Bkm016 | ||
|
||
lib-version: ${libVersion} | ||
api-version: 1.13 |