From b09bd357370bbd048f72a00849242b31832048fd Mon Sep 17 00:00:00 2001 From: Mergu Date: Sat, 29 Apr 2023 11:56:17 -0400 Subject: [PATCH 01/12] Add support for Denizen items --- build.gradle.kts | 6 ++--- common/build.gradle.kts | 1 + .../hibiscusmc/hmccosmetics/hooks/Hooks.java | 1 + .../hmccosmetics/hooks/items/HookDenizen.java | 27 +++++++++++++++++++ 4 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/items/HookDenizen.java diff --git a/build.gradle.kts b/build.gradle.kts index 1f87d73b..cf634471 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -34,8 +34,8 @@ allprojects { //Hikari maven("https://mvnrepository.com/artifact/com.zaxxer/HikariCP") - // Citizens - maven("https://repo.citizensnpcs.co") + // Citizens & Denizen + maven("https://maven.citizensnpcs.co/repo") // Worldguard maven("https://maven.enginehub.org/repo/") @@ -168,7 +168,7 @@ bukkit { apiVersion = "1.17" authors = listOf("LoJoSho") depend = listOf("ProtocolLib") - softDepend = listOf("ModelEngine", "Oraxen", "ItemsAdder", "Looty", "HMCColor", "WorldGuard", "MythicMobs", "PlaceholderAPI", "SuperVanish", "PremiumVanish") + softDepend = listOf("ModelEngine", "Oraxen", "ItemsAdder", "Looty", "HMCColor", "WorldGuard", "MythicMobs", "Denizen", "PlaceholderAPI", "SuperVanish", "PremiumVanish") version = "${project.version}" commands { diff --git a/common/build.gradle.kts b/common/build.gradle.kts index 060ffef5..65da0575 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -18,6 +18,7 @@ dependencies { compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.1.0-SNAPSHOT") compileOnly("it.unimi.dsi:fastutil:8.5.11") compileOnly("io.lumine:Mythic-Dist:5.2.1") + compileOnly("com.denizenscript:denizen:1.2.7-SNAPSHOT") compileOnly("com.github.LeonMangler:SuperVanish:6.2.6-4") //compileOnly("com.github.Fisher2911:FisherLib:master-SNAPSHOT") diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/Hooks.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/Hooks.java index 7c6ed5e9..15862ed4 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/Hooks.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/Hooks.java @@ -22,6 +22,7 @@ public class Hooks { private static HookItemAdder ITEMADDER_HOOK = new HookItemAdder(); private static HookLooty LOOTY_HOOK = new HookLooty(); private static HookMythic MYTHIC_HOOK = new HookMythic(); + private static HookDenizen DENIZEN_HOOK = new HookDenizen(); private static HookHMCCosmetics HMCCOSMETIC_HOOK = new HookHMCCosmetics(); private static HookPlaceholderAPI PAPI_HOOK = new HookPlaceholderAPI(); private static HookPremiumVanish PREMIUM_VANISH_HOOK = new HookPremiumVanish(); diff --git a/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/items/HookDenizen.java b/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/items/HookDenizen.java new file mode 100644 index 00000000..f9b935eb --- /dev/null +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/items/HookDenizen.java @@ -0,0 +1,27 @@ +package com.hibiscusmc.hmccosmetics.hooks.items; + +import com.denizenscript.denizen.objects.ItemTag; +import com.denizenscript.denizencore.utilities.CoreUtilities; +import com.hibiscusmc.hmccosmetics.hooks.Hook; +import org.bukkit.inventory.ItemStack; +import org.jetbrains.annotations.NotNull; + +/** + * A hook that integrates the plugin {@link com.denizenscript.denizen.Denizen Denizen} to provide custom items + */ +@SuppressWarnings("SpellCheckingInspection") +public class HookDenizen extends Hook { + public HookDenizen() { + super("denizen"); + setEnabledItemHook(true); + } + + /** + * Gets a cosmetic {@link ItemStack} that is associated with the provided id from the plugin {@link com.denizenscript.denizen.Denizen Denizen} + */ + @Override + public ItemStack getItem(@NotNull String itemId) { + ItemTag item = ItemTag.valueOf(itemId, CoreUtilities.noDebugContext); + return item == null ? null : item.getItemStack(); + } +} From 9cfb27da28a025f79074c1a9fbad26c5f8eeb801 Mon Sep 17 00:00:00 2001 From: Craftinators Date: Sat, 29 Apr 2023 12:33:03 -0400 Subject: [PATCH 02/12] chore: update bug-report.yml --- .github/ISSUE_TEMPLATE/bug-report.yml | 97 ++++++++++++++------------- 1 file changed, 52 insertions(+), 45 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 2e57ae16..76a37dc7 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -1,62 +1,69 @@ name: Bug Report -description: Create a bug report to help us keep track of all bugs that have to be fixed -title: "[BUG] " +description: Report an issue with HMCCosmetics labels: [bug] - -body: - - type: checkboxes - id: i-have-checked +assignees: ["LoJoSho"] +- type: markdown attributes: - label: I have checked... - options: - - label: "I am using the latest version of HMCCosmetics" - required: true - - label: "I am using the latest version of any dependencies" - required: true - - label: "I have checked if any similar bug reports exist" - required: true + value: | + Thank you for filing an bug report! If you are here to ask a question, use our [Discord server](https://discord.gg/pcm8kWrdNt) instead! +body: + - type: input + id: release_version + attributes: + label: Plugin Version + placeholder: vx.x.x + description: | + Insert the version of HMCCosmetics you are using (e.g. `v2.2.8`). Before continuing make sure you have the latest version of HMCCosmetics as + your issue may have already been resolved. + validations: + required: true + - type: input + id: server_version + attributes: + label: Server Version + placeholder: fork-x-x.x.x + description: | + Insert the version of your minecraft server in the format `fork-build-version` (e.g. `PAPER-521-1.19.4`, `PURPUR-1838-1.19.2`) + validations: + required: true - type: textarea id: description attributes: - label: Description - description: A full description of the bug - validations: - required: true + label: Issue description + description: Describe the issue in as much detail as possible (Include any error logs in a code block below) + validations: + required: true - type: textarea id: reproduce attributes: label: Steps to reproduce description: Explain how to reproduce this issue step-by-step, in as much detail as possible. + placeholder: | + Steps to reproduce: + 1. Do thing + 2. Observe behavior + 3. Post any error logs below validations: required: true - - type: textarea - id: hmcc-version + - type: dropdown + id: priority attributes: - label: Plugin Version - description: Run `version HMCCosmetics` in your console and paste the output - validations: - required: true - - type: textarea - id: meg-version - attributes: - label: ModelEngine Version - description: "Run `version ModelEngine` in your console and paste the output. Optional if not using balloons." - validations: - required: false - - type: textarea - id: server-version - attributes: - label: Server Version - description: "Run `version` in your console and paste the output." - validations: - required: true - - type: "dropdown" - id: "type" - attributes: - label: "How breaking is the bug?" + label: Issue priority + description: Please be realistic. If you need to elaborate on your reasoning, please use the issue description field above. options: - - "Breaking Bug - Plugin unusable" - - "Non-breaking Bug - Plugin still usable, but certain features unavailable" - - "Minor Bug - Plugin completely functional, but features have non-working aspects" + - Low (slightly annoying) + - Medium (should be fixed somewhat soon) + - High (immediate attention needed) validations: required: true + - type: textarea + id: versions + attributes: + label: Other Versions + placeholder: | + - ModelEngine R3.0.1 (`\version`) + - Any other relevant version information such as depenedencies + description: | + List any necessary or relevant versions here. + validations: + required: false From f44d916b3266d0bc81260dfe1c49000bd195c43e Mon Sep 17 00:00:00 2001 From: Craftinators Date: Sat, 29 Apr 2023 12:34:17 -0400 Subject: [PATCH 03/12] chore: fix bug-report.yml syntax error --- .github/ISSUE_TEMPLATE/bug-report.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index 76a37dc7..ebcdbeac 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -2,11 +2,11 @@ name: Bug Report description: Report an issue with HMCCosmetics labels: [bug] assignees: ["LoJoSho"] -- type: markdown +body: + - type: markdown attributes: value: | Thank you for filing an bug report! If you are here to ask a question, use our [Discord server](https://discord.gg/pcm8kWrdNt) instead! -body: - type: input id: release_version attributes: From f50731f83ee21ee9733a702b14987d2d4b04d2ef Mon Sep 17 00:00:00 2001 From: Craftinators Date: Sat, 29 Apr 2023 12:36:29 -0400 Subject: [PATCH 04/12] chore: fix bug-report.yml validation errors --- .github/ISSUE_TEMPLATE/bug-report.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index ebcdbeac..ece84399 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -15,8 +15,6 @@ body: description: | Insert the version of HMCCosmetics you are using (e.g. `v2.2.8`). Before continuing make sure you have the latest version of HMCCosmetics as your issue may have already been resolved. - validations: - required: true - type: input id: server_version attributes: @@ -24,15 +22,11 @@ body: placeholder: fork-x-x.x.x description: | Insert the version of your minecraft server in the format `fork-build-version` (e.g. `PAPER-521-1.19.4`, `PURPUR-1838-1.19.2`) - validations: - required: true - type: textarea id: description attributes: label: Issue description description: Describe the issue in as much detail as possible (Include any error logs in a code block below) - validations: - required: true - type: textarea id: reproduce attributes: @@ -65,5 +59,3 @@ body: - Any other relevant version information such as depenedencies description: | List any necessary or relevant versions here. - validations: - required: false From f5bf8c70b4dfc20141280498dc3eb2643a428729 Mon Sep 17 00:00:00 2001 From: Craftinators Date: Sat, 29 Apr 2023 12:39:22 -0400 Subject: [PATCH 05/12] chore: modify text --- .github/ISSUE_TEMPLATE/bug-report.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml index ece84399..f96ede58 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -55,7 +55,7 @@ body: attributes: label: Other Versions placeholder: | - - ModelEngine R3.0.1 (`\version`) + - ModelEngine R3.0.1 (`/version ModelEngine`) - Any other relevant version information such as depenedencies description: | List any necessary or relevant versions here. From 1f634d668e774575fb60bafda8a05758268dc3c4 Mon Sep 17 00:00:00 2001 From: Craftinators Date: Sat, 29 Apr 2023 12:40:14 -0400 Subject: [PATCH 06/12] style: rename bug-report.yml --- .github/ISSUE_TEMPLATE/{bug-report.yml => 01-bug_report.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{bug-report.yml => 01-bug_report.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/01-bug_report.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/bug-report.yml rename to .github/ISSUE_TEMPLATE/01-bug_report.yml From 651067fb17ea3ce49a34bb21e1211d4e1dcb12a4 Mon Sep 17 00:00:00 2001 From: Craftinators Date: Sat, 29 Apr 2023 12:40:43 -0400 Subject: [PATCH 07/12] style: rename feature-request.yml --- .../{feature-request.yml => 02-feature_request.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{feature-request.yml => 02-feature_request.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/02-feature_request.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/feature-request.yml rename to .github/ISSUE_TEMPLATE/02-feature_request.yml From 0a1a381ebcb16204df49c91874f044a1c0268176 Mon Sep 17 00:00:00 2001 From: Craftinators Date: Sat, 29 Apr 2023 12:45:58 -0400 Subject: [PATCH 08/12] chore: update 02-feature_request --- .github/ISSUE_TEMPLATE/02-feature_request.yml | 33 ++++++++----------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/02-feature_request.yml b/.github/ISSUE_TEMPLATE/02-feature_request.yml index f0498ff1..df9eb954 100644 --- a/.github/ISSUE_TEMPLATE/02-feature_request.yml +++ b/.github/ISSUE_TEMPLATE/02-feature_request.yml @@ -1,29 +1,24 @@ name: Feature Request description: Create a feature request to help us keep track of all features you want to be added -title: "[FEATURE] " labels: [enhancement] - +assignees: ["LoJoSho"] body: - - type: "checkboxes" - id: "i-have-checked" +- type: markdown + attributes: + value: | + Please check that the feature you are requesting does not already exist *and/or* hasn't already been requested by someone else. + - type: textarea + id: description attributes: - label: "I have checked that..." - options: - - label: "...such a feature does not exist already" - required: true - - label: "...such a feature request has not been submitted already" - required: true - - type: "textarea" - id: "description" - attributes: - label: "Description" - description: "A full description of the feature" + label: Feature Description + description: A clear and concise description of what the problem is, or what feature you want to be implemented. + placeholder: A good addition would be... validations: required: true - - type: "textarea" - id: "config-changes" + - type: textarea + id: solution attributes: - label: "Config Changes" - description: "The configuration changes your feature should have" + label: Implementation Description + description: A clear and concise description of what you want to happen, and any optional **configuration changes** that need to be made. validations: required: false From 28d1775c861d86e2192fde444ce23df44f027407 Mon Sep 17 00:00:00 2001 From: Craftinators <craftinatorssx@gmail.com> Date: Sat, 29 Apr 2023 12:46:49 -0400 Subject: [PATCH 09/12] chore: fix 02-feature_request syntax error --- .github/ISSUE_TEMPLATE/02-feature_request.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/02-feature_request.yml b/.github/ISSUE_TEMPLATE/02-feature_request.yml index df9eb954..190501ef 100644 --- a/.github/ISSUE_TEMPLATE/02-feature_request.yml +++ b/.github/ISSUE_TEMPLATE/02-feature_request.yml @@ -3,9 +3,9 @@ description: Create a feature request to help us keep track of all features you labels: [enhancement] assignees: ["LoJoSho"] body: -- type: markdown - attributes: - value: | + - type: markdown + attributes: + value: | Please check that the feature you are requesting does not already exist *and/or* hasn't already been requested by someone else. - type: textarea id: description From 50ebc737e661b5ea56a23a0965e1c96d32acc269 Mon Sep 17 00:00:00 2001 From: Craftinators <craftinatorssx@gmail.com> Date: Sat, 29 Apr 2023 12:47:25 -0400 Subject: [PATCH 10/12] chore: fix 02-feature-request indent error --- .github/ISSUE_TEMPLATE/02-feature_request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/02-feature_request.yml b/.github/ISSUE_TEMPLATE/02-feature_request.yml index 190501ef..3034b282 100644 --- a/.github/ISSUE_TEMPLATE/02-feature_request.yml +++ b/.github/ISSUE_TEMPLATE/02-feature_request.yml @@ -6,7 +6,7 @@ body: - type: markdown attributes: value: | - Please check that the feature you are requesting does not already exist *and/or* hasn't already been requested by someone else. + Please check that the feature you are requesting does not already exist *and/or* hasn't already been requested by someone else. - type: textarea id: description attributes: From db49946e5eb39db64e23f0987ae748731524158e Mon Sep 17 00:00:00 2001 From: Craftinators <craftinatorssx@gmail.com> Date: Sat, 29 Apr 2023 12:49:10 -0400 Subject: [PATCH 11/12] chore: add discord link at top --- .github/ISSUE_TEMPLATE/02-feature_request.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/02-feature_request.yml b/.github/ISSUE_TEMPLATE/02-feature_request.yml index 3034b282..d5c7958e 100644 --- a/.github/ISSUE_TEMPLATE/02-feature_request.yml +++ b/.github/ISSUE_TEMPLATE/02-feature_request.yml @@ -1,8 +1,12 @@ name: Feature Request -description: Create a feature request to help us keep track of all features you want to be added +description: Request a new feature for HMCCosmetics labels: [enhancement] assignees: ["LoJoSho"] body: + - type: markdown + attributes: + value: | + If you are here to ask a question, use our [Discord server](https://discord.gg/pcm8kWrdNt) instead! - type: markdown attributes: value: | From f0e60903b5234b4dccdc2c35a282314cdaed05a1 Mon Sep 17 00:00:00 2001 From: Craftinators <craftinatorssx@gmail.com> Date: Sat, 29 Apr 2023 12:55:31 -0400 Subject: [PATCH 12/12] chore: more PR description options --- .github/PULL_REQUEST_TEMPLATE.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d25e4678..611eb543 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,14 @@ #### Select the option(s) that best describes this PR: - [ ] Major breaking change - [ ] Minor change -- [ ] Bug fix - [ ] Feature implementation -- [ ] Documentation -- [ ] Cleaning -- [ ] Refactoring +- [ ] Bug fix +- [ ] Chore (Changes that don't fix or add new features *and don't* modify source files) +- [ ] Refactoring (Changes that dont't fix or add new features *but do* modify source files) +- [ ] Documentation (Changes to README files and/or JavaDocs) +- [ ] Style (Changes that don't affect the meaning of the code) +- [ ] Performance +- [ ] Other (Please specify below) #### Please describe the changes this PR makes and why it should be merged: