From 61d6dd3f45938ad90c63a43d4554a6f27b3be440 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=BDingor?= Date: Thu, 9 Jun 2022 18:37:19 +0200 Subject: [PATCH] Added Spigradle plugin --- .gitignore | 1 + README.md | 12 ++++++++++++ TODO.md | 10 ---------- build.gradle | 27 ++++++++++++++++++++++----- src/main/resources/plugin.yml | 14 -------------- 5 files changed, 35 insertions(+), 29 deletions(-) delete mode 100644 TODO.md delete mode 100644 src/main/resources/plugin.yml diff --git a/.gitignore b/.gitignore index adc8407..aaa1d06 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ .gradle /build/ +/debug/ /bin/ /target/ diff --git a/README.md b/README.md index 551ddea..54732a5 100644 --- a/README.md +++ b/README.md @@ -30,3 +30,15 @@ ist - Shows a list of your chest networks (Aliases: listNets, listNetworks) addChest [content...] - Adds new chest into the named chest network of given type or changes the setting for already registered chest; if the type is 'storage', you need to specify what items the chest should contain, you can put multiple names of items separated by spaces; If you don't specify any contents, the network will put items that can't go anywhere else into this chest (a 'misc.' chest). After entering this command, you will be asked to right-click the desired chest. (Alias: setChest) checkChest - Shows info about the chest. After entering this command, you will be asked to right-click the desired chest. (Alias: check) cancelSelect - Cancels selecting a chest and cancels previously typed ChestNetworks command if you're required to select a chest. (Aliases: cancel) + +## TODO + +[ ] Proper file names +[ ] Use ACF? +[ ] ACF localization? +[ ] RAID0 sorting on chests with same content +[ ] Better separation of concerns +[ ] Proper (de)serialization +[ ] YAML translation file +[ ] Proper help +[ ] Online manual diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 3d4b7ae..0000000 --- a/TODO.md +++ /dev/null @@ -1,10 +0,0 @@ -# TODO - -[X] Proper file names -[ ] Use ACF? -[ ] ACF localization? -[ ] Better separation of concerns -[ ] Proper (de)serialization -[ ] YAML translation file -[ ] Proper help -[ ] Online manual diff --git a/build.gradle b/build.gradle index 3c2274c..c0d51ad 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,14 @@ plugins { - id 'com.github.johnrengelman.shadow' version '7.1.2' id 'java' + id 'kr.entree.spigradle' version '2.4.2' + id 'com.github.johnrengelman.shadow' version '7.1.2' } apply plugin: 'com.github.johnrengelman.shadow' repositories { mavenCentral() - maven { - url = uri('https://papermc.io/repo/repository/maven-public/') - } + paper() maven { url = uri('https://repo.aikar.co/content/groups/aikar/') } @@ -19,7 +18,7 @@ repositories { } dependencies { - compileOnly 'io.papermc.paper:paper-api:1.18.2-R0.1-SNAPSHOT' + compileOnly paper('1.18.2-R0.1-SNAPSHOT') compileOnly 'de.jeff_media:ChestSortAPI:13.0.0-SNAPSHOT' implementation 'co.aikar:acf-paper:0.5.1-SNAPSHOT' } @@ -28,6 +27,24 @@ group = 'eu.zhincore.chestnetworks' version = '1.0-SNAPSHOT' description = 'chestnetworks' +spigot { + authors 'Zhincore' + softDepends 'ChestSort' + apiVersion '1.18' + excludeLibraries('acf-paper', 'ChestSortAPI') + + commands { + chestnet { + aliases = ['cnet', 'chestnetwork', 'chestnetworks'] + description = 'Create or edit chest sort networks' + usage = 'Use / help for help' + } + } + permissions { + + } +} + shadowJar { relocate 'co.aikar.commands', 'eu.zhincore.chestnetworks.acf' relocate 'co.aikar.locales', 'eu.zhincore.chestnetworks.locales' diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml deleted file mode 100644 index 44911d1..0000000 --- a/src/main/resources/plugin.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: ChestNetworks -version: 1.0-SNAPSHOT -description: ChestNetworks allows you to create networks of chests; chests that sort items between themselves. -author: Zhincore -api-version: 1.18 -main: eu.zhincore.chestnetworks.ChestNetworksPlugin - -softdepend: [ChestSort] - -commands: - chestnet: - description: Create or edit chest sort networks - usage: Use / help for help - aliases: [cnet, chestnetwork, chestnetworks]