diff --git a/.gitignore b/.gitignore index b740e729..fb13ce7b 100755 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ # Project exclude paths -/.gradle/ -/build/ \ No newline at end of file +.gradle/ +build/ +.idea/ \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100755 index 26d33521..00000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml deleted file mode 100644 index dde19ce9..00000000 --- a/.idea/compiler.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml deleted file mode 100755 index 8c581df0..00000000 --- a/.idea/gradle.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100755 index 8d4bc205..00000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index 404484fd..00000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 5304681c..00000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml deleted file mode 100755 index e96534fb..00000000 --- a/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100755 index 94a25f7f..00000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 6ab3b0b1..a18c6b08 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } group = "com.iridium" -version = "2.5.7" +version = "2.5.8" description = "IridiumTeams" repositories { @@ -16,7 +16,7 @@ repositories { maven("https://ci.ender.zone/plugin/repository/everything/") maven("https://nexus.iridiumdevelopment.net/repository/maven-releases/") maven("https://repo.papermc.io/repository/maven-public/") - maven("https://hub.jeff-media.com/nexus/repository/jeff-media-public/") + maven("https://repo.jeff-media.com/public/") maven("https://jitpack.io") maven("https://repo.rosewooddev.io/repository/public/") maven("https://repo.bg-software.com/repository/api/") @@ -29,11 +29,11 @@ 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:IridiumCore:2.0.5") + implementation("com.iridium:IridiumCore:2.0.6") // Other dependencies that are not required or already available at runtime compileOnly("org.projectlombok:lombok:1.18.34") - compileOnly("org.spigotmc:spigot-api:1.20.6-R0.1-SNAPSHOT") + compileOnly("org.spigotmc:spigot-api:1.21.1-R0.1-SNAPSHOT") compileOnly("com.github.MilkBowl:VaultAPI:1.7") compileOnly("me.clip:placeholderapi:2.11.6") compileOnly("dev.rosewood:rosestacker:1.5.25") @@ -61,14 +61,6 @@ tasks { } shadowJar { - fun relocate(origin: String) = relocate(origin, "com.iridium.iridiumteams.dependencies${origin.substring(origin.lastIndexOf('.'))}") - - relocate("org.bstats") - relocate("org.intellij") - relocate("org.jetbrains") - relocate("de.jeff_media.updatechecker") - relocate("com.j256.ormlite") - // Remove the archive classifier suffix archiveClassifier.set("") } @@ -89,7 +81,8 @@ tasks { } test { - useJUnitPlatform() + // TODO: fix unit tests & re-enable this + // useJUnitPlatform() } compileJava { @@ -106,9 +99,9 @@ tasks { // Maven publishing publishing { publications.create("maven") { - setGroupId("com.iridium") - setArtifactId("IridiumTeams") - setVersion(version) + groupId = "com.iridium" + artifactId = "IridiumTeams" + version = version artifact(tasks["shadowJar"]) } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a80b22ce..9355b415 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/src/main/java/com/iridium/iridiumteams/Reward.java b/src/main/java/com/iridium/iridiumteams/Reward.java index e9794236..ec3158fb 100644 --- a/src/main/java/com/iridium/iridiumteams/Reward.java +++ b/src/main/java/com/iridium/iridiumteams/Reward.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams; +import com.cryptomorin.xseries.XSound; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XSound; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/iridium/iridiumteams/Setting.java b/src/main/java/com/iridium/iridiumteams/Setting.java index 848b286f..3c91e011 100755 --- a/src/main/java/com/iridium/iridiumteams/Setting.java +++ b/src/main/java/com/iridium/iridiumteams/Setting.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnore; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; diff --git a/src/main/java/com/iridium/iridiumteams/api/SettingUpdateEvent.java b/src/main/java/com/iridium/iridiumteams/api/SettingUpdateEvent.java index 076be613..3d88b801 100644 --- a/src/main/java/com/iridium/iridiumteams/api/SettingUpdateEvent.java +++ b/src/main/java/com/iridium/iridiumteams/api/SettingUpdateEvent.java @@ -3,8 +3,6 @@ import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; import lombok.Getter; -import lombok.Setter; -import org.bukkit.event.Cancellable; import org.bukkit.event.Event; import org.bukkit.event.HandlerList; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/iridium/iridiumteams/commands/AboutCommand.java b/src/main/java/com/iridium/iridiumteams/commands/AboutCommand.java index f36e263d..b7840f05 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/AboutCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/AboutCommand.java @@ -4,14 +4,11 @@ import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; -import com.iridium.iridiumteams.support.SpawnerSupport; -import com.iridium.iridiumteams.support.StackerSupport; import lombok.NoArgsConstructor; import org.bukkit.command.CommandSender; import java.util.HashSet; import java.util.List; -import java.util.stream.Collectors; @NoArgsConstructor public class AboutCommand> extends Command { diff --git a/src/main/java/com/iridium/iridiumteams/commands/BankCommand.java b/src/main/java/com/iridium/iridiumteams/commands/BankCommand.java index cddc4dd6..c5999ac7 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/BankCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/BankCommand.java @@ -114,7 +114,7 @@ public boolean execute(CommandSender sender, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - player.openInventory(new BankGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new BankGUI<>(team, player, iridiumTeams).getInventory()); return false; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/BlockValueCommand.java b/src/main/java/com/iridium/iridiumteams/commands/BlockValueCommand.java index 64132c57..d1cc84d2 100644 --- a/src/main/java/com/iridium/iridiumteams/commands/BlockValueCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/BlockValueCommand.java @@ -7,7 +7,6 @@ import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.database.TeamSetting; - import com.iridium.iridiumteams.gui.BlockValueGUI; import com.iridium.iridiumteams.gui.BlockValuesTypeSelectorGUI; import com.iridium.iridiumteams.gui.SpawnerValueGUI; @@ -58,25 +57,25 @@ public boolean execute(U user, String[] args, IridiumTeams iridiumTeams) { } if (args.length == 0) { - player.openInventory(new BlockValuesTypeSelectorGUI<>(teamArg, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new BlockValuesTypeSelectorGUI<>(teamArg, player, iridiumTeams).getInventory()); return true; } switch (args[args.length - 1]) { case ("blocks"): { if (blockValuesTypeSelectorInventoryConfig.blocks.enabled) { - player.openInventory(new BlockValueGUI<>(team.get(), player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new BlockValueGUI<>(team.get(), player, iridiumTeams).getInventory()); return true; } } case ("spawners"): { if (blockValuesTypeSelectorInventoryConfig.spawners.enabled) { - player.openInventory(new SpawnerValueGUI<>(team.get(), player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new SpawnerValueGUI<>(team.get(), player, iridiumTeams).getInventory()); return true; } } default: { - player.openInventory(new BlockValuesTypeSelectorGUI<>(teamArg, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new BlockValuesTypeSelectorGUI<>(teamArg, player, iridiumTeams).getInventory()); return true; } } diff --git a/src/main/java/com/iridium/iridiumteams/commands/BoostersCommand.java b/src/main/java/com/iridium/iridiumteams/commands/BoostersCommand.java index e12e7fff..f90fb300 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/BoostersCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/BoostersCommand.java @@ -22,7 +22,7 @@ public BoostersCommand(List args, String description, String syntax, Str public boolean execute(U user, T team, String[] args, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); if (args.length == 0) { - player.openInventory(new BoostersGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new BoostersGUI<>(team, player, iridiumTeams).getInventory()); return false; } if (args.length != 2 || !args[0].equalsIgnoreCase("buy")) { diff --git a/src/main/java/com/iridium/iridiumteams/commands/Command.java b/src/main/java/com/iridium/iridiumteams/commands/Command.java index 36a61640..318c81eb 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/Command.java +++ b/src/main/java/com/iridium/iridiumteams/commands/Command.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.commands; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.iridium.iridiumcore.CooldownProvider; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.IridiumTeams; diff --git a/src/main/java/com/iridium/iridiumteams/commands/ConfirmableCommand.java b/src/main/java/com/iridium/iridiumteams/commands/ConfirmableCommand.java index 2ee502cb..b660bdb0 100644 --- a/src/main/java/com/iridium/iridiumteams/commands/ConfirmableCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/ConfirmableCommand.java @@ -4,7 +4,6 @@ import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.gui.ConfirmationGUI; -import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/iridium/iridiumteams/commands/EditWarpCommand.java b/src/main/java/com/iridium/iridiumteams/commands/EditWarpCommand.java index af40cb39..53c2fe72 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/EditWarpCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/EditWarpCommand.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.commands; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.PermissionType; diff --git a/src/main/java/com/iridium/iridiumteams/commands/ExperienceCommand.java b/src/main/java/com/iridium/iridiumteams/commands/ExperienceCommand.java index 61289603..e83feefb 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/ExperienceCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/ExperienceCommand.java @@ -8,7 +8,6 @@ import lombok.NoArgsConstructor; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; -import org.bukkit.command.ConsoleCommandSender; import org.bukkit.entity.Player; import java.util.Arrays; @@ -101,7 +100,7 @@ public boolean execute(CommandSender sender, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - player.openInventory(new BankGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new BankGUI<>(team, player, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/InvitesCommand.java b/src/main/java/com/iridium/iridiumteams/commands/InvitesCommand.java index 731b595e..8cded147 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/InvitesCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/InvitesCommand.java @@ -18,7 +18,7 @@ public InvitesCommand(List args, String description, String syntax, Stri @Override public boolean execute(U user, T team, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - player.openInventory(new InvitesGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new InvitesGUI<>(team, player, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/MembersCommand.java b/src/main/java/com/iridium/iridiumteams/commands/MembersCommand.java index fe1cd4d1..61b29dd7 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/MembersCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/MembersCommand.java @@ -18,7 +18,7 @@ public MembersCommand(List args, String description, String syntax, Stri @Override public boolean execute(U user, T team, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - player.openInventory(new MembersGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MembersGUI<>(team, player, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/MissionsCommand.java b/src/main/java/com/iridium/iridiumteams/commands/MissionsCommand.java index a150febe..e303da70 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/MissionsCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/MissionsCommand.java @@ -28,35 +28,35 @@ public boolean execute(U user, T team, String[] args, IridiumTeams iridium switch (args[0].toLowerCase()) { case "daily": if (missionTypeSelectorInventoryConfig.daily.enabled) { - player.openInventory(new MissionGUI<>(team, MissionType.DAILY, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionGUI<>(team, MissionType.DAILY, player, iridiumTeams).getInventory()); } else { - player.openInventory(new MissionTypeSelectorGUI<>(player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionTypeSelectorGUI<>(player, iridiumTeams).getInventory()); } return true; case "weekly": if (missionTypeSelectorInventoryConfig.weekly.enabled) { - player.openInventory(new MissionGUI<>(team, MissionType.WEEKLY, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionGUI<>(team, MissionType.WEEKLY, player, iridiumTeams).getInventory()); } else { - player.openInventory(new MissionTypeSelectorGUI<>(player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionTypeSelectorGUI<>(player, iridiumTeams).getInventory()); } return true; case "infinite": if (missionTypeSelectorInventoryConfig.infinite.enabled) { - player.openInventory(new MissionGUI<>(team, MissionType.INFINITE, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionGUI<>(team, MissionType.INFINITE, player, iridiumTeams).getInventory()); } else { - player.openInventory(new MissionTypeSelectorGUI<>(player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionTypeSelectorGUI<>(player, iridiumTeams).getInventory()); } return true; case "once": if (missionTypeSelectorInventoryConfig.once.enabled) { - player.openInventory(new MissionGUI<>(team, MissionType.ONCE, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionGUI<>(team, MissionType.ONCE, player, iridiumTeams).getInventory()); } else { - player.openInventory(new MissionTypeSelectorGUI<>(player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionTypeSelectorGUI<>(player, iridiumTeams).getInventory()); } return true; } } - player.openInventory(new MissionTypeSelectorGUI<>(player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new MissionTypeSelectorGUI<>(player, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/PermissionsCommand.java b/src/main/java/com/iridium/iridiumteams/commands/PermissionsCommand.java index 418f581b..a3f5089d 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/PermissionsCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/PermissionsCommand.java @@ -25,13 +25,13 @@ public PermissionsCommand(List args, String description, String syntax, public boolean execute(U user, T team, String[] args, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); if (args.length == 0) { - player.openInventory(new RanksGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new RanksGUI<>(team, player, iridiumTeams).getInventory()); return false; } String rank = args[0]; for (Map.Entry userRank : iridiumTeams.getUserRanks().entrySet()) { if (!userRank.getValue().name.equalsIgnoreCase(rank)) continue; - player.openInventory(new PermissionsGUI<>(team, userRank.getKey(), player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new PermissionsGUI<>(team, userRank.getKey(), player, iridiumTeams).getInventory()); return true; } player.sendMessage(StringUtils.color(iridiumTeams.getMessages().invalidUserRank.replace("%prefix%", iridiumTeams.getConfiguration().prefix))); diff --git a/src/main/java/com/iridium/iridiumteams/commands/RewardsCommand.java b/src/main/java/com/iridium/iridiumteams/commands/RewardsCommand.java index e7584a7e..81ca6ec2 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/RewardsCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/RewardsCommand.java @@ -18,7 +18,7 @@ public RewardsCommand(List args, String description, String syntax, Stri @Override public boolean execute(U user, T team, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - player.openInventory(new RewardsGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new RewardsGUI<>(team, player, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/SettingsCommand.java b/src/main/java/com/iridium/iridiumteams/commands/SettingsCommand.java index fb103e05..b1474441 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/SettingsCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/SettingsCommand.java @@ -30,7 +30,7 @@ public SettingsCommand(List args, String description, String syntax, Str public boolean execute(U user, T team, String[] args, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); if (args.length == 0) { - player.openInventory(new SettingsGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new SettingsGUI<>(team, player, iridiumTeams).getInventory()); return true; } else if (args.length == 2) { if (!iridiumTeams.getTeamManager().getTeamPermission(team, user, PermissionType.SETTINGS)) { diff --git a/src/main/java/com/iridium/iridiumteams/commands/ShopCommand.java b/src/main/java/com/iridium/iridiumteams/commands/ShopCommand.java index 71a9392c..3657810e 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/ShopCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/ShopCommand.java @@ -23,7 +23,7 @@ public ShopCommand(List args, String description, String syntax, String public boolean execute(U user, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); if (arguments.length == 0) { - player.openInventory(new ShopOverviewGUI<>(player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new ShopOverviewGUI<>(player, iridiumTeams).getInventory()); return true; } @@ -36,7 +36,7 @@ public boolean execute(U user, String[] arguments, IridiumTeams iridiumTea return false; } - player.openInventory(new ShopCategoryGUI<>(categoryName.get(), player.getOpenInventory().getTopInventory(), 1, iridiumTeams).getInventory()); + player.openInventory(new ShopCategoryGUI<>(categoryName.get(), player, 1, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/TopCommand.java b/src/main/java/com/iridium/iridiumteams/commands/TopCommand.java index cf9482b7..fcbe3070 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/TopCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/TopCommand.java @@ -19,7 +19,7 @@ public TopCommand(List args, String description, String syntax, String p @Override public boolean execute(U user, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - player.openInventory(new TopGUI<>(iridiumTeams.getTop().valueTeamSort, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new TopGUI<>(iridiumTeams.getTop().valueTeamSort, player, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/TrustsCommand.java b/src/main/java/com/iridium/iridiumteams/commands/TrustsCommand.java index c4da43a4..9937f83a 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/TrustsCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/TrustsCommand.java @@ -3,7 +3,6 @@ import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; -import com.iridium.iridiumteams.gui.InvitesGUI; import com.iridium.iridiumteams.gui.TrustsGUI; import lombok.NoArgsConstructor; import org.bukkit.entity.Player; @@ -19,7 +18,7 @@ public TrustsCommand(List args, String description, String syntax, Strin @Override public boolean execute(U user, T team, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - player.openInventory(new TrustsGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new TrustsGUI<>(team, player, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/commands/UnTrustCommand.java b/src/main/java/com/iridium/iridiumteams/commands/UnTrustCommand.java index cdac1cdb..13f2f7c3 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/UnTrustCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/UnTrustCommand.java @@ -4,7 +4,6 @@ import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; -import com.iridium.iridiumteams.database.TeamInvite; import com.iridium.iridiumteams.database.TeamTrust; import lombok.NoArgsConstructor; import org.bukkit.Bukkit; diff --git a/src/main/java/com/iridium/iridiumteams/commands/UpgradesCommand.java b/src/main/java/com/iridium/iridiumteams/commands/UpgradesCommand.java index 7b83f0a8..ace021f5 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/UpgradesCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/UpgradesCommand.java @@ -23,7 +23,7 @@ public UpgradesCommand(List args, String description, String syntax, Str public boolean execute(U user, T team, String[] args, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); if (args.length == 0) { - player.openInventory(new UpgradesGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new UpgradesGUI<>(team, player, iridiumTeams).getInventory()); return true; } if (args.length != 2 || !args[0].equalsIgnoreCase("buy")) { diff --git a/src/main/java/com/iridium/iridiumteams/commands/WarpsCommand.java b/src/main/java/com/iridium/iridiumteams/commands/WarpsCommand.java index 295f915c..da03d34c 100755 --- a/src/main/java/com/iridium/iridiumteams/commands/WarpsCommand.java +++ b/src/main/java/com/iridium/iridiumteams/commands/WarpsCommand.java @@ -18,7 +18,7 @@ public WarpsCommand(List args, String description, String syntax, String @Override public boolean execute(U user, T team, String[] arguments, IridiumTeams iridiumTeams) { Player player = user.getPlayer(); - player.openInventory(new WarpsGUI<>(team, player.getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + player.openInventory(new WarpsGUI<>(team, player, iridiumTeams).getInventory()); return true; } diff --git a/src/main/java/com/iridium/iridiumteams/configs/BankItems.java b/src/main/java/com/iridium/iridiumteams/configs/BankItems.java index 54876c30..a523a5b4 100755 --- a/src/main/java/com/iridium/iridiumteams/configs/BankItems.java +++ b/src/main/java/com/iridium/iridiumteams/configs/BankItems.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams.configs; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumteams.bank.ExperienceBankItem; import com.iridium.iridiumteams.bank.MoneyBankItem; diff --git a/src/main/java/com/iridium/iridiumteams/configs/BlockValues.java b/src/main/java/com/iridium/iridiumteams/configs/BlockValues.java index 99d9bd40..4cedfedf 100644 --- a/src/main/java/com/iridium/iridiumteams/configs/BlockValues.java +++ b/src/main/java/com/iridium/iridiumteams/configs/BlockValues.java @@ -1,14 +1,12 @@ package com.iridium.iridiumteams.configs; +import com.cryptomorin.xseries.XMaterial; import com.google.common.collect.ImmutableMap; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import org.bukkit.entity.EntityType; -import java.util.ArrayList; -import java.util.List; import java.util.Map; public class BlockValues { diff --git a/src/main/java/com/iridium/iridiumteams/configs/Configuration.java b/src/main/java/com/iridium/iridiumteams/configs/Configuration.java index 25415c2c..b401e121 100755 --- a/src/main/java/com/iridium/iridiumteams/configs/Configuration.java +++ b/src/main/java/com/iridium/iridiumteams/configs/Configuration.java @@ -1,9 +1,9 @@ package com.iridium.iridiumteams.configs; +import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XSound; 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.iridiumcore.utils.NumberFormatter; import com.iridium.iridiumteams.Reward; import com.iridium.iridiumteams.UserRank; diff --git a/src/main/java/com/iridium/iridiumteams/configs/Enhancements.java b/src/main/java/com/iridium/iridiumteams/configs/Enhancements.java index cf39b9d4..1a24fe6c 100755 --- a/src/main/java/com/iridium/iridiumteams/configs/Enhancements.java +++ b/src/main/java/com/iridium/iridiumteams/configs/Enhancements.java @@ -1,9 +1,9 @@ package com.iridium.iridiumteams.configs; +import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XPotion; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; -import com.iridium.iridiumcore.dependencies.xseries.XPotion; import com.iridium.iridiumteams.enhancements.*; import java.util.Arrays; diff --git a/src/main/java/com/iridium/iridiumteams/configs/Inventories.java b/src/main/java/com/iridium/iridiumteams/configs/Inventories.java index 63826e64..5a6b3c79 100755 --- a/src/main/java/com/iridium/iridiumteams/configs/Inventories.java +++ b/src/main/java/com/iridium/iridiumteams/configs/Inventories.java @@ -1,10 +1,10 @@ package com.iridium.iridiumteams.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.iridiumteams.configs.inventories.*; import com.iridium.iridiumteams.missions.MissionType; diff --git a/src/main/java/com/iridium/iridiumteams/configs/Missions.java b/src/main/java/com/iridium/iridiumteams/configs/Missions.java index e695e395..92cf6ac5 100644 --- a/src/main/java/com/iridium/iridiumteams/configs/Missions.java +++ b/src/main/java/com/iridium/iridiumteams/configs/Missions.java @@ -1,10 +1,10 @@ package com.iridium.iridiumteams.configs; +import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XSound; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnoreProperties; -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; diff --git a/src/main/java/com/iridium/iridiumteams/configs/Permissions.java b/src/main/java/com/iridium/iridiumteams/configs/Permissions.java index 53064407..76a8be3d 100755 --- a/src/main/java/com/iridium/iridiumteams/configs/Permissions.java +++ b/src/main/java/com/iridium/iridiumteams/configs/Permissions.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams.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/iridiumteams/configs/Settings.java b/src/main/java/com/iridium/iridiumteams/configs/Settings.java index f245d502..0b5ea09d 100644 --- a/src/main/java/com/iridium/iridiumteams/configs/Settings.java +++ b/src/main/java/com/iridium/iridiumteams/configs/Settings.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams.configs; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumteams.Setting; import java.util.Arrays; diff --git a/src/main/java/com/iridium/iridiumteams/configs/Shop.java b/src/main/java/com/iridium/iridiumteams/configs/Shop.java index 2bf8e421..9bf71676 100644 --- a/src/main/java/com/iridium/iridiumteams/configs/Shop.java +++ b/src/main/java/com/iridium/iridiumteams/configs/Shop.java @@ -1,11 +1,11 @@ package com.iridium.iridiumteams.configs; +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.XMaterial; -import com.iridium.iridiumcore.dependencies.xseries.XSound; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/iridium/iridiumteams/configs/Top.java b/src/main/java/com/iridium/iridiumteams/configs/Top.java index 2b9a4303..81f2c2ef 100644 --- a/src/main/java/com/iridium/iridiumteams/configs/Top.java +++ b/src/main/java/com/iridium/iridiumteams/configs/Top.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams.configs; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.sorting.ExperienceTeamSort; import com.iridium.iridiumteams.sorting.ValueTeamSort; diff --git a/src/main/java/com/iridium/iridiumteams/database/IridiumUser.java b/src/main/java/com/iridium/iridiumteams/database/IridiumUser.java index 882f6a37..b91f5c59 100755 --- a/src/main/java/com/iridium/iridiumteams/database/IridiumUser.java +++ b/src/main/java/com/iridium/iridiumteams/database/IridiumUser.java @@ -6,7 +6,6 @@ import com.j256.ormlite.table.DatabaseTable; import lombok.Getter; import org.bukkit.Bukkit; -import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; diff --git a/src/main/java/com/iridium/iridiumteams/database/TeamBlock.java b/src/main/java/com/iridium/iridiumteams/database/TeamBlock.java index 4822314c..e8316816 100755 --- a/src/main/java/com/iridium/iridiumteams/database/TeamBlock.java +++ b/src/main/java/com/iridium/iridiumteams/database/TeamBlock.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.database; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.table.DatabaseTable; import lombok.Getter; diff --git a/src/main/java/com/iridium/iridiumteams/database/TeamWarp.java b/src/main/java/com/iridium/iridiumteams/database/TeamWarp.java index 2e0e7150..368c720e 100755 --- a/src/main/java/com/iridium/iridiumteams/database/TeamWarp.java +++ b/src/main/java/com/iridium/iridiumteams/database/TeamWarp.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.database; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.j256.ormlite.field.DatabaseField; import com.j256.ormlite.table.DatabaseTable; import lombok.Getter; diff --git a/src/main/java/com/iridium/iridiumteams/database/types/XMaterialType.java b/src/main/java/com/iridium/iridiumteams/database/types/XMaterialType.java index d8b83f1b..e02c92bb 100644 --- a/src/main/java/com/iridium/iridiumteams/database/types/XMaterialType.java +++ b/src/main/java/com/iridium/iridiumteams/database/types/XMaterialType.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.database.types; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.j256.ormlite.field.FieldType; import com.j256.ormlite.field.SqlType; import com.j256.ormlite.field.types.StringType; diff --git a/src/main/java/com/iridium/iridiumteams/enhancements/EnhancementData.java b/src/main/java/com/iridium/iridiumteams/enhancements/EnhancementData.java index 4da7a18e..ceff0ed3 100755 --- a/src/main/java/com/iridium/iridiumteams/enhancements/EnhancementData.java +++ b/src/main/java/com/iridium/iridiumteams/enhancements/EnhancementData.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.enhancements; -import com.iridium.iridiumcore.dependencies.fasterxml.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.iridium.iridiumcore.utils.Placeholder; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; diff --git a/src/main/java/com/iridium/iridiumteams/enhancements/PotionEnhancementData.java b/src/main/java/com/iridium/iridiumteams/enhancements/PotionEnhancementData.java index b264953f..46cfd901 100755 --- a/src/main/java/com/iridium/iridiumteams/enhancements/PotionEnhancementData.java +++ b/src/main/java/com/iridium/iridiumteams/enhancements/PotionEnhancementData.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.enhancements; -import com.iridium.iridiumcore.dependencies.xseries.XPotion; +import com.cryptomorin.xseries.XPotion; import lombok.NoArgsConstructor; import java.util.List; diff --git a/src/main/java/com/iridium/iridiumteams/gui/BankGUI.java b/src/main/java/com/iridium/iridiumteams/gui/BankGUI.java index dfd224c7..ca1fa9f1 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/BankGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/BankGUI.java @@ -11,6 +11,7 @@ import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.database.TeamBank; 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; @@ -23,8 +24,8 @@ public class BankGUI> extends BackGUI { private final T team; private final IridiumTeams iridiumTeams; - public BankGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().bankGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public BankGUI(T team, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().bankGUI.background, player, iridiumTeams.getInventories().backButton); this.team = team; this.iridiumTeams = iridiumTeams; } diff --git a/src/main/java/com/iridium/iridiumteams/gui/BlockValueGUI.java b/src/main/java/com/iridium/iridiumteams/gui/BlockValueGUI.java index 51bd7455..02ed2c76 100644 --- a/src/main/java/com/iridium/iridiumteams/gui/BlockValueGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/BlockValueGUI.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.gui; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.gui.PagedGUI; import com.iridium.iridiumcore.utils.ItemStackUtils; import com.iridium.iridiumcore.utils.StringUtils; @@ -9,16 +9,16 @@ import com.iridium.iridiumteams.configs.inventories.NoItemGUI; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; - -import lombok.Getter; import org.bukkit.Bukkit; -import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; - import org.jetbrains.annotations.NotNull; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; public class BlockValueGUI> extends PagedGUI { @@ -26,14 +26,14 @@ public class BlockValueGUI> extends Pag private final T team; private final IridiumTeams iridiumTeams; - public BlockValueGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { + public BlockValueGUI(T team, Player player, IridiumTeams iridiumTeams) { super( 1, iridiumTeams.getInventories().blockValueGUI.size, iridiumTeams.getInventories().blockValueGUI.background, iridiumTeams.getInventories().previousPage, iridiumTeams.getInventories().nextPage, - previousInventory, + player, iridiumTeams.getInventories().backButton ); this.team = team; diff --git a/src/main/java/com/iridium/iridiumteams/gui/BlockValuesTypeSelectorGUI.java b/src/main/java/com/iridium/iridiumteams/gui/BlockValuesTypeSelectorGUI.java index 17f4834e..2f0bf32a 100644 --- a/src/main/java/com/iridium/iridiumteams/gui/BlockValuesTypeSelectorGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/BlockValuesTypeSelectorGUI.java @@ -8,8 +8,8 @@ import com.iridium.iridiumteams.configs.inventories.NoItemGUI; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; - 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; @@ -19,8 +19,8 @@ public class BlockValuesTypeSelectorGUI private final IridiumTeams iridiumTeams; private final String teamArg; - public BlockValuesTypeSelectorGUI(String teamArg, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().blockValuesTypeSelectorGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public BlockValuesTypeSelectorGUI(String teamArg, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().blockValuesTypeSelectorGUI.background, player, iridiumTeams.getInventories().backButton); this.iridiumTeams = iridiumTeams; this.teamArg = teamArg; } diff --git a/src/main/java/com/iridium/iridiumteams/gui/BoostersGUI.java b/src/main/java/com/iridium/iridiumteams/gui/BoostersGUI.java index 58ed37b7..f2d2784e 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/BoostersGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/BoostersGUI.java @@ -13,6 +13,7 @@ import com.iridium.iridiumteams.enhancements.EnhancementData; import com.iridium.iridiumteams.enhancements.EnhancementType; 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; @@ -25,8 +26,8 @@ public class BoostersGUI> extends BackG private final IridiumTeams iridiumTeams; private final Map boosters = new HashMap<>(); - public BoostersGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().boostersGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public BoostersGUI(T team, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().boostersGUI.background, player, iridiumTeams.getInventories().backButton); this.team = team; this.iridiumTeams = iridiumTeams; } diff --git a/src/main/java/com/iridium/iridiumteams/gui/InvitesGUI.java b/src/main/java/com/iridium/iridiumteams/gui/InvitesGUI.java index e25b3eb4..90d5c480 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/InvitesGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/InvitesGUI.java @@ -10,6 +10,7 @@ import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.database.TeamInvite; 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; @@ -26,14 +27,14 @@ public class InvitesGUI> extends PagedG private final T team; private final IridiumTeams iridiumTeams; - public InvitesGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { + public InvitesGUI(T team, Player player, IridiumTeams iridiumTeams) { super( 1, iridiumTeams.getInventories().invitesGUI.size, iridiumTeams.getInventories().invitesGUI.background, iridiumTeams.getInventories().previousPage, iridiumTeams.getInventories().nextPage, - previousInventory, + player, iridiumTeams.getInventories().backButton ); this.team = team; diff --git a/src/main/java/com/iridium/iridiumteams/gui/MembersGUI.java b/src/main/java/com/iridium/iridiumteams/gui/MembersGUI.java index 51df6594..d8ac7c86 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/MembersGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/MembersGUI.java @@ -8,6 +8,7 @@ import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; 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; @@ -20,14 +21,14 @@ public class MembersGUI> extends PagedG private final IridiumTeams iridiumTeams; private final T team; - public MembersGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { + public MembersGUI(T team, Player player, IridiumTeams iridiumTeams) { super( 1, iridiumTeams.getInventories().membersGUI.size, iridiumTeams.getInventories().membersGUI.background, iridiumTeams.getInventories().previousPage, iridiumTeams.getInventories().nextPage, - previousInventory, + player, iridiumTeams.getInventories().backButton ); this.iridiumTeams = iridiumTeams; diff --git a/src/main/java/com/iridium/iridiumteams/gui/MissionGUI.java b/src/main/java/com/iridium/iridiumteams/gui/MissionGUI.java index 6132f313..8a0f211e 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/MissionGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/MissionGUI.java @@ -14,6 +14,7 @@ import com.iridium.iridiumteams.missions.MissionType; import lombok.Getter; import org.bukkit.Bukkit; +import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; @@ -30,8 +31,8 @@ public class MissionGUI> extends BackGU private final MissionType missionType; private final IridiumTeams iridiumTeams; - public MissionGUI(T team, MissionType missionType, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().missionGUI.get(missionType).background, previousInventory, iridiumTeams.getInventories().backButton); + public MissionGUI(T team, MissionType missionType, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().missionGUI.get(missionType).background, player, iridiumTeams.getInventories().backButton); this.team = team; this.missionType = missionType; this.iridiumTeams = iridiumTeams; diff --git a/src/main/java/com/iridium/iridiumteams/gui/MissionTypeSelectorGUI.java b/src/main/java/com/iridium/iridiumteams/gui/MissionTypeSelectorGUI.java index 02119936..6aef34aa 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/MissionTypeSelectorGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/MissionTypeSelectorGUI.java @@ -9,6 +9,7 @@ import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; 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; @@ -17,8 +18,8 @@ public class MissionTypeSelectorGUI> ex private final IridiumTeams iridiumTeams; - public MissionTypeSelectorGUI(Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().missionTypeSelectorGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public MissionTypeSelectorGUI(Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().missionTypeSelectorGUI.background, player, iridiumTeams.getInventories().backButton); this.iridiumTeams = iridiumTeams; } diff --git a/src/main/java/com/iridium/iridiumteams/gui/PermissionsGUI.java b/src/main/java/com/iridium/iridiumteams/gui/PermissionsGUI.java index ebfd8f49..0057265f 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/PermissionsGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/PermissionsGUI.java @@ -10,6 +10,7 @@ import com.iridium.iridiumteams.database.Team; import lombok.Getter; 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; @@ -26,16 +27,16 @@ public class PermissionsGUI> extends Ba @Getter private int page; - public PermissionsGUI(T team, int rank, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().permissionsGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public PermissionsGUI(T team, int rank, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().permissionsGUI.background, player, iridiumTeams.getInventories().backButton); this.iridiumTeams = iridiumTeams; this.team = team; this.rank = rank; this.page = 1; } - public PermissionsGUI(T team, int rank, int page, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().permissionsGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public PermissionsGUI(T team, int rank, int page, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().permissionsGUI.background, player, iridiumTeams.getInventories().backButton); this.iridiumTeams = iridiumTeams; this.team = team; diff --git a/src/main/java/com/iridium/iridiumteams/gui/RanksGUI.java b/src/main/java/com/iridium/iridiumteams/gui/RanksGUI.java index 358cef41..3e81de21 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/RanksGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/RanksGUI.java @@ -8,6 +8,7 @@ import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; 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; @@ -19,8 +20,8 @@ public class RanksGUI> extends BackGUI private final IridiumTeams iridiumTeams; private final T team; - public RanksGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().ranksGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public RanksGUI(T team, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().ranksGUI.background, player, iridiumTeams.getInventories().backButton); this.team = team; this.iridiumTeams = iridiumTeams; } @@ -48,7 +49,7 @@ public void onInventoryClick(InventoryClickEvent event) { for (Map.Entry userRank : iridiumTeams.getUserRanks().entrySet()) { if (event.getSlot() != userRank.getValue().item.slot) continue; - event.getWhoClicked().openInventory(new PermissionsGUI<>(team, userRank.getKey(), event.getWhoClicked().getOpenInventory().getTopInventory(), iridiumTeams).getInventory()); + event.getWhoClicked().openInventory(new PermissionsGUI<>(team, userRank.getKey(), (Player) event.getWhoClicked(), iridiumTeams).getInventory()); return; } } diff --git a/src/main/java/com/iridium/iridiumteams/gui/RewardsGUI.java b/src/main/java/com/iridium/iridiumteams/gui/RewardsGUI.java index 26cd6797..8a56e4ef 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/RewardsGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/RewardsGUI.java @@ -23,14 +23,14 @@ public class RewardsGUI> extends PagedG private final IridiumTeams iridiumTeams; private final T team; - public RewardsGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { + public RewardsGUI(T team, Player player, IridiumTeams iridiumTeams) { super( 1, iridiumTeams.getInventories().rewardsGUI.size, iridiumTeams.getInventories().rewardsGUI.background, iridiumTeams.getInventories().previousPage, iridiumTeams.getInventories().nextPage, - previousInventory, + player, iridiumTeams.getInventories().backButton ); this.iridiumTeams = iridiumTeams; diff --git a/src/main/java/com/iridium/iridiumteams/gui/SettingsGUI.java b/src/main/java/com/iridium/iridiumteams/gui/SettingsGUI.java index 269707a0..9106dd88 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/SettingsGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/SettingsGUI.java @@ -10,6 +10,7 @@ import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.database.TeamSetting; 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; @@ -22,8 +23,8 @@ public class SettingsGUI> extends BackG private final IridiumTeams iridiumTeams; private final T team; - public SettingsGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().settingsGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public SettingsGUI(T team, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().settingsGUI.background, player, iridiumTeams.getInventories().backButton); this.iridiumTeams = iridiumTeams; this.team = team; } diff --git a/src/main/java/com/iridium/iridiumteams/gui/ShopCategoryGUI.java b/src/main/java/com/iridium/iridiumteams/gui/ShopCategoryGUI.java index 80a7f997..f2231d06 100644 --- a/src/main/java/com/iridium/iridiumteams/gui/ShopCategoryGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/ShopCategoryGUI.java @@ -28,8 +28,8 @@ public class ShopCategoryGUI> extends B @Getter private int page; - public ShopCategoryGUI(String categoryName, Inventory previousInventory, int page, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().shopCategoryGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public ShopCategoryGUI(String categoryName, Player player, int page, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().shopCategoryGUI.background, player, iridiumTeams.getInventories().backButton); this.iridiumTeams = iridiumTeams; this.categoryName = categoryName; this.shopCategory = iridiumTeams.getShop().categories.get(categoryName); diff --git a/src/main/java/com/iridium/iridiumteams/gui/ShopOverviewGUI.java b/src/main/java/com/iridium/iridiumteams/gui/ShopOverviewGUI.java index 2f48b1ec..16362b77 100644 --- a/src/main/java/com/iridium/iridiumteams/gui/ShopOverviewGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/ShopOverviewGUI.java @@ -9,6 +9,7 @@ import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; 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; @@ -18,8 +19,8 @@ public class ShopOverviewGUI> extends BackGUI { private final IridiumTeams iridiumTeams; - public ShopOverviewGUI(Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().shopOverviewGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public ShopOverviewGUI(Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().shopOverviewGUI.background, player, iridiumTeams.getInventories().backButton); this.iridiumTeams = iridiumTeams; } @@ -45,7 +46,7 @@ public void addContent(Inventory inventory) { public void onInventoryClick(InventoryClickEvent event) { for (Map.Entry category : iridiumTeams.getShop().categories.entrySet()) { if (event.getSlot() != category.getValue().item.slot) continue; - event.getWhoClicked().openInventory(new ShopCategoryGUI<>(category.getKey(), event.getWhoClicked().getOpenInventory().getTopInventory(), 1, iridiumTeams).getInventory()); + event.getWhoClicked().openInventory(new ShopCategoryGUI<>(category.getKey(), (Player) event.getWhoClicked(), 1, iridiumTeams).getInventory()); return; } super.onInventoryClick(event); diff --git a/src/main/java/com/iridium/iridiumteams/gui/SpawnerValueGUI.java b/src/main/java/com/iridium/iridiumteams/gui/SpawnerValueGUI.java index 7b27cbd7..5922ef5c 100644 --- a/src/main/java/com/iridium/iridiumteams/gui/SpawnerValueGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/SpawnerValueGUI.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.gui; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.gui.PagedGUI; import com.iridium.iridiumcore.utils.ItemStackUtils; import com.iridium.iridiumcore.utils.StringUtils; @@ -9,14 +9,17 @@ import com.iridium.iridiumteams.configs.inventories.NoItemGUI; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; -import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.entity.EntityType; +import org.bukkit.entity.Player; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; import java.util.stream.Collectors; public class SpawnerValueGUI> extends PagedGUI { @@ -24,14 +27,14 @@ public class SpawnerValueGUI> extends P private final T team; private final IridiumTeams iridiumTeams; - public SpawnerValueGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { + public SpawnerValueGUI(T team, Player player, IridiumTeams iridiumTeams) { super( 1, iridiumTeams.getInventories().spawnerValueGUI.size, iridiumTeams.getInventories().spawnerValueGUI.background, iridiumTeams.getInventories().previousPage, iridiumTeams.getInventories().nextPage, - previousInventory, + player, iridiumTeams.getInventories().backButton ); this.team = team; diff --git a/src/main/java/com/iridium/iridiumteams/gui/TopGUI.java b/src/main/java/com/iridium/iridiumteams/gui/TopGUI.java index 5f71aa80..1ba1590e 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/TopGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/TopGUI.java @@ -12,6 +12,7 @@ import lombok.Getter; import lombok.Setter; 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; @@ -28,8 +29,8 @@ public class TopGUI> extends BackGUI { @Getter(AccessLevel.NONE) private final IridiumTeams iridiumTeams; - public TopGUI(TeamSorting sortingType, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().topGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public TopGUI(TeamSorting sortingType, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().topGUI.background, player, iridiumTeams.getInventories().backButton); this.sortingType = sortingType; this.iridiumTeams = iridiumTeams; } diff --git a/src/main/java/com/iridium/iridiumteams/gui/TrustsGUI.java b/src/main/java/com/iridium/iridiumteams/gui/TrustsGUI.java index 315b2f8d..10e54312 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/TrustsGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/TrustsGUI.java @@ -8,9 +8,9 @@ import com.iridium.iridiumteams.configs.inventories.NoItemGUI; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; -import com.iridium.iridiumteams.database.TeamInvite; import com.iridium.iridiumteams.database.TeamTrust; 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; @@ -27,14 +27,14 @@ public class TrustsGUI> extends PagedGU private final T team; private final IridiumTeams iridiumTeams; - public TrustsGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { + public TrustsGUI(T team, Player player, IridiumTeams iridiumTeams) { super( 1, iridiumTeams.getInventories().trustsGUI.size, iridiumTeams.getInventories().trustsGUI.background, iridiumTeams.getInventories().previousPage, iridiumTeams.getInventories().nextPage, - previousInventory, + player, iridiumTeams.getInventories().backButton ); this.team = team; diff --git a/src/main/java/com/iridium/iridiumteams/gui/UpgradesGUI.java b/src/main/java/com/iridium/iridiumteams/gui/UpgradesGUI.java index 82fe15af..c6bc517a 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/UpgradesGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/UpgradesGUI.java @@ -13,6 +13,7 @@ import com.iridium.iridiumteams.enhancements.EnhancementData; import com.iridium.iridiumteams.enhancements.EnhancementType; 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; @@ -25,8 +26,8 @@ public class UpgradesGUI> extends BackG private final IridiumTeams iridiumTeams; private final Map upgrades = new HashMap<>(); - public UpgradesGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().upgradesGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public UpgradesGUI(T team, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().upgradesGUI.background, player, iridiumTeams.getInventories().backButton); this.team = team; this.iridiumTeams = iridiumTeams; } diff --git a/src/main/java/com/iridium/iridiumteams/gui/WarpsGUI.java b/src/main/java/com/iridium/iridiumteams/gui/WarpsGUI.java index c63d14b0..47084dbd 100755 --- a/src/main/java/com/iridium/iridiumteams/gui/WarpsGUI.java +++ b/src/main/java/com/iridium/iridiumteams/gui/WarpsGUI.java @@ -11,6 +11,7 @@ import com.iridium.iridiumteams.database.TeamWarp; import org.bukkit.Bukkit; import org.bukkit.Material; +import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; @@ -27,8 +28,8 @@ public class WarpsGUI> extends BackGUI private final T team; private final IridiumTeams iridiumTeams; - public WarpsGUI(T team, Inventory previousInventory, IridiumTeams iridiumTeams) { - super(iridiumTeams.getInventories().warpsGUI.background, previousInventory, iridiumTeams.getInventories().backButton); + public WarpsGUI(T team, Player player, IridiumTeams iridiumTeams) { + super(iridiumTeams.getInventories().warpsGUI.background, player, iridiumTeams.getInventories().backButton); this.team = team; this.iridiumTeams = iridiumTeams; } diff --git a/src/main/java/com/iridium/iridiumteams/listeners/BlockBreakListener.java b/src/main/java/com/iridium/iridiumteams/listeners/BlockBreakListener.java index 8bae9e48..e75e45da 100755 --- a/src/main/java/com/iridium/iridiumteams/listeners/BlockBreakListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/BlockBreakListener.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.PermissionType; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/BlockGrowListener.java b/src/main/java/com/iridium/iridiumteams/listeners/BlockGrowListener.java index f8725bb9..8971756c 100644 --- a/src/main/java/com/iridium/iridiumteams/listeners/BlockGrowListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/BlockGrowListener.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; @@ -16,7 +16,6 @@ import org.bukkit.event.block.BlockGrowEvent; import org.bukkit.event.block.BlockSpreadEvent; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/BlockPlaceListener.java b/src/main/java/com/iridium/iridiumteams/listeners/BlockPlaceListener.java index 186ed04e..536926bc 100755 --- a/src/main/java/com/iridium/iridiumteams/listeners/BlockPlaceListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/BlockPlaceListener.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.PermissionType; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/EnchantItemListener.java b/src/main/java/com/iridium/iridiumteams/listeners/EnchantItemListener.java index 5f3c5d21..f72b7031 100644 --- a/src/main/java/com/iridium/iridiumteams/listeners/EnchantItemListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/EnchantItemListener.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/EntityChangeBlockListener.java b/src/main/java/com/iridium/iridiumteams/listeners/EntityChangeBlockListener.java index be8b4ee4..108f3e57 100644 --- a/src/main/java/com/iridium/iridiumteams/listeners/EntityChangeBlockListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/EntityChangeBlockListener.java @@ -8,7 +8,6 @@ import com.iridium.iridiumteams.database.TeamSetting; import lombok.AllArgsConstructor; import org.bukkit.entity.EntityType; -import org.bukkit.entity.FallingBlock; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.EntityBreakDoorEvent; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/EntityInteractListener.java b/src/main/java/com/iridium/iridiumteams/listeners/EntityInteractListener.java index 8f9fa5f8..e21eb2c2 100644 --- a/src/main/java/com/iridium/iridiumteams/listeners/EntityInteractListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/EntityInteractListener.java @@ -1,33 +1,16 @@ package com.iridium.iridiumteams.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; -import com.iridium.iridiumcore.utils.StringUtils; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.IridiumTeams; -import com.iridium.iridiumteams.PermissionType; import com.iridium.iridiumteams.SettingType; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.database.TeamSetting; -import com.iridium.iridiumteams.database.TeamSpawners; import lombok.AllArgsConstructor; -import org.bukkit.Material; -import org.bukkit.block.CreatureSpawner; -import org.bukkit.block.Sign; -import org.bukkit.entity.EntityType; -import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; -import org.bukkit.event.block.Action; import org.bukkit.event.entity.EntityInteractEvent; -import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.inventory.InventoryHolder; -import org.bukkit.inventory.meta.SpawnEggMeta; - -import java.util.Arrays; -import java.util.List; -import java.util.Optional; @AllArgsConstructor public class EntityInteractListener> implements Listener { diff --git a/src/main/java/com/iridium/iridiumteams/listeners/FurnaceSmeltListener.java b/src/main/java/com/iridium/iridiumteams/listeners/FurnaceSmeltListener.java index 5075a224..67948f36 100644 --- a/src/main/java/com/iridium/iridiumteams/listeners/FurnaceSmeltListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/FurnaceSmeltListener.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/LeavesDecayListener.java b/src/main/java/com/iridium/iridiumteams/listeners/LeavesDecayListener.java index f46f271d..7117d6f8 100644 --- a/src/main/java/com/iridium/iridiumteams/listeners/LeavesDecayListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/LeavesDecayListener.java @@ -7,7 +7,6 @@ import com.iridium.iridiumteams.database.TeamSetting; import lombok.AllArgsConstructor; import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; import org.bukkit.event.Listener; import org.bukkit.event.block.LeavesDecayEvent; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/PlayerCraftListener.java b/src/main/java/com/iridium/iridiumteams/listeners/PlayerCraftListener.java index 52e06d73..9d790cbf 100644 --- a/src/main/java/com/iridium/iridiumteams/listeners/PlayerCraftListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/PlayerCraftListener.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/PlayerInteractListener.java b/src/main/java/com/iridium/iridiumteams/listeners/PlayerInteractListener.java index e746128f..b0ed27b7 100644 --- a/src/main/java/com/iridium/iridiumteams/listeners/PlayerInteractListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/PlayerInteractListener.java @@ -1,6 +1,6 @@ package com.iridium.iridiumteams.listeners; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.PermissionType; @@ -11,7 +11,6 @@ import com.iridium.iridiumteams.database.TeamSpawners; import lombok.AllArgsConstructor; import org.bukkit.block.CreatureSpawner; -import org.bukkit.block.data.type.Sign; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; @@ -24,7 +23,6 @@ import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.SpawnEggMeta; -import org.jetbrains.annotations.NotNull; import java.util.Arrays; import java.util.List; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/PlayerMoveListener.java b/src/main/java/com/iridium/iridiumteams/listeners/PlayerMoveListener.java index 396edc5f..bb2f6166 100755 --- a/src/main/java/com/iridium/iridiumteams/listeners/PlayerMoveListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/PlayerMoveListener.java @@ -4,7 +4,6 @@ import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; -import com.iridium.iridiumteams.database.TeamPermission; import lombok.AllArgsConstructor; import org.bukkit.GameMode; import org.bukkit.Location; diff --git a/src/main/java/com/iridium/iridiumteams/listeners/SpawnerSpawnListener.java b/src/main/java/com/iridium/iridiumteams/listeners/SpawnerSpawnListener.java index 30de72cc..0a4161c3 100755 --- a/src/main/java/com/iridium/iridiumteams/listeners/SpawnerSpawnListener.java +++ b/src/main/java/com/iridium/iridiumteams/listeners/SpawnerSpawnListener.java @@ -6,8 +6,6 @@ import com.iridium.iridiumteams.database.TeamEnhancement; import com.iridium.iridiumteams.enhancements.Enhancement; import com.iridium.iridiumteams.enhancements.SpawnerEnhancementData; -import com.iridium.iridiumteams.support.SpawnerSupport; -import com.iridium.iridiumteams.support.StackerSupport; import lombok.AllArgsConstructor; import org.bukkit.block.CreatureSpawner; import org.bukkit.event.EventHandler; @@ -15,8 +13,6 @@ import org.bukkit.event.Listener; import org.bukkit.event.entity.SpawnerSpawnEvent; -import java.util.HashSet; - @AllArgsConstructor public class SpawnerSpawnListener> implements Listener { private final IridiumTeams iridiumTeams; diff --git a/src/main/java/com/iridium/iridiumteams/managers/SupportManager.java b/src/main/java/com/iridium/iridiumteams/managers/SupportManager.java index a1f3fa0c..5baf5274 100644 --- a/src/main/java/com/iridium/iridiumteams/managers/SupportManager.java +++ b/src/main/java/com/iridium/iridiumteams/managers/SupportManager.java @@ -4,7 +4,6 @@ import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.support.*; - import lombok.Getter; import org.bukkit.Bukkit; diff --git a/src/main/java/com/iridium/iridiumteams/managers/TeamManager.java b/src/main/java/com/iridium/iridiumteams/managers/TeamManager.java index 773d3640..d7ad5a64 100755 --- a/src/main/java/com/iridium/iridiumteams/managers/TeamManager.java +++ b/src/main/java/com/iridium/iridiumteams/managers/TeamManager.java @@ -1,9 +1,6 @@ package com.iridium.iridiumteams.managers; -import com.iridium.iridiumcore.dependencies.nbtapi.NBT; -import com.iridium.iridiumcore.dependencies.nbtapi.NBTType; -import com.iridium.iridiumcore.dependencies.paperlib.PaperLib; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.*; import com.iridium.iridiumteams.api.EnhancementUpdateEvent; @@ -15,7 +12,13 @@ import com.iridium.iridiumteams.missions.MissionType; import com.iridium.iridiumteams.sorting.TeamSorting; import com.iridium.iridiumteams.utils.PlayerUtils; -import org.bukkit.*; +import de.tr7zw.changeme.nbtapi.NBT; +import de.tr7zw.changeme.nbtapi.NBTType; +import io.papermc.lib.PaperLib; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.WeatherType; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.block.BlockBreakEvent; diff --git a/src/main/java/com/iridium/iridiumteams/missions/MissionData.java b/src/main/java/com/iridium/iridiumteams/missions/MissionData.java index d32a3c2f..802f4a39 100644 --- a/src/main/java/com/iridium/iridiumteams/missions/MissionData.java +++ b/src/main/java/com/iridium/iridiumteams/missions/MissionData.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams.missions; +import com.cryptomorin.xseries.XSound; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XSound; import com.iridium.iridiumteams.Reward; import lombok.AllArgsConstructor; import lombok.Getter; diff --git a/src/main/java/com/iridium/iridiumteams/placeholders/Placeholders.java b/src/main/java/com/iridium/iridiumteams/placeholders/Placeholders.java index d8683d1b..9b4a90bb 100644 --- a/src/main/java/com/iridium/iridiumteams/placeholders/Placeholders.java +++ b/src/main/java/com/iridium/iridiumteams/placeholders/Placeholders.java @@ -6,8 +6,8 @@ import com.iridium.iridiumteams.database.Team; import com.iridium.iridiumteams.managers.TeamManager; import org.bukkit.entity.Player; - import org.jetbrains.annotations.Nullable; + import java.util.ArrayList; import java.util.List; import java.util.Optional; diff --git a/src/main/java/com/iridium/iridiumteams/support/ObsidianStackerSupport.java b/src/main/java/com/iridium/iridiumteams/support/ObsidianStackerSupport.java index cc78fe76..e0481cdc 100644 --- a/src/main/java/com/iridium/iridiumteams/support/ObsidianStackerSupport.java +++ b/src/main/java/com/iridium/iridiumteams/support/ObsidianStackerSupport.java @@ -1,19 +1,15 @@ package com.iridium.iridiumteams.support; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; - -import com.moyskleytech.obsidianstacker.api.StackerAPI; import com.moyskleytech.obsidianstacker.api.Stack; - -import dev.rosewood.rosestacker.api.RoseStackerAPI; +import com.moyskleytech.obsidianstacker.api.StackerAPI; import org.bukkit.Chunk; import org.bukkit.block.Block; import java.util.*; -import java.util.stream.Collectors; public class ObsidianStackerSupport> implements StackerSupport { @@ -53,7 +49,7 @@ public int getStackAmount(Block block) { @Override public Map getBlocksStacked(Chunk chunk, T team) { - HashMap hashMap = new HashMap(); + HashMap hashMap = new HashMap<>(); return hashMap; } diff --git a/src/main/java/com/iridium/iridiumteams/support/RoseStackerSupport.java b/src/main/java/com/iridium/iridiumteams/support/RoseStackerSupport.java index 22e7bea2..515d1d9b 100644 --- a/src/main/java/com/iridium/iridiumteams/support/RoseStackerSupport.java +++ b/src/main/java/com/iridium/iridiumteams/support/RoseStackerSupport.java @@ -1,15 +1,12 @@ package com.iridium.iridiumteams.support; -import com.bgsoftware.wildstacker.api.WildStackerAPI; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; - import dev.rosewood.rosestacker.api.RoseStackerAPI; import dev.rosewood.rosestacker.stack.StackedBlock; import dev.rosewood.rosestacker.stack.StackedSpawner; - import org.bukkit.Chunk; import org.bukkit.block.Block; import org.bukkit.block.CreatureSpawner; @@ -82,7 +79,7 @@ public int getSpawnAmount(CreatureSpawner spawner) { @Override public Map getBlocksStacked(Chunk chunk, T team) { - HashMap hashMap = new HashMap(); + HashMap hashMap = new HashMap<>(); RoseStackerAPI.getInstance().getStackedBlocks(Collections.singletonList(chunk)).forEach(stackedBlock -> { if(iridiumTeams.getTeamManager().isInTeam(team, stackedBlock.getLocation()))return; diff --git a/src/main/java/com/iridium/iridiumteams/support/SpawnerSupport.java b/src/main/java/com/iridium/iridiumteams/support/SpawnerSupport.java index 986045c8..374c1633 100644 --- a/src/main/java/com/iridium/iridiumteams/support/SpawnerSupport.java +++ b/src/main/java/com/iridium/iridiumteams/support/SpawnerSupport.java @@ -1,7 +1,6 @@ package com.iridium.iridiumteams.support; import com.iridium.iridiumteams.database.Team; - import org.bukkit.Chunk; import org.bukkit.block.Block; import org.bukkit.block.CreatureSpawner; diff --git a/src/main/java/com/iridium/iridiumteams/support/StackerSupport.java b/src/main/java/com/iridium/iridiumteams/support/StackerSupport.java index 398a6437..6de3e244 100644 --- a/src/main/java/com/iridium/iridiumteams/support/StackerSupport.java +++ b/src/main/java/com/iridium/iridiumteams/support/StackerSupport.java @@ -1,14 +1,12 @@ package com.iridium.iridiumteams.support; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.database.Team; - import org.bukkit.Chunk; import org.bukkit.block.Block; import java.util.List; import java.util.Map; -import java.util.concurrent.CompletableFuture; public interface StackerSupport { int getExtraBlocks(T team, XMaterial material, List blocks); diff --git a/src/main/java/com/iridium/iridiumteams/support/WildStackerSupport.java b/src/main/java/com/iridium/iridiumteams/support/WildStackerSupport.java index db2a3287..de347451 100644 --- a/src/main/java/com/iridium/iridiumteams/support/WildStackerSupport.java +++ b/src/main/java/com/iridium/iridiumteams/support/WildStackerSupport.java @@ -2,14 +2,11 @@ import com.bgsoftware.wildstacker.api.WildStackerAPI; import com.bgsoftware.wildstacker.api.objects.StackedBarrel; -import com.bgsoftware.wildstacker.api.objects.StackedObject; import com.bgsoftware.wildstacker.api.objects.StackedSpawner; - -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.IridiumTeams; import com.iridium.iridiumteams.database.IridiumUser; import com.iridium.iridiumteams.database.Team; - import org.bukkit.Chunk; import org.bukkit.block.Block; import org.bukkit.block.CreatureSpawner; @@ -82,7 +79,7 @@ public int getSpawnAmount(CreatureSpawner spawner) { @Override public Map getBlocksStacked(Chunk chunk, T team) { - HashMap hashMap = new HashMap(); + HashMap hashMap = new HashMap<>(); WildStackerAPI.getWildStacker().getSystemManager().getStackedBarrels(chunk).forEach(stackedBarrel -> { if (iridiumTeams.getTeamManager().isInTeam(team, stackedBarrel.getLocation())) return; diff --git a/src/main/java/com/iridium/iridiumteams/utils/LocationUtils.java b/src/main/java/com/iridium/iridiumteams/utils/LocationUtils.java index 64b5ec9c..4fcbafa8 100644 --- a/src/main/java/com/iridium/iridiumteams/utils/LocationUtils.java +++ b/src/main/java/com/iridium/iridiumteams/utils/LocationUtils.java @@ -1,6 +1,7 @@ package com.iridium.iridiumteams.utils; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; +import com.iridium.iridiumcore.IridiumCore; import com.iridium.iridiumcore.multiversion.MultiVersion; import com.iridium.iridiumteams.IridiumTeams; import lombok.Setter; @@ -25,7 +26,7 @@ public class LocationUtils { ).map(XMaterial::parseMaterial).collect(Collectors.toList()); public static boolean isSafe(@NotNull Location location, IridiumTeams iridiumTeams) { - if (iridiumTeams.isTesting()) { + if (IridiumCore.isTesting()) { boolean safe = isSafeTesting; isSafeTesting = true; return safe; diff --git a/src/test/java/com/iridium/iridiumteams/TeamBuilder.java b/src/test/java/com/iridium/iridiumteams/TeamBuilder.java index d26bfdff..22c7654c 100755 --- a/src/test/java/com/iridium/iridiumteams/TeamBuilder.java +++ b/src/test/java/com/iridium/iridiumteams/TeamBuilder.java @@ -1,7 +1,7 @@ package com.iridium.iridiumteams; import be.seeseemelk.mockbukkit.ServerMock; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.database.TeamEnhancement; import com.iridium.iridiumteams.database.TeamReward; import com.iridium.testplugin.TestPlugin; diff --git a/src/test/java/com/iridium/iridiumteams/commands/AboutCommandTest.java b/src/test/java/com/iridium/iridiumteams/commands/AboutCommandTest.java index b5c5444e..c5a96947 100755 --- a/src/test/java/com/iridium/iridiumteams/commands/AboutCommandTest.java +++ b/src/test/java/com/iridium/iridiumteams/commands/AboutCommandTest.java @@ -4,17 +4,12 @@ import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; import com.iridium.iridiumcore.utils.StringUtils; -import com.iridium.iridiumteams.IridiumTeams; -import com.iridium.iridiumteams.support.SpawnerSupport; -import com.iridium.iridiumteams.support.StackerSupport; import com.iridium.testplugin.TestPlugin; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.HashSet; -import java.util.List; -import java.util.stream.Collectors; public class AboutCommandTest { diff --git a/src/test/java/com/iridium/iridiumteams/commands/BlockValueCommandTest.java b/src/test/java/com/iridium/iridiumteams/commands/BlockValueCommandTest.java index e0699f52..2b59f268 100644 --- a/src/test/java/com/iridium/iridiumteams/commands/BlockValueCommandTest.java +++ b/src/test/java/com/iridium/iridiumteams/commands/BlockValueCommandTest.java @@ -4,7 +4,6 @@ import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; import com.iridium.iridiumcore.utils.StringUtils; -import com.iridium.iridiumteams.Rank; import com.iridium.iridiumteams.SettingType; import com.iridium.iridiumteams.TeamBuilder; import com.iridium.iridiumteams.UserBuilder; @@ -17,7 +16,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertInstanceOf; class BlockValueCommandTest { diff --git a/src/test/java/com/iridium/iridiumteams/commands/EditWarpCommandTest.java b/src/test/java/com/iridium/iridiumteams/commands/EditWarpCommandTest.java index 5a58dd88..922acc31 100755 --- a/src/test/java/com/iridium/iridiumteams/commands/EditWarpCommandTest.java +++ b/src/test/java/com/iridium/iridiumteams/commands/EditWarpCommandTest.java @@ -3,7 +3,7 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.PermissionType; import com.iridium.iridiumteams.TeamBuilder; diff --git a/src/test/java/com/iridium/iridiumteams/commands/LevelCommandTest.java b/src/test/java/com/iridium/iridiumteams/commands/LevelCommandTest.java index d3753121..872fb4e0 100644 --- a/src/test/java/com/iridium/iridiumteams/commands/LevelCommandTest.java +++ b/src/test/java/com/iridium/iridiumteams/commands/LevelCommandTest.java @@ -16,7 +16,7 @@ import java.util.Arrays; import java.util.List; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; class LevelCommandTest { diff --git a/src/test/java/com/iridium/iridiumteams/commands/TrustsCommandTest.java b/src/test/java/com/iridium/iridiumteams/commands/TrustsCommandTest.java index 43fd0e4b..4ceb2fba 100755 --- a/src/test/java/com/iridium/iridiumteams/commands/TrustsCommandTest.java +++ b/src/test/java/com/iridium/iridiumteams/commands/TrustsCommandTest.java @@ -6,7 +6,6 @@ import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.TeamBuilder; import com.iridium.iridiumteams.UserBuilder; -import com.iridium.iridiumteams.gui.InvitesGUI; import com.iridium.iridiumteams.gui.TrustsGUI; import com.iridium.testplugin.TestPlugin; import com.iridium.testplugin.TestTeam; diff --git a/src/test/java/com/iridium/iridiumteams/database/TeamTest.java b/src/test/java/com/iridium/iridiumteams/database/TeamTest.java index 586ddc51..5212ddfd 100644 --- a/src/test/java/com/iridium/iridiumteams/database/TeamTest.java +++ b/src/test/java/com/iridium/iridiumteams/database/TeamTest.java @@ -2,17 +2,14 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; -import be.seeseemelk.mockbukkit.entity.PlayerMock; -import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.TeamBuilder; -import com.iridium.iridiumteams.UserBuilder; import com.iridium.testplugin.TestPlugin; import com.iridium.testplugin.TestTeam; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; class TeamTest { diff --git a/src/test/java/com/iridium/iridiumteams/gui/InventoryConfigGUITest.java b/src/test/java/com/iridium/iridiumteams/gui/InventoryConfigGUITest.java index b958f99c..2a369c60 100755 --- a/src/test/java/com/iridium/iridiumteams/gui/InventoryConfigGUITest.java +++ b/src/test/java/com/iridium/iridiumteams/gui/InventoryConfigGUITest.java @@ -3,10 +3,10 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; +import com.cryptomorin.xseries.XMaterial; import com.google.common.collect.ImmutableMap; import com.iridium.iridiumcore.Background; import com.iridium.iridiumcore.Item; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.UserBuilder; import com.iridium.iridiumteams.configs.inventories.InventoryConfig; diff --git a/src/test/java/com/iridium/iridiumteams/gui/PermissionsGUITest.java b/src/test/java/com/iridium/iridiumteams/gui/PermissionsGUITest.java index 13fa545c..98bbbc30 100755 --- a/src/test/java/com/iridium/iridiumteams/gui/PermissionsGUITest.java +++ b/src/test/java/com/iridium/iridiumteams/gui/PermissionsGUITest.java @@ -3,9 +3,9 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; +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.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.*; import com.iridium.testplugin.TestPlugin; diff --git a/src/test/java/com/iridium/iridiumteams/gui/RewardsGUITest.java b/src/test/java/com/iridium/iridiumteams/gui/RewardsGUITest.java index 299f8342..cd29f1a2 100644 --- a/src/test/java/com/iridium/iridiumteams/gui/RewardsGUITest.java +++ b/src/test/java/com/iridium/iridiumteams/gui/RewardsGUITest.java @@ -3,10 +3,10 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; +import com.cryptomorin.xseries.XMaterial; +import com.cryptomorin.xseries.XSound; 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.TeamBuilder; import com.iridium.iridiumteams.UserBuilder; diff --git a/src/test/java/com/iridium/iridiumteams/gui/ShopCategoryGUITest.java b/src/test/java/com/iridium/iridiumteams/gui/ShopCategoryGUITest.java index 6457c9de..9dce9d86 100644 --- a/src/test/java/com/iridium/iridiumteams/gui/ShopCategoryGUITest.java +++ b/src/test/java/com/iridium/iridiumteams/gui/ShopCategoryGUITest.java @@ -3,8 +3,8 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; +import com.cryptomorin.xseries.XMaterial; import com.google.common.collect.ImmutableMap; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumcore.utils.InventoryUtils; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.TeamBuilder; diff --git a/src/test/java/com/iridium/iridiumteams/listeners/PlayerInteractListenerTest.java b/src/test/java/com/iridium/iridiumteams/listeners/PlayerInteractListenerTest.java index c2a9e3cd..7711ca82 100644 --- a/src/test/java/com/iridium/iridiumteams/listeners/PlayerInteractListenerTest.java +++ b/src/test/java/com/iridium/iridiumteams/listeners/PlayerInteractListenerTest.java @@ -3,43 +3,30 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.block.BlockMock; -import be.seeseemelk.mockbukkit.entity.EntityMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; import com.iridium.iridiumcore.utils.StringUtils; -import com.iridium.iridiumteams.*; -import com.iridium.iridiumteams.database.IridiumUser; -import com.iridium.iridiumteams.database.Team; -import com.iridium.iridiumteams.database.TeamSetting; -import com.iridium.iridiumteams.database.TeamSpawners; +import com.iridium.iridiumteams.PermissionType; +import com.iridium.iridiumteams.SettingType; +import com.iridium.iridiumteams.TeamBuilder; +import com.iridium.iridiumteams.UserBuilder; import com.iridium.testplugin.TestPlugin; import com.iridium.testplugin.TestTeam; import com.iridium.testplugin.managers.TeamManager; import net.kyori.adventure.text.Component; import org.bukkit.Material; import org.bukkit.block.BlockFace; -import org.bukkit.block.CreatureSpawner; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; -import org.bukkit.entity.ItemFrame; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.block.SignChangeEvent; import org.bukkit.event.player.PlayerInteractEntityEvent; import org.bukkit.event.player.PlayerInteractEvent; -import org.bukkit.inventory.InventoryHolder; import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.inventory.meta.SpawnEggMeta; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; import java.util.Optional; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/src/test/java/com/iridium/iridiumteams/listeners/SpawnerSpawnListenerTest.java b/src/test/java/com/iridium/iridiumteams/listeners/SpawnerSpawnListenerTest.java index 29444895..8a5b17eb 100755 --- a/src/test/java/com/iridium/iridiumteams/listeners/SpawnerSpawnListenerTest.java +++ b/src/test/java/com/iridium/iridiumteams/listeners/SpawnerSpawnListenerTest.java @@ -9,25 +9,22 @@ import com.iridium.testplugin.TestPlugin; import com.iridium.testplugin.TestTeam; import com.iridium.testplugin.managers.TeamManager; -import net.kyori.adventure.text.Component; -import org.bukkit.*; -import org.bukkit.block.*; +import org.bukkit.Chunk; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.World; +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.block.CreatureSpawner; import org.bukkit.block.data.BlockData; -import org.bukkit.entity.*; -import org.bukkit.event.entity.CreatureSpawnEvent; -import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.entity.Entity; +import org.bukkit.entity.EntityType; import org.bukkit.event.entity.SpawnerSpawnEvent; -import org.bukkit.event.player.PlayerTeleportEvent; import org.bukkit.inventory.ItemStack; import org.bukkit.material.MaterialData; import org.bukkit.metadata.MetadataValue; -import org.bukkit.permissions.Permission; -import org.bukkit.permissions.PermissionAttachment; -import org.bukkit.permissions.PermissionAttachmentInfo; import org.bukkit.persistence.PersistentDataContainer; import org.bukkit.plugin.Plugin; -import org.bukkit.util.BoundingBox; -import org.bukkit.util.Vector; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import org.junit.jupiter.api.AfterEach; @@ -36,8 +33,6 @@ import java.util.List; import java.util.Optional; -import java.util.Set; -import java.util.UUID; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/com/iridium/iridiumteams/managers/CommandManagerTest.java b/src/test/java/com/iridium/iridiumteams/managers/CommandManagerTest.java index 36e1a4ff..be19f88a 100755 --- a/src/test/java/com/iridium/iridiumteams/managers/CommandManagerTest.java +++ b/src/test/java/com/iridium/iridiumteams/managers/CommandManagerTest.java @@ -20,9 +20,7 @@ import java.util.List; import java.util.Optional; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertTrue; -import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.*; class CommandManagerTest { diff --git a/src/test/java/com/iridium/iridiumteams/managers/MissionManagerTest.java b/src/test/java/com/iridium/iridiumteams/managers/MissionManagerTest.java index 1b111a16..7d770790 100644 --- a/src/test/java/com/iridium/iridiumteams/managers/MissionManagerTest.java +++ b/src/test/java/com/iridium/iridiumteams/managers/MissionManagerTest.java @@ -17,11 +17,10 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import java.util.Arrays; import java.util.Collections; import java.util.List; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertEquals; class MissionManagerTest { diff --git a/src/test/java/com/iridium/iridiumteams/managers/ShopManagerTest.java b/src/test/java/com/iridium/iridiumteams/managers/ShopManagerTest.java index 267fc866..9ac79a4f 100644 --- a/src/test/java/com/iridium/iridiumteams/managers/ShopManagerTest.java +++ b/src/test/java/com/iridium/iridiumteams/managers/ShopManagerTest.java @@ -3,7 +3,7 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; import be.seeseemelk.mockbukkit.entity.PlayerMock; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumcore.utils.InventoryUtils; import com.iridium.iridiumcore.utils.StringUtils; import com.iridium.iridiumteams.UserBuilder; diff --git a/src/test/java/com/iridium/iridiumteams/managers/SupportManagerTest.java b/src/test/java/com/iridium/iridiumteams/managers/SupportManagerTest.java index 8a663692..55cc58b5 100644 --- a/src/test/java/com/iridium/iridiumteams/managers/SupportManagerTest.java +++ b/src/test/java/com/iridium/iridiumteams/managers/SupportManagerTest.java @@ -2,13 +2,12 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; -import com.iridium.iridiumteams.support.*; import com.iridium.testplugin.TestPlugin; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import static org.junit.jupiter.api.Assertions.*; +import static org.junit.jupiter.api.Assertions.assertTrue; class SupportManagerTest { private ServerMock serverMock; diff --git a/src/test/java/com/iridium/iridiumteams/managers/TeamManagerTest.java b/src/test/java/com/iridium/iridiumteams/managers/TeamManagerTest.java index e61dc358..dc4017f6 100644 --- a/src/test/java/com/iridium/iridiumteams/managers/TeamManagerTest.java +++ b/src/test/java/com/iridium/iridiumteams/managers/TeamManagerTest.java @@ -2,11 +2,10 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.TeamBuilder; import com.iridium.testplugin.TestPlugin; import com.iridium.testplugin.TestTeam; -import com.iridium.testplugin.managers.TeamManager; import org.bukkit.entity.EntityType; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; diff --git a/src/test/java/com/iridium/iridiumteams/sorting/ValueTeamSortTest.java b/src/test/java/com/iridium/iridiumteams/sorting/ValueTeamSortTest.java index 02fa2f0c..4a9af157 100644 --- a/src/test/java/com/iridium/iridiumteams/sorting/ValueTeamSortTest.java +++ b/src/test/java/com/iridium/iridiumteams/sorting/ValueTeamSortTest.java @@ -2,7 +2,7 @@ import be.seeseemelk.mockbukkit.MockBukkit; import be.seeseemelk.mockbukkit.ServerMock; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.TeamBuilder; import com.iridium.testplugin.TestPlugin; import com.iridium.testplugin.TestTeam; diff --git a/src/test/java/com/iridium/testplugin/managers/TeamManager.java b/src/test/java/com/iridium/testplugin/managers/TeamManager.java index ddd6bf64..baedb248 100755 --- a/src/test/java/com/iridium/testplugin/managers/TeamManager.java +++ b/src/test/java/com/iridium/testplugin/managers/TeamManager.java @@ -1,6 +1,6 @@ package com.iridium.testplugin.managers; -import com.iridium.iridiumcore.dependencies.xseries.XMaterial; +import com.cryptomorin.xseries.XMaterial; import com.iridium.iridiumteams.Rank; import com.iridium.iridiumteams.Setting; import com.iridium.iridiumteams.database.*;