From 2db2494015176d369dafe9ff971931a3f47bc4c8 Mon Sep 17 00:00:00 2001 From: Shyanne Date: Mon, 17 Jun 2024 18:44:02 -0400 Subject: [PATCH 01/14] Fixed null clickedBlock exception (#870) --- .../iridiumskyblock/listeners/PlayerInteractListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerInteractListener.java b/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerInteractListener.java index f46679cbd..c72787b0d 100644 --- a/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerInteractListener.java +++ b/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerInteractListener.java @@ -38,6 +38,10 @@ public void onClick(PlayerInteractEvent event) { } } + // If the item in hand is not a bank item, but the player did not click a block, this returns null. + // Normally, this isn't an issue, but we're not ignoring cancelled events to allow crystals to be deposited. + if(event.getClickedBlock() == null) return; + Optional island = IridiumSkyblock.getInstance().getTeamManager().getTeamViaPlayerLocation(player, event.getClickedBlock().getLocation()); if (!island.isPresent()) return; if (!IridiumSkyblock.getInstance().getTeamManager().getTeamPermission(island.get(), user, PermissionType.BLOCK_BREAK)) { From a5b669bddecb1c82ebdbc5a710f254fc66b2ce9d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 05:01:56 +0000 Subject: [PATCH 02/14] Bump org.projectlombok:lombok from 1.18.32 to 1.18.34 (#873) Bumps [org.projectlombok:lombok](https://github.com/projectlombok/lombok) from 1.18.32 to 1.18.34. - [Changelog](https://github.com/projectlombok/lombok/blob/master/doc/changelog.markdown) - [Commits](https://github.com/projectlombok/lombok/compare/v1.18.32...v1.18.34) --- updated-dependencies: - dependency-name: org.projectlombok:lombok dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 16592fd77..cb51b0bca 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -27,14 +27,14 @@ dependencies { implementation("com.iridium:IridiumTeams:2.5.7") // Other dependencies that are not required or already available at runtime - compileOnly("org.projectlombok:lombok:1.18.32") + compileOnly("org.projectlombok:lombok:1.18.34") compileOnly("org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT") compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") compileOnly("net.ess3:EssentialsXSpawn:2.16.1") compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.13-SNAPSHOT") // Enable lombok annotation processing - annotationProcessor("org.projectlombok:lombok:1.18.32") + annotationProcessor("org.projectlombok:lombok:1.18.34") } tasks { From 70520af761a34be28ed59288bb580bcb40e46213 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Sun, 21 Jul 2024 16:45:07 +0200 Subject: [PATCH 03/14] Relocate all included dependencies & Simplify shadowJar task replacement (#877) --- build.gradle.kts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index cb51b0bca..235bb6e0d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -38,10 +38,9 @@ dependencies { } tasks { - // "Replace" the build task with the shadowJar task (probably bad but who cares) - jar { - dependsOn("shadowJar") - enabled = false + // Add the shadowJar task to the build task + build { + dependsOn(shadowJar) } shadowJar { @@ -54,8 +53,11 @@ tasks { // Relocate dependencies relocate("com.iridium.iridiumcore") relocate("com.j256.ormlite") - relocate("org.bstats") relocate("de.jeff_media.updatechecker") + relocate("org.bstats") + relocate("org.intellij.lang.annotations") + relocate("org.jetbrains.annotations") + relocate("org.jnbt") // Remove unnecessary files from the jar minimize() From 3a6b8d1ce06c9514a8c312b0388e585b72aaa466 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Sun, 21 Jul 2024 17:24:11 +0200 Subject: [PATCH 04/14] Generate plugin.yml dynamically (#876) Co-authored-by: Peaches_MLG --- build.gradle.kts | 38 +++++++++++++++++++++++++---------- src/main/resources/plugin.yml | 21 ------------------- 2 files changed, 27 insertions(+), 32 deletions(-) delete mode 100644 src/main/resources/plugin.yml diff --git a/build.gradle.kts b/build.gradle.kts index 235bb6e0d..2fa02158e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -2,11 +2,12 @@ plugins { java `maven-publish` id("com.github.johnrengelman.shadow") version "8.1.1" + id("net.minecrell.plugin-yml.bukkit") version "0.6.0" } group = "com.iridium" version = "4.1.0" -description = "IridiumSkyblock" +description = "Skyblock Redefined" repositories { mavenCentral() @@ -37,6 +38,31 @@ dependencies { annotationProcessor("org.projectlombok:lombok:1.18.34") } +bukkit { + main = "com.iridium.iridiumskyblock.IridiumSkyblock" + apiVersion = "1.13" + author = "Peaches_MLG" + + loadBefore = listOf("Multiverse-Core") + depend = listOf("Vault") + softDepend = listOf( + "MVdWPlaceholderAPI", + "PlaceholderAPI", + "Essentials", + "EssentialsSpawn", + "RoseStacker", + "WorldEdit", + "ObsidianStacker" + ) + + commands { + register("iridiumskyblock") { + description = "Main plugin command" + aliases = listOf("is", "island") + } + } +} + tasks { // Add the shadowJar task to the build task build { @@ -68,16 +94,6 @@ tasks { options.encoding = "UTF-8" } - // Process Placeholders for the plugin.yml - processResources { - filesMatching("**/plugin.yml") { - expand(rootProject.project.properties) - } - - // Always re-run this task - outputs.upToDateWhen { false } - } - compileJava { sourceCompatibility = JavaVersion.VERSION_1_8.toString() targetCompatibility = JavaVersion.VERSION_1_8.toString() diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml deleted file mode 100644 index 7ca14cebe..000000000 --- a/src/main/resources/plugin.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: IridiumSkyblock -version: ${version} -description: Skyblock Redefined -main: com.iridium.iridiumskyblock.IridiumSkyblock -api-version: '1.13' -author: Peaches_MLG -depend: [ Vault ] -softdepend: - - "MVdWPlaceholderAPI" - - "PlaceholderAPI" - - "Essentials" - - "EssentialsSpawn" - - "RoseStacker" - - "WorldEdit" - - "ObsidianStacker" -loadbefore: - - "Multiverse-Core" -commands: - iridiumskyblock: - aliases: [ "island", is ] - description: Main plugin command From 9b77948bd56f350dea3a8b3f61829354ef1c99d5 Mon Sep 17 00:00:00 2001 From: Shyanne Date: Sun, 21 Jul 2024 13:04:19 -0400 Subject: [PATCH 05/14] Create CONTRIBUTING.md (#880) Co-authored-by: Peaches_MLG --- docs/CONTRIBUTING.md | 197 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 197 insertions(+) create mode 100644 docs/CONTRIBUTING.md diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md new file mode 100644 index 000000000..7d1cdfaa2 --- /dev/null +++ b/docs/CONTRIBUTING.md @@ -0,0 +1,197 @@ +# Contribution Guidelines + +This document aims to outline our expectations of potential contributors, as well as to explain the project structure and answer some common questions. + + + +Table of Contents: + +> - Code of Conduct +> +> - Project Structure +> +> - Selecting a Repo +> +> - Feature Requests +> +> - Opening an Issue +> +> - Submitting Pull Requests (PRs) +> +> - Translation +> +> - Style Guidelines +> +> - Code Reviews + + + +## Code of Conduct + +We expect ALL contributors to act in a respectful and inclusive manner, regardless of background or ideology. As such, we have put together conduct guidelines that potential contributors should adhere to. + + + +> - Be respecful and inclusive - discrimination, including but not limited to racism, sexism (transphobia), homophobia, hate speech (slurs), or NSFW content of any kind are not wished to be seen, and will most likely result in restrictions or a ban from the repo. +> +> - Stay on topic - the GitHub is specifically for contributing to the project. If you'd like to join a community space, we have a Discord server, we'd love to have you! +> +> - Do not bump or spam issues, especially unrelated conversations. +> +> - Advertising on the repo, or using private messages to do so is prohibited. Advertising includes but is not limited to Discord servers, Minecraft servers, service threads, and companies. +> +> - Services and recruitment are not to be requested in this repo. +> +> - Light profane language, such as light swearing can be used moderately. Excessive swearing is not allowed. +> +> - You are prohibited to share links from unknown sources which may contain any banned content. Automatic downloads or malicious files are not excluded from this rule. This also includes files that are uploaded to the repo. +> +> - Organization members have the final say, if you think their decision is unfair, contact PeachesMLG (@peaches_mlg on Discord). + + + +## Project Structure + +IridiumSkyblock is divided into a couple of different repos, with a project hierarchy that must be adhered to. + +You may notice when compiling and developing against +IridiumSkyblock that there is a significant portion of code that isn't +located in this repo. That's because IridiumSkyblock is an extension of +IridiumTeams, and also uses functions from IridiumCore. + +- [IridiumCore](https://github.com/Iridium-Development/IridiumCore) + - A sort of library for all of Iridium Development's plugins +- [IridiumTeams](https://github.com/Iridium-Development/IridiumTeams) + - The generic plugin, which extends IridiumCore, and involves all of + the code for team management, including leveling, missions, team + members, the bank, etc. +- [IridiumSkyblock](https://github.com/Iridium-Development/IridiumSkyblock) + - This plugin, which extends IridiumTeams, and houses its own code specific to Skyblock, such as the world generation. + +### Selecting A Repo + +The code or feature that you are planning to implement should have its use case / features considered before you select a repo to contribute to. + +> - If the contribution is a "backend", meta, or version specific change, it will likely go into IridiumCore. Examples include player skull handling, NMS, GUI changes, and item creation. +> +> - If the contribution is a general "frontend" or feature request that works with several of our plugins or is NOT specific to the skyblock gamemode, it will likely go into IridiumTeams. +> +> - If the contribution is a specific "frontend" or feature request that works only with IridiumSkyblock or is specific to the skyblock gamemode, it will likely go into IridiumSkyblock. + +If you're ever unsure, you can always reach out on Discord, we're happy to give you a helping hand. + + + +## Feature Requests + +- For requests, fill out an issue with the feature request tag selected and explain in detail the use case for this feature. + +- For PRs, submit a PR using our Pull Requests Guidelines and explain in detail the use case and the expected behavior for the feature. You are also expected to highlight any known issues or otherwise specific details about your PR, and if you need help, to explain what has you stumped. + +Here is a Feature Request template that you can use for your requests, if you so choose. + +> **What kind of feature would you like to see in the plugin?** +> +> Explain the feature in detail, and how you think it should work. +> +> **Why do you want this feature?** +> +> Explain why this feature would benefit you. +> +> **How would you use this feature?** +> +> Detail how this feature would work on your server. +> +> **How do you think other server owners would use this feature?** +> +> Detail how this feature would work on other servers or in general, and how that would benefit them. + + + +## Opening an Issue + +If you've discovered a bug in IridiumSkyblock, you should open an issue on our repo. If this issue is with IridiumTeams or IridiumCore, organization members will re-create the issue on the correct repo and link to your issue. + +Here is an Issue template that you can use for your issues, if you so choose. + +> **Describe the bug** +> A clear and concise description of what the bug is. +> +> **To Reproduce** +> Steps to reproduce the behavior: +> +> 1. Go to '...' +> 2. Click on '....' +> 3. Scroll down to '....' +> 4. See error +> +> **Expected behavior** +> A clear and concise description of what you expected to happen. +> +> **Server and Plugin Version** +> Copy and paste the results of `/version` and `/is about` +> +> **Screenshots** +> If applicable, add screenshots to help explain your problem. +> +> **Logs** +> If there are error messages in your console, please send them via [this](https://mclo.gs) +> +> **Additional context** +> Add any other context about the problem here. + + + +## Submitting Pull Requests (PRs) + +We ask that all code contributions are submitted via PRs. They should be explicit, detailed, and their scope narrowed to resolving a specific problem or adding a specific feature. In the case of overhauls, everything related to the overhaul should be contained within a single PR. Try to keep PRs pure by separating quick fixes and extras into their own PRs. + +Here is a Pull Request template that you can use for your PRs, if you so choose. + +> **Describe the contribution** +> +> A clear and concise description of the changes made by the PR. +> +> **Explain the Issue** +> +> If applicable, link the issue that you're addressing and explain what the problem is, as well as how your contribution fixes it. +> +> **Expected Behavior** +> +> Outline the contribution's expected beahvior and affects. +> +> **Tested Versions** +> +> The server versions you've tested this fix with. Please specify whether you're on Spigot or Paper, and their associated build versions. +> +> **Known Issues** +> +> If applicable, describe any known issues with your contribution or issues you came across while working on it. +> +> **Dependencies** +> +> Any specific dependencies of your PR, including any PRs submitted to IridiumTeams or IridiumSkyblock. + + + +## Translation + +IridiumSkyblock accepts translations in the form of translated default configuration files (.yml). If you contribute a translation, please create a PR with changes only in the configuration files and the translation tag applied. If accepted, we will close the PR and your translation will show up on our wiki. + + + +## Style Guidelines + +peaches you can write this one + + + +## Code Reviews + +All code contributions must go through a mandatory review via one of the organization members. If your code does not build, it will not be accepted until changes are made to allow it to do so, with the exception of PRs that rely on changes made to IridiumTeams or IridiumCore (these PRs MUST be linked in your PR). + +Code reviews will typically be done by PeachesMLG, but may also be conducted by other organization members. These reviews will consider the style guidelines, the efficiency of your code, API usage, and scrutinize decisions made. If approved, your PR will then be merged; otherwise, someone will leave a comment with feedback or a suggestion on your PR. + +If you decide that you want to make multiple contributions, and you are a part of our Discord server, please reach out to a staff member regarding our contributor role. + + From a550b283358f2e1ce3a93b84a98da35a1071cad9 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Sun, 21 Jul 2024 19:21:30 +0200 Subject: [PATCH 06/14] Update bug_report.md (#881) * Update bug_report.md * Update issue assignees --- .github/ISSUE_TEMPLATE/bug_report.md | 100 ++++++++++++++++++--------- 1 file changed, 67 insertions(+), 33 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 897fbf437..02595e624 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,33 +1,67 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug, unconfirmed -assignees: PeachesMLG, dlsf, MertUnverdi - ---- - -**Describe the bug** -A clear and concise description of what the bug is. - -**To Reproduce** -Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error - -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Server and Plugin Version** -Copy and paste the results of `/version` and `/is about` - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Logs** -If there are error messages in your console, please send them via [this](https://mclo.gs) - -**Additional context** -Add any other context about the problem here. +name: Bug Report +description: Create a report to help us improve IridiumSkyblock! +title: "[Bug] " +labels: ["bug", "unconfirmed"] +assignees: ["PeachesMLG", "dlsf", "sh0inx"] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: markdown + attributes: + value: Before submitting a new issue, ensure your bug hasn't already been reported. If it has, reply to the open issue instead. + - type: textarea + id: reproduction + validations: + required: true + attributes: + label: Steps to Reproduce + description: Provide clear and unambiguous steps on how to reproduce the bug + placeholder: | + 1. Do this + 2. Click on this + 3. See error + - type: input + id: expected_behavior + validations: + required: true + attributes: + label: Expected Behavior + description: Describe what you expected to happen + - type: input + id: actual_behavior + validations: + required: true + attributes: + label: Actual Behavior + description: Describe what actually happened + - type: textarea + id: screenshots + attributes: + label: Screenshots + description: Optionally, add some screenshots to show the issue + - type: input + id: minecraft_version + validations: + required: true + attributes: + label: Server Software & Minecraft Version + description: The server software and Minecraft version you are using ("latest" is not accurate enough) + - type: input + id: skyblock_version + validations: + required: true + attributes: + label: IridiumSkyblock version + description: The IridiumSkyblock version you are using ("latest" is not accurate enough) + - type: textarea + id: logs + attributes: + label: Server logs + description: "If there are error messages in your console, please send them via [this](https://mclo.gs)" + - type: textarea + id: additional_comments + attributes: + label: Additional Comments + description: Optionally, add further comments which may enhance the issue From 015befe9a40e442f035fbfc19c25f2e71e7aed09 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Sun, 21 Jul 2024 19:30:20 +0200 Subject: [PATCH 07/14] Epic bugfix (#882) --- .github/ISSUE_TEMPLATE/{bug_report.md => bug_report.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/ISSUE_TEMPLATE/{bug_report.md => bug_report.yml} (100%) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/bug_report.yml From 5bd7830c1f0c24756948c3a45c48fdddaa4b8888 Mon Sep 17 00:00:00 2001 From: Shyanne Date: Sun, 21 Jul 2024 14:09:06 -0400 Subject: [PATCH 08/14] Update IslandPlaceholderBuilder.java (#883) fixed swapped placeholders, removed redundant placeholders, and fixed enhancement placeholder defaults `experience_rank` and `value_rank` placeholders were accidentally swapped Co-authored-by: Peaches_MLG --- .../IslandPlaceholderBuilder.java | 27 +++++-------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java b/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java index 0db905fc4..29bf92b9e 100644 --- a/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java +++ b/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java @@ -56,8 +56,8 @@ public List getPlaceholders(Island island) { new Placeholder("island_experience", String.valueOf(island.getExperience())), new Placeholder("island_experienceToLevelUp", String.valueOf(IridiumSkyblock.getInstance().getIslandManager().getTeamExperienceForNextLevel(island))), new Placeholder("island_experienceForNextLevel", String.valueOf(IridiumSkyblock.getInstance().getIslandManager().getExperienceForLevel(island.getLevel() + 1))), - new Placeholder("island_value_rank", () -> String.valueOf(IridiumSkyblock.getInstance().getIslandManager().getRank(island, IridiumSkyblock.getInstance().getTop().experienceTeamSort))), - new Placeholder("island_experience_rank", () -> String.valueOf(IridiumSkyblock.getInstance().getIslandManager().getRank(island, IridiumSkyblock.getInstance().getTop().valueTeamSort))), + new Placeholder("island_value_rank", () -> String.valueOf(IridiumSkyblock.getInstance().getIslandManager().getRank(island, IridiumSkyblock.getInstance().getTop().valueTeamSort))), + new Placeholder("island_experience_rank", () -> String.valueOf(IridiumSkyblock.getInstance().getIslandManager().getRank(island, IridiumSkyblock.getInstance().getTop().experienceTeamSort))), new Placeholder("island_members_online", () -> String.join(", ", onlineUsers)), new Placeholder("island_members_online_count", () -> String.valueOf(onlineUsers.size())), new Placeholder("island_members_offline", () -> String.join(", ", offlineUsers)), @@ -76,9 +76,6 @@ public List getPlaceholders(Island island) { placeholderList.add(new Placeholder("island_visitors", () -> visitingPlayers.stream().map(Player::getName).collect(Collectors.joining(", ")))); placeholderList.add(new Placeholder("island_visitors_amount", () -> String.valueOf(visitingPlayers.size()))); - placeholderList.add(new Placeholder("island_visitors", () -> visitingPlayers.stream().map(Player::getName).collect(Collectors.joining(", ")))); - placeholderList.add(new Placeholder("island_visitors_amount", () -> String.valueOf(visitingPlayers.size()))); - for (Map.Entry> enhancement : IridiumSkyblock.getInstance().getEnhancementList().entrySet()) { if (!enhancement.getValue().enabled) continue; TeamEnhancement teamEnhancement = IridiumSkyblock.getInstance().getIslandManager().getTeamEnhancement(island, enhancement.getKey()); @@ -125,21 +122,11 @@ private List initializeDefaultPlaceholders() { )); for (Map.Entry> enhancement : IridiumSkyblock.getInstance().getEnhancementList().entrySet()) { - if (enhancement.getValue().type == EnhancementType.BOOSTER) { - placeholderList.add(new Placeholder("island_booster_" + enhancement.getKey() + "_active", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - placeholderList.add(new Placeholder("island_booster_" + enhancement.getKey() + "_level", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - placeholderList.add(new Placeholder("island_booster_" + enhancement.getKey() + "_time_hours", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - placeholderList.add(new Placeholder("island_booster_" + enhancement.getKey() + "_time_minutes", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - placeholderList.add(new Placeholder("island_booster_" + enhancement.getKey() + "_time_seconds", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - } - - if (enhancement.getValue().type == EnhancementType.UPGRADE) { - placeholderList.add(new Placeholder("island_upgrade_" + enhancement.getKey() + "_active", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - placeholderList.add(new Placeholder("island_upgrade_" + enhancement.getKey() + "_level", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - placeholderList.add(new Placeholder("island_upgrade_" + enhancement.getKey() + "_time_hours", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - placeholderList.add(new Placeholder("island_upgrade_" + enhancement.getKey() + "_time_minutes", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - placeholderList.add(new Placeholder("island_upgrade_" + enhancement.getKey() + "_time_seconds", IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); - } + placeholderList.add(new Placeholder("island_enhancement_" + enhancement.getKey() + "_active", () -> IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); + placeholderList.add(new Placeholder("island_enhancement_" + enhancement.getKey() + "_level", () -> IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); + placeholderList.add(new Placeholder("island_enhancement_" + enhancement.getKey() + "_time_hours", () -> IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); + placeholderList.add(new Placeholder("island_enhancement_" + enhancement.getKey() + "_time_minutes", () -> IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); + placeholderList.add(new Placeholder("island_enhancement_" + enhancement.getKey() + "_time_seconds", () -> IridiumSkyblock.getInstance().getMessages().nullPlaceholder)); } for (BankItem bankItem : IridiumSkyblock.getInstance().getBankItemList()) { From fd588adbdfe2b0653b026bc6d1a51e349ce24534 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Sun, 21 Jul 2024 20:10:05 +0200 Subject: [PATCH 09/14] Improve bug report issue template (#886) Co-authored-by: Peaches_MLG --- .github/ISSUE_TEMPLATE/bug_report.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 02595e624..d37900ee9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -22,14 +22,14 @@ body: 1. Do this 2. Click on this 3. See error - - type: input + - type: textarea id: expected_behavior validations: required: true attributes: label: Expected Behavior description: Describe what you expected to happen - - type: input + - type: textarea id: actual_behavior validations: required: true @@ -47,15 +47,15 @@ body: required: true attributes: label: Server Software & Minecraft Version - description: The server software and Minecraft version you are using ("latest" is not accurate enough) + description: Please copy and paste the output of `/version`, "latest" is not helpful - type: input id: skyblock_version validations: required: true attributes: label: IridiumSkyblock version - description: The IridiumSkyblock version you are using ("latest" is not accurate enough) - - type: textarea + description: Please copy and paste the output of `/is version`, "latest" is not helpful + - type: input id: logs attributes: label: Server logs From 21e80fb27c3e13a80f2e9c85ac4a1482fcdd6010 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Mon, 22 Jul 2024 08:30:27 +0200 Subject: [PATCH 10/14] Remove default title of bug report issue template (#887) --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index d37900ee9..997e78fb8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,5 @@ name: Bug Report description: Create a report to help us improve IridiumSkyblock! -title: "[Bug] " labels: ["bug", "unconfirmed"] assignees: ["PeachesMLG", "dlsf", "sh0inx"] body: From 3102e2ac5904bfebf64a54b4627d369af32f3921 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Tue, 23 Jul 2024 21:39:44 +0200 Subject: [PATCH 11/14] Add major contributors to plugin.yml as authors (#888) Co-authored-by: Peaches_MLG --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index 2fa02158e..1f69d24f3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,6 +42,7 @@ bukkit { main = "com.iridium.iridiumskyblock.IridiumSkyblock" apiVersion = "1.13" author = "Peaches_MLG" + authors = listOf("das_", "sh0inx", "SlashRemix", "Faun471") loadBefore = listOf("Multiverse-Core") depend = listOf("Vault") From 5fa7b84d301f7be0794854c45b430f48a56a953f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 04:57:52 +0000 Subject: [PATCH 12/14] Bump org.spigotmc:spigot-api (#891) Bumps org.spigotmc:spigot-api from 1.21-R0.1-SNAPSHOT to 1.21.1-R0.1-SNAPSHOT. --- updated-dependencies: - dependency-name: org.spigotmc:spigot-api dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 1f69d24f3..e33148613 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -29,7 +29,7 @@ dependencies { // Other dependencies that are not required or already available at runtime compileOnly("org.projectlombok:lombok:1.18.34") - compileOnly("org.spigotmc:spigot-api:1.21-R0.1-SNAPSHOT") + compileOnly("org.spigotmc:spigot-api:1.21.1-R0.1-SNAPSHOT") compileOnly("com.github.MilkBowl:VaultAPI:1.7.1") compileOnly("net.ess3:EssentialsXSpawn:2.16.1") compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.2.13-SNAPSHOT") From d1e5f760994cbe041984cd060769a8c2651e9c69 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Sat, 17 Aug 2024 01:08:55 +0200 Subject: [PATCH 13/14] Add SpigotMC URL to plugin.yml (#892) Co-authored-by: Peaches_MLG --- build.gradle.kts | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle.kts b/build.gradle.kts index e33148613..efe49fdf9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -43,6 +43,7 @@ bukkit { apiVersion = "1.13" author = "Peaches_MLG" authors = listOf("das_", "sh0inx", "SlashRemix", "Faun471") + website = "https://www.spigotmc.org/resources/62480" loadBefore = listOf("Multiverse-Core") depend = listOf("Vault") From 1cb2f68210b1e617849ba3509c2af5d0b11fcb99 Mon Sep 17 00:00:00 2001 From: Daniel Scherf <35780068+dlsf@users.noreply.github.com> Date: Wed, 4 Sep 2024 23:26:52 +0200 Subject: [PATCH 14/14] Fix support for versions <1.21 (#895) * Fix support for versions <1.21 Depends on https://github.com/Iridium-Development/IridiumTeams/pull/89 * Fix relocation issues * Relocate IridiumTeams, Remove empty directory from jar * Add missing Apache Commons 2.x dependency * Revert "Remove empty directory from jar" --- build.gradle.kts | 13 ++++++++++++- .../iridiumskyblock/IridiumSkyblock.java | 8 +++++--- .../commands/BiomeCommand.java | 4 ++-- .../commands/BorderCommand.java | 2 +- .../commands/RegenCommand.java | 3 +-- .../commands/VisitCommand.java | 2 +- .../iridiumskyblock/configs/BankItems.java | 2 +- .../iridiumskyblock/configs/Biomes.java | 8 ++++---- .../configs/Configuration.java | 4 ++-- .../iridiumskyblock/configs/Enhancements.java | 3 +-- .../iridiumskyblock/configs/Inventories.java | 4 ++-- .../iridiumskyblock/configs/Missions.java | 7 ++++--- .../iridiumskyblock/configs/Permissions.java | 2 +- .../iridium/iridiumskyblock/configs/SQL.java | 2 +- .../iridiumskyblock/configs/Schematics.java | 19 +++++++++++-------- .../GeneratorEnhancementData.java | 2 +- .../iridiumskyblock/gui/BiomeCategoryGUI.java | 5 ++--- .../iridiumskyblock/gui/BiomeOverviewGUI.java | 7 ++++--- .../iridiumskyblock/gui/BorderGUI.java | 5 +++-- .../iridiumskyblock/gui/CreateGUI.java | 6 +++--- .../iridium/iridiumskyblock/gui/RegenGUI.java | 6 ++---- .../iridiumskyblock/gui/SchematicGUI.java | 17 ++++++----------- .../iridium/iridiumskyblock/gui/VisitGUI.java | 5 +++-- .../listeners/BlockFormListener.java | 2 +- .../listeners/PlayerInteractListener.java | 2 +- .../listeners/PlayerPortalListener.java | 4 ++-- .../managers/BiomeManager.java | 2 +- .../managers/DatabaseManager.java | 1 - .../managers/IslandManager.java | 14 +++++++------- .../managers/SchematicManager.java | 10 ---------- .../ForeignIslandTableManager.java | 5 +---- .../tablemanagers/LostItemsTableManager.java | 3 +-- .../managers/tablemanagers/TableManager.java | 5 ++++- .../tablemanagers/UserTableManager.java | 2 -- .../IslandPlaceholderBuilder.java | 3 +-- .../schematics/FastAsyncWorldEdit.java | 1 - .../schematics/SchematicAsync.java | 2 +- .../iridiumskyblock/utils/LocationUtils.java | 4 ++-- .../iridiumskyblock/utils/PlayerUtils.java | 1 - 39 files changed, 95 insertions(+), 102 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index efe49fdf9..88b074327 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,7 +25,8 @@ dependencies { implementation("org.jetbrains:annotations:24.1.0") implementation("com.j256.ormlite:ormlite-core:6.1") implementation("com.j256.ormlite:ormlite-jdbc:6.1") - implementation("com.iridium:IridiumTeams:2.5.7") + implementation("com.iridium:IridiumTeams:2.5.8") + implementation("commons-lang:commons-lang:2.6") // Other dependencies that are not required or already available at runtime compileOnly("org.projectlombok:lombok:1.18.34") @@ -79,6 +80,7 @@ tasks { archiveClassifier.set("") // Relocate dependencies + relocate("com.iridium.iridiumteams") relocate("com.iridium.iridiumcore") relocate("com.j256.ormlite") relocate("de.jeff_media.updatechecker") @@ -87,6 +89,15 @@ tasks { relocate("org.jetbrains.annotations") relocate("org.jnbt") + // Relocate IridiumCore dependencies + relocate("de.tr7zw.changeme.nbtapi") + relocate("com.iridium.iridiumcolorapi") + relocate("org.yaml.snakeyaml") + relocate("io.papermc.lib") + relocate("com.cryptomorin.xseries") + relocate("com.fasterxml.jackson") + relocate("org.apache.commons") + // Remove unnecessary files from the jar minimize() } diff --git a/src/main/java/com/iridium/iridiumskyblock/IridiumSkyblock.java b/src/main/java/com/iridium/iridiumskyblock/IridiumSkyblock.java index 4af574532..f22afa107 100644 --- a/src/main/java/com/iridium/iridiumskyblock/IridiumSkyblock.java +++ b/src/main/java/com/iridium/iridiumskyblock/IridiumSkyblock.java @@ -1,7 +1,7 @@ package com.iridium.iridiumskyblock; +import com.cryptomorin.xseries.reflection.XReflection; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumskyblock.configs.*; import com.iridium.iridiumskyblock.database.Island; import com.iridium.iridiumskyblock.database.User; @@ -24,7 +24,9 @@ import org.bukkit.plugin.RegisteredServiceProvider; import org.bukkit.plugin.java.JavaPluginLoader; -import java.io.*; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; @@ -151,7 +153,7 @@ public void registerListeners() { Bukkit.getPluginManager().registerEvents(new PlayerPortalListener(), this); Bukkit.getPluginManager().registerEvents(new PlayerInteractListener(), this); Bukkit.getPluginManager().registerEvents(new EntityDamageListener(), this); - if(!XMaterial.supports(15)) Bukkit.getPluginManager().registerEvents(new PortalCreateListener(), this); + if(!XReflection.supports(15)) Bukkit.getPluginManager().registerEvents(new PortalCreateListener(), this); } @Override diff --git a/src/main/java/com/iridium/iridiumskyblock/commands/BiomeCommand.java b/src/main/java/com/iridium/iridiumskyblock/commands/BiomeCommand.java index 54fb81bd3..c7953ce8b 100644 --- a/src/main/java/com/iridium/iridiumskyblock/commands/BiomeCommand.java +++ b/src/main/java/com/iridium/iridiumskyblock/commands/BiomeCommand.java @@ -26,7 +26,7 @@ public BiomeCommand() { public boolean execute(User user, Island island, String[] args, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); if (args.length == 0) { - player.openInventory(new BiomeOverviewGUI(player.getOpenInventory().getTopInventory()).getInventory()); + player.openInventory(new BiomeOverviewGUI(player).getInventory()); return false; } else { Optional categoryName = getCategoryName(String.join(" ", args)); @@ -38,7 +38,7 @@ public boolean execute(User user, Island island, String[] args, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); if (args.length == 0) { - player.openInventory(new VisitGUI(player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new VisitGUI(player, iridiumTeams).getInventory()); return false; } Optional island = IridiumSkyblock.getInstance().getTeamManager().getTeamViaNameOrPlayer(args[0]); diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/BankItems.java b/src/main/java/com/iridium/iridiumskyblock/configs/BankItems.java index 44e1ca972..b8728c6c9 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/BankItems.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/BankItems.java @@ -1,7 +1,7 @@ package com.iridium.iridiumskyblock.configs; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumskyblock.bankitems.CrystalsBankItem; import java.util.Arrays; diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/Biomes.java b/src/main/java/com/iridium/iridiumskyblock/configs/Biomes.java index af3197447..80affe89e 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/Biomes.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/Biomes.java @@ -1,11 +1,11 @@ package com.iridium.iridiumskyblock.configs; +import com.cryptomorin.xseries.XBiome; +import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XSound; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnore; -import com.iridium.iridiumcore.dependencies.xseries.XBiome; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; -import com.iridium.iridiumcore.dependencies.xseries.XSound; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/Configuration.java b/src/main/java/com/iridium/iridiumskyblock/configs/Configuration.java index 681adec87..87451e33a 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/Configuration.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/Configuration.java @@ -1,10 +1,10 @@ package com.iridium.iridiumskyblock.configs; +import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XSound; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Color; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; -import com.iridium.iridiumcore.dependencies.xseries.XSound; import com.iridium.iridiumteams.Reward; import org.bukkit.World; diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/Enhancements.java b/src/main/java/com/iridium/iridiumskyblock/configs/Enhancements.java index 3b45d52f2..5ccfff782 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/Enhancements.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/Enhancements.java @@ -1,8 +1,8 @@ package com.iridium.iridiumskyblock.configs; +import com.cryptomorin.xseries.XMaterial; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumskyblock.enhancements.GeneratorEnhancementData; import com.iridium.iridiumskyblock.enhancements.SizeEnhancementData; import com.iridium.iridiumskyblock.enhancements.VoidEnhancementData; @@ -10,7 +10,6 @@ import com.iridium.iridiumteams.enhancements.EnhancementType; import java.util.Arrays; -import java.util.HashMap; public class Enhancements extends com.iridium.iridiumteams.configs.Enhancements { diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/Inventories.java b/src/main/java/com/iridium/iridiumskyblock/configs/Inventories.java index ccd1af29b..c318f6bb6 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/Inventories.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/Inventories.java @@ -1,10 +1,10 @@ package com.iridium.iridiumskyblock.configs; +import com.cryptomorin.xseries.XMaterial; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Background; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnore; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumskyblock.configs.inventories.BorderInventoryConfig; import com.iridium.iridiumteams.configs.inventories.InventoryConfig; import com.iridium.iridiumteams.configs.inventories.NoItemGUI; diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/Missions.java b/src/main/java/com/iridium/iridiumskyblock/configs/Missions.java index 8606c7356..e390e7056 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/Missions.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/Missions.java @@ -1,9 +1,10 @@ package com.iridium.iridiumskyblock.configs; +import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XSound; +import com.cryptomorin.xseries.reflection.XReflection; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; -import com.iridium.iridiumcore.dependencies.xseries.XSound; import com.iridium.iridiumteams.Reward; import com.iridium.iridiumteams.missions.Mission; import com.iridium.iridiumteams.missions.MissionData; @@ -178,7 +179,7 @@ public Missions() { "&9&l* &7$1000", "", "&9&l * &7Time Remaining: " + "&9%timeremaining_hours% hours %timeremaining_minutes% minutes and %timeremaining_seconds% seconds" - )), Arrays.asList("SMELT:" + (XMaterial.supports(17) ? XMaterial.RAW_IRON.name() : XMaterial.IRON_ORE.name()) + ":30", "SMELT:" + (XMaterial.supports(17) ? XMaterial.RAW_GOLD.name() : XMaterial.GOLD_ORE.name()) + ":15"), 1, new Reward(new Item(XMaterial.DIAMOND, 1, "&9&lBlacksmith Reward", + )), Arrays.asList("SMELT:" + (XReflection.supports(17) ? XMaterial.RAW_IRON.name() : XMaterial.IRON_ORE.name()) + ":30", "SMELT:" + (XReflection.supports(17) ? XMaterial.RAW_GOLD.name() : XMaterial.GOLD_ORE.name()) + ":15"), 1, new Reward(new Item(XMaterial.DIAMOND, 1, "&9&lBlacksmith Reward", Arrays.asList( "&9&l Rewards", "&9&l* &75 Island Crystals", diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/Permissions.java b/src/main/java/com/iridium/iridiumskyblock/configs/Permissions.java index ad28f8ec8..4b0ceb109 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/Permissions.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/Permissions.java @@ -1,7 +1,7 @@ package com.iridium.iridiumskyblock.configs; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumteams.Permission; import java.util.Arrays; diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/SQL.java b/src/main/java/com/iridium/iridiumskyblock/configs/SQL.java index 579e48e09..2bf6271a9 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/SQL.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/SQL.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.configs; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; /** * The SQL database connection file used by IridiumFactions (sql.yml). diff --git a/src/main/java/com/iridium/iridiumskyblock/configs/Schematics.java b/src/main/java/com/iridium/iridiumskyblock/configs/Schematics.java index f7e4d8fae..b7f25abff 100644 --- a/src/main/java/com/iridium/iridiumskyblock/configs/Schematics.java +++ b/src/main/java/com/iridium/iridiumskyblock/configs/Schematics.java @@ -1,16 +1,19 @@ package com.iridium.iridiumskyblock.configs; +import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XSound; +import com.cryptomorin.xseries.reflection.XReflection; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnore; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnoreProperties; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; -import com.iridium.iridiumcore.dependencies.xseries.XSound; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import org.bukkit.block.Biome; -import java.util.*; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; @JsonIgnoreProperties(ignoreUnknown = true) public class Schematics { @@ -19,7 +22,7 @@ public class Schematics { .put("desert", new SchematicConfig(new Item(XMaterial.PLAYER_HEAD, 11, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNGY0OTNkZDgwNjUzM2Q5ZDIwZTg0OTUzOTU0MzY1ZjRkMzY5NzA5Y2ViYzlkZGVmMDIyZDFmZDQwZDg2YTY4ZiJ9fX0=", 1, "&9&lDesert Island", Arrays.asList("&7A starter desert island.", "", "&9&l[!] &7Costs $1000")), new Schematics.Cost(0, new HashMap<>()), 1, -0.5, 89, -0.5, 90, new SchematicWorld(Biome.DESERT, "desert.schem", 90.0, true - ), new SchematicWorld(XMaterial.supports(16) ? Biome.NETHER_WASTES : Biome.valueOf("NETHER"), + ), new SchematicWorld(XReflection.supports(16) ? Biome.NETHER_WASTES : Biome.valueOf("NETHER"), "desert_nether.schem", 90.0, true ), new SchematicWorld(Biome.THE_END, "desert_end.schem", 90.0, true @@ -27,7 +30,7 @@ public class Schematics { .put("jungle", new SchematicConfig(new Item(XMaterial.PLAYER_HEAD, 13, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjgzYWRmNDU2MGRlNDc0MTQwNDA5M2FjNjFjMzNmYjU1NmIzZDllZTUxNDBmNjIwMzYyNTg5ZmRkZWRlZmEyZCJ9fX0=", 1, "&9&lJungle Island", Arrays.asList("&7A starter jungle island.", "", "&9&l[!] &7Costs $1000")), new Schematics.Cost(0, new HashMap<>()), 1, 1.5, 83, 1.5, 90, new SchematicWorld(Biome.JUNGLE, "jungle.schem", 90.0, true - ), new SchematicWorld(XMaterial.supports(16) ? Biome.NETHER_WASTES : Biome.valueOf("NETHER"), + ), new SchematicWorld(XReflection.supports(16) ? Biome.NETHER_WASTES : Biome.valueOf("NETHER"), "jungle_nether.schem", 90.0, true ), new SchematicWorld(Biome.THE_END, "jungle_end.schem", 90.0, true @@ -35,7 +38,7 @@ public class Schematics { .put("mushroom", new SchematicConfig(new Item(XMaterial.PLAYER_HEAD, 15, "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZWE0NWQxYjQxN2NiZGRjMjE3NjdiMDYwNDRlODk5YjI2NmJmNzhhNjZlMjE4NzZiZTNjMDUxNWFiNTVkNzEifX19", 1, "&9&lMushroom Island", Arrays.asList("&7A starter mushroom island.", "", "&9&l[!] &7Costs $1000")), new Schematics.Cost(0, new HashMap<>()), 1, 0.5, 89, -0.5, 90, new SchematicWorld(Biome.MUSHROOM_FIELDS, "mushroom.schem", 90.0, true - ), new SchematicWorld(XMaterial.supports(16) ? Biome.NETHER_WASTES : Biome.valueOf("NETHER"), + ), new SchematicWorld(XReflection.supports(16) ? Biome.NETHER_WASTES : Biome.valueOf("NETHER"), "mushroom_nether.schem", 90.0, true ), new SchematicWorld(Biome.THE_END, "mushroom_end.schem", 90.0, true diff --git a/src/main/java/com/iridium/iridiumskyblock/enhancements/GeneratorEnhancementData.java b/src/main/java/com/iridium/iridiumskyblock/enhancements/GeneratorEnhancementData.java index 520e6d98b..31acb6868 100755 --- a/src/main/java/com/iridium/iridiumskyblock/enhancements/GeneratorEnhancementData.java +++ b/src/main/java/com/iridium/iridiumskyblock/enhancements/GeneratorEnhancementData.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.enhancements; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.enhancements.EnhancementData; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/iridium/iridiumskyblock/gui/BiomeCategoryGUI.java b/src/main/java/com/iridium/iridiumskyblock/gui/BiomeCategoryGUI.java index a5445f8f4..593da2472 100644 --- a/src/main/java/com/iridium/iridiumskyblock/gui/BiomeCategoryGUI.java +++ b/src/main/java/com/iridium/iridiumskyblock/gui/BiomeCategoryGUI.java @@ -5,7 +5,6 @@ import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.configs.Biomes; -import com.iridium.iridiumskyblock.configs.Schematics; import com.iridium.iridiumteams.configs.inventories.NoItemGUI; import lombok.Getter; import org.bukkit.Bukkit; @@ -24,8 +23,8 @@ public class BiomeCategoryGUI extends BackGUI { private final String categoryName; private final Biomes.BiomeCategory biomeCategory; - public BiomeCategoryGUI(String categoryName, Inventory previousInventory) { - super(IridiumSkyblock.getInstance().getInventories().biomeCategoryGUI.background, previousInventory, IridiumSkyblock.getInstance().getInventories().backButton); + public BiomeCategoryGUI(String categoryName, Player player) { + super(IridiumSkyblock.getInstance().getInventories().biomeCategoryGUI.background, player, IridiumSkyblock.getInstance().getInventories().backButton); this.categoryName = categoryName; this.biomeCategory = IridiumSkyblock.getInstance().getBiomes().categories.get(categoryName); } diff --git a/src/main/java/com/iridium/iridiumskyblock/gui/BiomeOverviewGUI.java b/src/main/java/com/iridium/iridiumskyblock/gui/BiomeOverviewGUI.java index 6d08a3278..41eae6d97 100644 --- a/src/main/java/com/iridium/iridiumskyblock/gui/BiomeOverviewGUI.java +++ b/src/main/java/com/iridium/iridiumskyblock/gui/BiomeOverviewGUI.java @@ -7,6 +7,7 @@ import com.iridium.iridiumskyblock.configs.Biomes; import com.iridium.iridiumteams.configs.inventories.NoItemGUI; import org.bukkit.Bukkit; +import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.Inventory; import org.jetbrains.annotations.NotNull; @@ -15,8 +16,8 @@ public class BiomeOverviewGUI extends BackGUI { - public BiomeOverviewGUI(Inventory previousInventory) { - super(IridiumSkyblock.getInstance().getInventories().biomeOverviewGUI.background, previousInventory, IridiumSkyblock.getInstance().getInventories().backButton); + public BiomeOverviewGUI(Player player) { + super(IridiumSkyblock.getInstance().getInventories().biomeOverviewGUI.background, player, IridiumSkyblock.getInstance().getInventories().backButton); } @NotNull @@ -41,7 +42,7 @@ public void addContent(Inventory inventory) { public void onInventoryClick(InventoryClickEvent event) { for (Map.Entry category : IridiumSkyblock.getInstance().getBiomes().categories.entrySet()) { if (event.getSlot() != category.getValue().item.slot) continue; - event.getWhoClicked().openInventory(new BiomeCategoryGUI(category.getKey(), event.getWhoClicked().getOpenInventory().getTopInventory()).getInventory()); + event.getWhoClicked().openInventory(new BiomeCategoryGUI(category.getKey(), (Player) event.getWhoClicked()).getInventory()); return; } super.onInventoryClick(event); diff --git a/src/main/java/com/iridium/iridiumskyblock/gui/BorderGUI.java b/src/main/java/com/iridium/iridiumskyblock/gui/BorderGUI.java index 376668c5c..79248c2a6 100644 --- a/src/main/java/com/iridium/iridiumskyblock/gui/BorderGUI.java +++ b/src/main/java/com/iridium/iridiumskyblock/gui/BorderGUI.java @@ -7,16 +7,17 @@ import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumteams.configs.inventories.NoItemGUI; import org.bukkit.Bukkit; +import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.Inventory; import org.jetbrains.annotations.NotNull; public class BorderGUI extends BackGUI { - public BorderGUI(Inventory previousInventory) { + public BorderGUI(Player player) { super( IridiumSkyblock.getInstance().getInventories().islandBorderGUI.background, - previousInventory, + player, IridiumSkyblock.getInstance().getInventories().backButton ); } diff --git a/src/main/java/com/iridium/iridiumskyblock/gui/CreateGUI.java b/src/main/java/com/iridium/iridiumskyblock/gui/CreateGUI.java index 684832b67..e3e0ac3fa 100644 --- a/src/main/java/com/iridium/iridiumskyblock/gui/CreateGUI.java +++ b/src/main/java/com/iridium/iridiumskyblock/gui/CreateGUI.java @@ -2,8 +2,8 @@ import com.iridium.iridiumcore.gui.ClosableGUI; import lombok.Getter; +import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryCloseEvent; -import org.bukkit.inventory.Inventory; import java.util.concurrent.CompletableFuture; @@ -11,8 +11,8 @@ public class CreateGUI extends SchematicGUI implements ClosableGUI { private final CompletableFuture completableFuture; - public CreateGUI(Inventory previousInventory, CompletableFuture completableFuture) { - super(previousInventory); + public CreateGUI(Player player, CompletableFuture completableFuture) { + super(player); this.completableFuture = completableFuture; } diff --git a/src/main/java/com/iridium/iridiumskyblock/gui/RegenGUI.java b/src/main/java/com/iridium/iridiumskyblock/gui/RegenGUI.java index 13b0b23bc..4cc73454f 100644 --- a/src/main/java/com/iridium/iridiumskyblock/gui/RegenGUI.java +++ b/src/main/java/com/iridium/iridiumskyblock/gui/RegenGUI.java @@ -3,14 +3,13 @@ import com.iridium.iridiumskyblock.IridiumSkyblock; import lombok.Getter; import org.bukkit.entity.Player; -import org.bukkit.inventory.Inventory; @Getter public class RegenGUI extends SchematicGUI { private final Player player; - public RegenGUI(Inventory previousInventory, Player player) { - super(previousInventory); + public RegenGUI(Player player) { + super(player); this.player = player; } @@ -18,5 +17,4 @@ public RegenGUI(Inventory previousInventory, Player player) { public void selectSchematic(String schematic) { IridiumSkyblock.getInstance().getCommandManager().executeCommand(player, IridiumSkyblock.getInstance().getCommands().regenCommand, new String[]{schematic}); } - } diff --git a/src/main/java/com/iridium/iridiumskyblock/gui/SchematicGUI.java b/src/main/java/com/iridium/iridiumskyblock/gui/SchematicGUI.java index 1c8003f8d..0db70f688 100644 --- a/src/main/java/com/iridium/iridiumskyblock/gui/SchematicGUI.java +++ b/src/main/java/com/iridium/iridiumskyblock/gui/SchematicGUI.java @@ -1,17 +1,12 @@ package com.iridium.iridiumskyblock.gui; import com.iridium.iridiumcore.gui.BackGUI; -import com.iridium.iridiumcore.utils.InventoryUtils; import com.iridium.iridiumcore.utils.ItemStackUtils; import com.iridium.iridiumcore.utils.Placeholder; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.configs.Schematics; -import com.iridium.iridiumskyblock.database.User; -import com.iridium.iridiumteams.bank.BankItem; -import com.iridium.iridiumteams.configs.Shop; import com.iridium.iridiumteams.configs.inventories.NoItemGUI; -import com.iridium.iridiumteams.database.TeamBank; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; @@ -20,17 +15,17 @@ import org.bukkit.inventory.meta.ItemMeta; import org.jetbrains.annotations.NotNull; -import java.util.*; -import java.util.stream.Collectors; - -import static java.util.Collections.addAll; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; public abstract class SchematicGUI extends BackGUI { - public SchematicGUI(Inventory previousInventory) { + public SchematicGUI(Player player) { super( IridiumSkyblock.getInstance().getInventories().islandSchematicGUI.background, - previousInventory, + player, IridiumSkyblock.getInstance().getInventories().backButton ); } diff --git a/src/main/java/com/iridium/iridiumskyblock/gui/VisitGUI.java b/src/main/java/com/iridium/iridiumskyblock/gui/VisitGUI.java index e4216575e..67b793d35 100644 --- a/src/main/java/com/iridium/iridiumskyblock/gui/VisitGUI.java +++ b/src/main/java/com/iridium/iridiumskyblock/gui/VisitGUI.java @@ -9,6 +9,7 @@ import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.configs.inventories.NoItemGUI; import org.bukkit.Bukkit; +import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; @@ -19,14 +20,14 @@ public class VisitGUI extends PagedGUI { private final IridiumTeams iridiumTeams; - public VisitGUI(Inventory previousInventory, IridiumTeams iridiumTeams) { + public VisitGUI(Player player, IridiumTeams iridiumTeams) { super( 1, IridiumSkyblock.getInstance().getInventories().visitGUI.size, IridiumSkyblock.getInstance().getInventories().visitGUI.background, iridiumTeams.getInventories().previousPage, iridiumTeams.getInventories().nextPage, - previousInventory, + player, iridiumTeams.getInventories().backButton ); this.iridiumTeams = iridiumTeams; diff --git a/src/main/java/com/iridium/iridiumskyblock/listeners/BlockFormListener.java b/src/main/java/com/iridium/iridiumskyblock/listeners/BlockFormListener.java index a337077c3..6f845c37d 100644 --- a/src/main/java/com/iridium/iridiumskyblock/listeners/BlockFormListener.java +++ b/src/main/java/com/iridium/iridiumskyblock/listeners/BlockFormListener.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.RandomAccessList; import com.iridium.iridiumskyblock.enhancements.GeneratorEnhancementData; diff --git a/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerInteractListener.java b/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerInteractListener.java index c72787b0d..9a1d7b40e 100644 --- a/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerInteractListener.java +++ b/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerInteractListener.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.database.Island; diff --git a/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerPortalListener.java b/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerPortalListener.java index 6665c76cc..e55ae3a95 100644 --- a/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerPortalListener.java +++ b/src/main/java/com/iridium/iridiumskyblock/listeners/PlayerPortalListener.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.reflection.XReflection; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.utils.LocationUtils; @@ -64,7 +64,7 @@ public void onPlayerPortal(PlayerPortalEvent event) { return; } location.setY(location.getY() + 1); - if(XMaterial.supports(15)) event.setCanCreatePortal(false); + if (XReflection.supports(15)) event.setCanCreatePortal(false); event.setTo(location); } }); diff --git a/src/main/java/com/iridium/iridiumskyblock/managers/BiomeManager.java b/src/main/java/com/iridium/iridiumskyblock/managers/BiomeManager.java index 008f67aea..8f08aed27 100644 --- a/src/main/java/com/iridium/iridiumskyblock/managers/BiomeManager.java +++ b/src/main/java/com/iridium/iridiumskyblock/managers/BiomeManager.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.managers; -import com.iridium.iridiumcore.dependencies.xseries.XBiome; +import com.cryptomorin.xseries.XBiome; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.configs.Biomes; diff --git a/src/main/java/com/iridium/iridiumskyblock/managers/DatabaseManager.java b/src/main/java/com/iridium/iridiumskyblock/managers/DatabaseManager.java index 5dc107d5f..6834aa312 100644 --- a/src/main/java/com/iridium/iridiumskyblock/managers/DatabaseManager.java +++ b/src/main/java/com/iridium/iridiumskyblock/managers/DatabaseManager.java @@ -19,7 +19,6 @@ import java.io.File; import java.sql.SQLException; -import java.util.Comparator; import java.util.concurrent.CompletableFuture; @Getter diff --git a/src/main/java/com/iridium/iridiumskyblock/managers/IslandManager.java b/src/main/java/com/iridium/iridiumskyblock/managers/IslandManager.java index 4517bce32..adb065d74 100644 --- a/src/main/java/com/iridium/iridiumskyblock/managers/IslandManager.java +++ b/src/main/java/com/iridium/iridiumskyblock/managers/IslandManager.java @@ -1,11 +1,7 @@ package com.iridium.iridiumskyblock.managers; -import com.iridium.iridiumcore.dependencies.nbtapi.NBT; -import com.iridium.iridiumcore.dependencies.nbtapi.NBTCompound; -import com.iridium.iridiumcore.dependencies.nbtapi.NBTFile; -import com.iridium.iridiumcore.dependencies.paperlib.PaperLib; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; -import com.iridium.iridiumcore.dependencies.xseries.XBiome; +import com.cryptomorin.xseries.XBiome; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.ItemStackUtils; import com.iridium.iridiumcore.utils.Placeholder; import com.iridium.iridiumcore.utils.StringUtils; @@ -26,6 +22,10 @@ import com.iridium.iridiumteams.missions.MissionData; import com.iridium.iridiumteams.missions.MissionType; import com.iridium.iridiumteams.support.StackerSupport; +import de.tr7zw.changeme.nbtapi.NBT; +import de.tr7zw.changeme.nbtapi.NBTCompound; +import de.tr7zw.changeme.nbtapi.NBTFile; +import io.papermc.lib.PaperLib; import org.bukkit.*; import org.bukkit.block.Block; import org.bukkit.block.BlockState; @@ -188,7 +188,7 @@ private CompletableFuture getSchematic(Player player) { } } - Bukkit.getScheduler().runTask(IridiumSkyblock.getInstance(), () -> player.openInventory(new CreateGUI(player.getOpenInventory().getTopInventory(), schematicNameCompletableFuture).getInventory())); + Bukkit.getScheduler().runTask(IridiumSkyblock.getInstance(), () -> player.openInventory(new CreateGUI(player, schematicNameCompletableFuture).getInventory())); return schematicNameCompletableFuture; } diff --git a/src/main/java/com/iridium/iridiumskyblock/managers/SchematicManager.java b/src/main/java/com/iridium/iridiumskyblock/managers/SchematicManager.java index dacb6dc27..470f9bb55 100644 --- a/src/main/java/com/iridium/iridiumskyblock/managers/SchematicManager.java +++ b/src/main/java/com/iridium/iridiumskyblock/managers/SchematicManager.java @@ -1,7 +1,5 @@ package com.iridium.iridiumskyblock.managers; -import com.iridium.iridiumcore.utils.InventoryUtils; -import com.iridium.iridiumcore.utils.Placeholder; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.configs.Schematics; @@ -11,8 +9,6 @@ import com.iridium.iridiumskyblock.schematics.SchematicAsync; import com.iridium.iridiumskyblock.schematics.SchematicPaster; import com.iridium.iridiumskyblock.schematics.WorldEdit; -import com.iridium.iridiumteams.bank.BankItem; -import com.iridium.iridiumteams.configs.Shop; import com.iridium.iridiumteams.database.TeamBank; import net.milkbowl.vault.economy.Economy; import org.bukkit.Bukkit; @@ -20,15 +16,10 @@ import org.bukkit.Material; import org.bukkit.World; import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; -import javax.xml.crypto.URIReference; import java.io.File; -import java.math.BigDecimal; -import java.math.RoundingMode; import java.util.*; import java.util.concurrent.CompletableFuture; -import java.util.stream.Collectors; public class SchematicManager { @@ -41,7 +32,6 @@ public class SchematicManager { || Bukkit.getPluginManager().isPluginEnabled("AsyncWorldEdit"); public SchematicManager() { - availablePasters = new TreeMap<>(); availablePasters.put("internalAsync", new SchematicAsync()); if ((worldEdit) && WorldEdit.isWorking()) diff --git a/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/ForeignIslandTableManager.java b/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/ForeignIslandTableManager.java index 1e3092880..e093e4583 100644 --- a/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/ForeignIslandTableManager.java +++ b/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/ForeignIslandTableManager.java @@ -1,16 +1,13 @@ package com.iridium.iridiumskyblock.managers.tablemanagers; -import com.iridium.iridiumskyblock.SortedList; import com.iridium.iridiumskyblock.database.Island; import com.iridium.iridiumskyblock.managers.DatabaseKey; -import com.iridium.iridiumteams.database.DatabaseObject; import com.iridium.iridiumteams.database.TeamData; import com.j256.ormlite.support.ConnectionSource; import org.jetbrains.annotations.NotNull; import java.sql.SQLException; -import java.util.*; -import java.util.concurrent.CompletableFuture; +import java.util.List; public class ForeignIslandTableManager extends TableManager { diff --git a/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/LostItemsTableManager.java b/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/LostItemsTableManager.java index b4835eb5f..76e5cf229 100644 --- a/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/LostItemsTableManager.java +++ b/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/LostItemsTableManager.java @@ -4,8 +4,7 @@ import com.j256.ormlite.support.ConnectionSource; import java.sql.SQLException; -import java.util.*; -import java.util.stream.Collectors; +import java.util.UUID; public class LostItemsTableManager extends TableManager { public LostItemsTableManager(ConnectionSource connectionSource, Class clazz) throws SQLException { diff --git a/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/TableManager.java b/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/TableManager.java index 4348dbe7a..a1f66aee2 100644 --- a/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/TableManager.java +++ b/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/TableManager.java @@ -9,7 +9,10 @@ import com.j256.ormlite.table.TableUtils; import java.sql.SQLException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Optional; import java.util.concurrent.CompletableFuture; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; diff --git a/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/UserTableManager.java b/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/UserTableManager.java index 33d02fb92..b0ecc163f 100644 --- a/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/UserTableManager.java +++ b/src/main/java/com/iridium/iridiumskyblock/managers/tablemanagers/UserTableManager.java @@ -5,8 +5,6 @@ import com.j256.ormlite.support.ConnectionSource; import java.sql.SQLException; -import java.util.Collections; -import java.util.Comparator; import java.util.Optional; import java.util.UUID; diff --git a/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java b/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java index 29bf92b9e..99435f036 100644 --- a/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java +++ b/src/main/java/com/iridium/iridiumskyblock/placeholders/IslandPlaceholderBuilder.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.placeholders; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.Placeholder; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.database.Island; @@ -11,7 +11,6 @@ import com.iridium.iridiumteams.bank.BankItem; import com.iridium.iridiumteams.database.TeamEnhancement; import com.iridium.iridiumteams.enhancements.Enhancement; -import com.iridium.iridiumteams.enhancements.EnhancementType; import org.bukkit.Bukkit; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; diff --git a/src/main/java/com/iridium/iridiumskyblock/schematics/FastAsyncWorldEdit.java b/src/main/java/com/iridium/iridiumskyblock/schematics/FastAsyncWorldEdit.java index 4d8538bf8..e1f7c4925 100644 --- a/src/main/java/com/iridium/iridiumskyblock/schematics/FastAsyncWorldEdit.java +++ b/src/main/java/com/iridium/iridiumskyblock/schematics/FastAsyncWorldEdit.java @@ -14,7 +14,6 @@ import com.sk89q.worldedit.function.operation.Operations; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.session.ClipboardHolder; - import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/src/main/java/com/iridium/iridiumskyblock/schematics/SchematicAsync.java b/src/main/java/com/iridium/iridiumskyblock/schematics/SchematicAsync.java index e58e59225..22b50758e 100644 --- a/src/main/java/com/iridium/iridiumskyblock/schematics/SchematicAsync.java +++ b/src/main/java/com/iridium/iridiumskyblock/schematics/SchematicAsync.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.schematics; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumskyblock.IridiumSkyblock; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/src/main/java/com/iridium/iridiumskyblock/utils/LocationUtils.java b/src/main/java/com/iridium/iridiumskyblock/utils/LocationUtils.java index fa8d5fa7c..9b4bcd2da 100644 --- a/src/main/java/com/iridium/iridiumskyblock/utils/LocationUtils.java +++ b/src/main/java/com/iridium/iridiumskyblock/utils/LocationUtils.java @@ -1,6 +1,6 @@ package com.iridium.iridiumskyblock.utils; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.multiversion.MultiVersion; import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.database.Island; @@ -23,7 +23,7 @@ public class LocationUtils { ).map(XMaterial::parseMaterial).collect(Collectors.toList()); public static boolean isSafe(Location location) { - if (IridiumSkyblock.getInstance().isTesting()) return true; + if (IridiumSkyblock.isTesting()) return true; Block block = location.getBlock(); Block above = location.clone().add(0, 1, 0).getBlock(); Block below = location.clone().subtract(0, 1, 0).getBlock(); diff --git a/src/main/java/com/iridium/iridiumskyblock/utils/PlayerUtils.java b/src/main/java/com/iridium/iridiumskyblock/utils/PlayerUtils.java index b6b65508d..274ef6612 100644 --- a/src/main/java/com/iridium/iridiumskyblock/utils/PlayerUtils.java +++ b/src/main/java/com/iridium/iridiumskyblock/utils/PlayerUtils.java @@ -3,7 +3,6 @@ import com.iridium.iridiumskyblock.IridiumSkyblock; import com.iridium.iridiumskyblock.database.Island; import com.iridium.iridiumteams.support.SpawnSupport; - import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.World;