diff --git a/.github/ISSUE_TEMPLATE/01-bug_report.yml b/.github/ISSUE_TEMPLATE/01-bug_report.yml new file mode 100644 index 00000000..f96ede58 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-bug_report.yml @@ -0,0 +1,61 @@ +name: Bug Report +description: Report an issue with HMCCosmetics +labels: [bug] +assignees: ["LoJoSho"] +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! + - 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. + - 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`) + - 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) + - 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: dropdown + id: priority + attributes: + label: Issue priority + description: Please be realistic. If you need to elaborate on your reasoning, please use the issue description field above. + options: + - 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 ModelEngine`) + - Any other relevant version information such as depenedencies + description: | + List any necessary or relevant versions here. diff --git a/.github/ISSUE_TEMPLATE/02-feature_request.yml b/.github/ISSUE_TEMPLATE/02-feature_request.yml new file mode 100644 index 00000000..d5c7958e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-feature_request.yml @@ -0,0 +1,28 @@ +name: Feature Request +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: | + 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: 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: solution + attributes: + 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 diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index 2e57ae16..00000000 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Bug Report -description: Create a bug report to help us keep track of all bugs that have to be fixed -title: "[BUG] " -labels: [bug] - -body: - - type: checkboxes - id: i-have-checked - 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 - - type: textarea - id: description - attributes: - label: Description - description: A full description of the bug - 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. - validations: - required: true - - type: textarea - id: hmcc-version - 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?" - 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" - validations: - required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml deleted file mode 100644 index f0498ff1..00000000 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ /dev/null @@ -1,29 +0,0 @@ -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] - -body: - - type: "checkboxes" - id: "i-have-checked" - 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" - validations: - required: true - - type: "textarea" - id: "config-changes" - attributes: - label: "Config Changes" - description: "The configuration changes your feature should have" - validations: - required: false 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: diff --git a/build.gradle.kts b/build.gradle.kts index fe62d3dc..ac859726 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", "LibsDisguises") + softDepend = listOf("ModelEngine", "Oraxen", "ItemsAdder", "Looty", "HMCColor", "WorldGuard", "MythicMobs", "PlaceholderAPI", "SuperVanish", "PremiumVanish", "LibsDisguises", "Denizen") version = "${project.version}" commands { diff --git a/common/build.gradle.kts b/common/build.gradle.kts index cff19603..9d099ee3 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") compileOnlyApi("LibsDisguises:LibsDisguises:10.0.21") { exclude("org.spigotmc", "spigot") 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 47eea18a..ecf0b325 100644 --- a/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/Hooks.java +++ b/common/src/main/java/com/hibiscusmc/hmccosmetics/hooks/Hooks.java @@ -19,6 +19,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(); + } +}