From cc5fe921438d5177cee1dfd3c3523ace3c7f1e8b Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 18 Mar 2021 12:57:37 -0700 Subject: [PATCH] Fix compiler errors on FlatFileDatabase --- .../com/gmail/nossr50/chat/ChatManager.java | 4 +- .../nossr50/chat/mailer/PartyChatMailer.java | 2 +- .../chat/message/PartyChatMessage.java | 4 +- .../database/ConvertDatabaseCommand.java | 2 +- .../commands/skills/TridentsCommand.java | 1 - .../java/com/gmail/nossr50/config/Config.java | 3 +- .../config/experience/ExperienceConfig.java | 1 - .../nossr50/database/DatabaseManager.java | 5 +- .../database/FlatFileDatabaseManager.java | 77 ++++++++++++++----- .../nossr50/database/SQLDatabaseManager.java | 5 +- .../OfflineExperienceProcessor.java | 1 - .../experience/OnlineExperienceProcessor.java | 12 +-- .../datatypes/player/AbstractMMOPlayer.java | 15 +++- .../datatypes/player/MMODataBuilder.java | 8 +- .../datatypes/player/MMODataSnapshot.java | 3 - .../nossr50/datatypes/player/McMMOPlayer.java | 4 +- .../nossr50/datatypes/player/PlayerData.java | 8 +- .../datatypes/player/PlayerProfile.java | 7 +- .../datatypes/skills/CoreRootSkill.java | 1 - .../skills/subskills/acrobatics/Roll.java | 2 +- .../skills/subskills/interfaces/SubSkill.java | 2 +- .../nossr50/listeners/BlockListener.java | 2 +- .../nossr50/listeners/EntityListener.java | 3 +- .../nossr50/listeners/InventoryListener.java | 2 +- .../nossr50/listeners/PlayerListener.java | 7 +- .../gmail/nossr50/listeners/SelfListener.java | 2 +- .../gmail/nossr50/party/PartyManagerImpl.java | 7 +- .../nossr50/party/PartyMemberManagerImpl.java | 2 +- .../com/gmail/nossr50/party/ShareHandler.java | 8 +- .../nossr50/runnables/SaveTimerTask.java | 2 +- .../commands/MctopCommandAsyncTask.java | 1 - .../commands/MctopCommandDisplayTask.java | 2 - .../runnables/items/ChimaeraWingWarmup.java | 1 - .../runnables/items/TeleportationWarmup.java | 3 +- .../runnables/party/PartyAutoKickTask.java | 2 +- .../runnables/skills/AbilityCooldownTask.java | 2 +- .../runnables/skills/AbilityDisableTask.java | 2 +- .../runnables/skills/AwardCombatXpTask.java | 2 +- .../skills/ExperienceBarHideTask.java | 3 +- .../skills/SkillUnlockNotificationTask.java | 2 +- .../runnables/skills/ToolLowerTask.java | 2 +- .../gmail/nossr50/skills/SkillManager.java | 2 +- .../skills/acrobatics/AcrobaticsManager.java | 2 +- .../skills/alchemy/AlchemyManager.java | 2 +- .../gmail/nossr50/skills/archery/Archery.java | 3 +- .../skills/archery/ArcheryManager.java | 2 +- .../nossr50/skills/axes/AxesManager.java | 2 +- .../nossr50/skills/child/FamilyTree.java | 1 - .../skills/crossbows/CrossbowsManager.java | 2 +- .../skills/excavation/ExcavationManager.java | 2 +- .../skills/fishing/FishingManager.java | 2 +- .../skills/herbalism/HerbalismManager.java | 2 +- .../nossr50/skills/mining/MiningManager.java | 2 +- .../nossr50/skills/repair/RepairManager.java | 2 +- .../skills/salvage/SalvageManager.java | 2 +- .../skills/smelting/SmeltingManager.java | 2 +- .../nossr50/skills/swords/SwordsManager.java | 2 +- .../nossr50/skills/taming/TamingManager.java | 2 +- .../skills/tridents/TridentsManager.java | 2 +- .../skills/unarmed/UnarmedManager.java | 2 +- .../woodcutting/WoodcuttingManager.java | 2 +- .../com/gmail/nossr50/util/ChimaeraWing.java | 2 +- .../com/gmail/nossr50/util/EventUtils.java | 5 +- .../gmail/nossr50/util/HolidayManager.java | 2 +- .../java/com/gmail/nossr50/util/Misc.java | 2 +- .../com/gmail/nossr50/util/Permissions.java | 1 - .../nossr50/util/commands/CommandUtils.java | 2 +- .../util/experience/ExperienceBarWrapper.java | 3 - .../util/experience/ExperienceUtils.java | 2 +- .../experience/MMOExperienceBarManager.java | 6 +- .../input/AbilityActivationProcessor.java | 4 +- .../util/input/SuperSkillManagerImpl.java | 2 +- .../util/player/NotificationManager.java | 6 +- .../gmail/nossr50/util/player/PartyUtils.java | 2 +- .../nossr50/util/player/PlayerLevelUtils.java | 4 +- .../util/scoreboards/ScoreboardManager.java | 1 - .../util/scoreboards/ScoreboardWrapper.java | 2 +- .../nossr50/util/skills/CombatUtils.java | 2 +- .../gmail/nossr50/util/skills/PerksUtils.java | 1 - .../gmail/nossr50/util/skills/RankUtils.java | 2 +- .../gmail/nossr50/util/skills/SkillUtils.java | 2 +- .../nossr50/util/skills/SmeltingTracker.java | 2 +- .../gmail/nossr50/util/text/StringUtils.java | 2 +- .../util/text/TextComponentFactory.java | 6 +- 84 files changed, 172 insertions(+), 155 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/chat/ChatManager.java b/src/main/java/com/gmail/nossr50/chat/ChatManager.java index 67d0fd840..d0b4b64a8 100644 --- a/src/main/java/com/gmail/nossr50/chat/ChatManager.java +++ b/src/main/java/com/gmail/nossr50/chat/ChatManager.java @@ -6,13 +6,13 @@ import com.gmail.nossr50.chat.mailer.AdminChatMailer; import com.gmail.nossr50.chat.mailer.PartyChatMailer; import com.gmail.nossr50.config.ChatConfig; import com.gmail.nossr50.datatypes.chat.ChatChannel; -import com.neetgames.mcmmo.party.Party; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.text.StringUtils; +import com.neetgames.mcmmo.party.Party; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.text.TextComponent; import org.bukkit.command.ConsoleCommandSender; diff --git a/src/main/java/com/gmail/nossr50/chat/mailer/PartyChatMailer.java b/src/main/java/com/gmail/nossr50/chat/mailer/PartyChatMailer.java index d0551e7cb..cd1615d2f 100644 --- a/src/main/java/com/gmail/nossr50/chat/mailer/PartyChatMailer.java +++ b/src/main/java/com/gmail/nossr50/chat/mailer/PartyChatMailer.java @@ -4,12 +4,12 @@ import com.gmail.nossr50.chat.author.Author; import com.gmail.nossr50.chat.message.ChatMessage; import com.gmail.nossr50.chat.message.PartyChatMessage; import com.gmail.nossr50.datatypes.chat.ChatChannel; -import com.neetgames.mcmmo.party.Party; import com.gmail.nossr50.events.chat.McMMOChatEvent; import com.gmail.nossr50.events.chat.McMMOPartyChatEvent; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.text.TextUtils; +import com.neetgames.mcmmo.party.Party; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.text.TextComponent; import org.bukkit.Bukkit; diff --git a/src/main/java/com/gmail/nossr50/chat/message/PartyChatMessage.java b/src/main/java/com/gmail/nossr50/chat/message/PartyChatMessage.java index 01eae6c93..356070054 100644 --- a/src/main/java/com/gmail/nossr50/chat/message/PartyChatMessage.java +++ b/src/main/java/com/gmail/nossr50/chat/message/PartyChatMessage.java @@ -2,12 +2,12 @@ package com.gmail.nossr50.chat.message; import com.gmail.nossr50.chat.author.Author; import com.gmail.nossr50.datatypes.chat.ChatChannel; -import com.neetgames.mcmmo.party.Party; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.player.UserManager; import com.google.common.base.Objects; +import com.neetgames.mcmmo.party.Party; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.text.TextComponent; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/commands/database/ConvertDatabaseCommand.java b/src/main/java/com/gmail/nossr50/commands/database/ConvertDatabaseCommand.java index 6bbee5f9f..0c3df662a 100644 --- a/src/main/java/com/gmail/nossr50/commands/database/ConvertDatabaseCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/database/ConvertDatabaseCommand.java @@ -57,7 +57,7 @@ public class ConvertDatabaseCommand implements CommandExecutor { PlayerProfile profile = oldDatabase.loadPlayerProfile(player.getUniqueId(), null); if (profile.isLoaded()) { - mcMMO.getDatabaseManager().saveUser(profile); + mcMMO.getDatabaseManager().saveUser(profile.getPlayerData()); } new PlayerProfileLoadingTask(player).runTaskLaterAsynchronously(mcMMO.p, 1); // 1 Tick delay to ensure the player is marked as online before we begin loading diff --git a/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java index 973a2e755..7d5feffdf 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/TridentsCommand.java @@ -1,6 +1,5 @@ package com.gmail.nossr50.commands.skills; -import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.util.text.TextComponentFactory; import com.neetgames.mcmmo.player.OnlineMMOPlayer; diff --git a/src/main/java/com/gmail/nossr50/config/Config.java b/src/main/java/com/gmail/nossr50/config/Config.java index 0131ceff3..f09baf9f1 100644 --- a/src/main/java/com/gmail/nossr50/config/Config.java +++ b/src/main/java/com/gmail/nossr50/config/Config.java @@ -1,12 +1,11 @@ package com.gmail.nossr50.config; import com.gmail.nossr50.database.SQLDatabaseManager.PoolIdentifier; -import com.gmail.nossr50.party.PartyFeature; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; +import com.gmail.nossr50.party.PartyFeature; import com.gmail.nossr50.util.text.StringUtils; import com.neetgames.mcmmo.MobHealthBarType; -import com.neetgames.mcmmo.skill.RootSkill; import org.bukkit.Material; import org.bukkit.block.data.BlockData; import org.bukkit.configuration.ConfigurationSection; diff --git a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java index 9c6513979..4c7b66ce4 100644 --- a/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java +++ b/src/main/java/com/gmail/nossr50/config/experience/ExperienceConfig.java @@ -6,7 +6,6 @@ import com.gmail.nossr50.datatypes.skills.MaterialType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage; import com.gmail.nossr50.util.text.StringUtils; -import com.neetgames.mcmmo.skill.RootSkill; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.block.BlockState; diff --git a/src/main/java/com/gmail/nossr50/database/DatabaseManager.java b/src/main/java/com/gmail/nossr50/database/DatabaseManager.java index 1c6f3ef3a..3a430a0a0 100644 --- a/src/main/java/com/gmail/nossr50/database/DatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/DatabaseManager.java @@ -4,6 +4,7 @@ import com.gmail.nossr50.api.exceptions.InvalidSkillException; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.database.DatabaseType; import com.gmail.nossr50.datatypes.database.PlayerStat; +import com.gmail.nossr50.datatypes.player.PlayerData; import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.neetgames.mcmmo.player.MMOPlayer; @@ -50,10 +51,10 @@ public interface DatabaseManager { /** * Save a user to the database. * - * @param mmoPlayer The player to save + * @param playerData target player data * @return true if successful, false on failure */ - boolean saveUser(@NotNull MMOPlayer mmoPlayer); + boolean saveUser(@NotNull PlayerData playerData); /** * Retrieve leaderboard info. diff --git a/src/main/java/com/gmail/nossr50/database/FlatFileDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/FlatFileDatabaseManager.java index 86e598ab0..56adf23b0 100644 --- a/src/main/java/com/gmail/nossr50/database/FlatFileDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/FlatFileDatabaseManager.java @@ -5,7 +5,10 @@ import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.database.DatabaseType; import com.gmail.nossr50.datatypes.database.PlayerStat; import com.gmail.nossr50.datatypes.database.UpgradeType; -import com.gmail.nossr50.datatypes.player.*; +import com.gmail.nossr50.datatypes.player.MMODataBuilder; +import com.gmail.nossr50.datatypes.player.MMODataSnapshot; +import com.gmail.nossr50.datatypes.player.PlayerData; +import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.gmail.nossr50.mcMMO; @@ -18,6 +21,7 @@ import com.neetgames.mcmmo.UniqueDataType; import com.neetgames.mcmmo.exceptions.InvalidSkillException; import com.neetgames.mcmmo.player.MMOPlayer; import com.neetgames.mcmmo.skill.SkillBossBarState; +import org.apache.commons.lang.NullArgumentException; import org.bukkit.OfflinePlayer; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; @@ -256,10 +260,10 @@ public final class FlatFileDatabaseManager implements DatabaseManager { } - public boolean saveUser(@NotNull MMOPlayer mmoPlayer) { - PlayerData mmoPlayerData = mmoPlayer.getPlayerData(); - String playerName = dataSnapshot.getPlayerName(); - UUID uuid = dataSnapshot.getPlayerUUID(); + public boolean saveUser(@NotNull PlayerData playerData) { + MMODataSnapshot mmoDataSnapshot = new MMODataSnapshot(playerData); //Clone data into Immutable data + String playerName = mmoDataSnapshot.getPlayerName(); + UUID uuid = mmoDataSnapshot.getPlayerUUID(); BufferedReader in = null; FileWriter out = null; @@ -290,7 +294,7 @@ public final class FlatFileDatabaseManager implements DatabaseManager { String[] splitData = line.split(":"); //This would be rare, but check the splitData for having enough entries to contain a username - if(splitData.length < USERNAME) { //UUID have been in mcMMO DB for a very long time so any user without + if(splitData.length < FlatFileMappings.USERNAME) { //UUID have been in mcMMO DB for a very long time so any user without //Something is wrong if we don't have enough split data to have an entry for a username if(!corruptDataFound) { @@ -307,7 +311,7 @@ public final class FlatFileDatabaseManager implements DatabaseManager { writer.append(line).append("\r\n"); //Not the user so write it to file and move on } else { //User found - writeUserToLine(profile, playerName, uuid, writer); + writeUserToLine(mmoDataSnapshot, playerName, uuid, writer); wroteUser = true; } } @@ -316,7 +320,7 @@ public final class FlatFileDatabaseManager implements DatabaseManager { * If we couldn't find the user in the DB we need to add him */ if(!wroteUser) { - writeUserToLine(profile, playerName, uuid, writer); + writeUserToLine(mmoDataSnapshot, playerName, uuid, writer); } // Write the new file @@ -487,7 +491,10 @@ public final class FlatFileDatabaseManager implements DatabaseManager { public @NotNull PlayerProfile newUser(@NotNull Player player) { newUser(player.getName(), player.getUniqueId()); - return new PlayerProfile(player.getName(), player.getUniqueId(), true); + MMODataBuilder mmoDataBuilder = new MMODataBuilder(); + PlayerData newPlayerData = mmoDataBuilder.buildNewPlayerData(player); + + return new PlayerProfile(newPlayerData, true); } public void newUser(String playerName, UUID uuid) { @@ -649,7 +656,15 @@ public final class FlatFileDatabaseManager implements DatabaseManager { rawSplitData[FlatFileMappings.USERNAME] = playerName; } - return loadFromLine(rawSplitData); + PlayerData playerData = loadFromLine(rawSplitData); + if(playerData == null) { + mcMMO.p.getLogger().severe("Could not load player data from line"); + mcMMO.p.getLogger().severe("Data: "+line); + + return grabUnloadedProfile(uuid, playerName); + } else { + return new PlayerProfile(playerData, true); + } } } catch (Exception e) { e.printStackTrace(); @@ -688,13 +703,20 @@ public final class FlatFileDatabaseManager implements DatabaseManager { String[] rawSplitData = line.split(":"); /* Don't read corrupt data */ - if(rawSplitData.length < (USERNAME + 1)) { + if(rawSplitData.length < (FlatFileMappings.USERNAME + 1)) { continue; } //If we couldn't find anyone if(playerName.equalsIgnoreCase(rawSplitData[FlatFileMappings.USERNAME])) { - return loadFromLine(rawSplitData); + PlayerData playerData = loadFromLine(rawSplitData); + if(playerData != null) { + //Data loaded + return new PlayerProfile(playerData, true); + } else { + //Data was unable to be loaded, return "unloaded" profile + return grabUnloadedProfile(null, playerName); + } } } } catch (Exception e) { @@ -713,15 +735,17 @@ public final class FlatFileDatabaseManager implements DatabaseManager { } //Return a new blank profile - return new PlayerProfile(playerName, null); + return grabUnloadedProfile(null, playerName); } - private @NotNull PlayerProfile grabUnloadedProfile(@NotNull UUID uuid, @Nullable String playerName) { + private @NotNull PlayerProfile grabUnloadedProfile(@Nullable UUID uuid, @Nullable String playerName) { if(playerName == null) { playerName = ""; //No name for you boy! } - return new PlayerProfile(playerName, uuid); + MMODataBuilder mmoDataBuilder = new MMODataBuilder(); + PlayerData newPlayerData = mmoDataBuilder.buildNewPlayerData(uuid, playerName); + return new PlayerProfile(newPlayerData, false); } public void convertUsers(@NotNull DatabaseManager destination) { @@ -740,7 +764,15 @@ public final class FlatFileDatabaseManager implements DatabaseManager { String[] character = line.split(":"); try { - destination.saveUser(loadFromLine(character)); + PlayerData processedLineData = loadFromLine(character); + + if(processedLineData == null) { + mcMMO.p.getLogger().severe("Unable to convert data from line in FlatFile DB"); + mcMMO.p.getLogger().info("Data: "+line); + continue; + } + + destination.saveUser(processedLineData); } catch (Exception e) { e.printStackTrace(); @@ -1105,8 +1137,15 @@ public final class FlatFileDatabaseManager implements DatabaseManager { String[] correctSizeSplitData = Arrays.copyOf(rawSplitData, FlatFileMappings.LENGTH_OF_SPLIT_DATA_ARRAY); line = org.apache.commons.lang.StringUtils.join(correctSizeSplitData, ":") + ":"; rawSplitData = line.split(":"); - PlayerProfile temporaryProfile = loadFromLine(rawSplitData); - writeUserToLine(temporaryProfile, rawSplitData[FlatFileMappings.USERNAME], temporaryProfile.getUniqueId(), writer); + PlayerData dataFromLine = loadFromLine(rawSplitData); + + if(dataFromLine == null) + continue; + + + PlayerProfile temporaryProfile = new PlayerProfile(dataFromLine, true); + //TODO: MMODataSnapshot is an unnecessary creation of resources for this operation + writeUserToLine(new MMODataSnapshot(temporaryProfile.getPlayerData()), rawSplitData[FlatFileMappings.USERNAME], temporaryProfile.getUUID(), writer); } else { writer.append(line).append("\r\n"); } @@ -1298,7 +1337,7 @@ public final class FlatFileDatabaseManager implements DatabaseManager { //Build Data return playerDataBuilder.build(); - } catch (Exception e) { + } catch (NullArgumentException e) { mcMMO.p.getLogger().severe("Critical failure when trying to construct persistent player data!"); e.printStackTrace(); return null; diff --git a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java index 51b286587..cf8f550f8 100644 --- a/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/SQLDatabaseManager.java @@ -4,7 +4,10 @@ import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.database.DatabaseType; import com.gmail.nossr50.datatypes.database.PlayerStat; import com.gmail.nossr50.datatypes.database.UpgradeType; -import com.gmail.nossr50.datatypes.player.*; +import com.gmail.nossr50.datatypes.player.MMODataBuilder; +import com.gmail.nossr50.datatypes.player.MMODataSnapshot; +import com.gmail.nossr50.datatypes.player.PlayerData; +import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.gmail.nossr50.mcMMO; diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/OfflineExperienceProcessor.java b/src/main/java/com/gmail/nossr50/datatypes/experience/OfflineExperienceProcessor.java index 0eccb57bc..af37fa763 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/experience/OfflineExperienceProcessor.java +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/OfflineExperienceProcessor.java @@ -1,6 +1,5 @@ package com.gmail.nossr50.datatypes.experience; -import com.neetgames.mcmmo.experience.ExperienceHandler; //TODO: T&C Write implementation, this should be the exact same way OnlineExperienceProcessor handles stuff but without sending player messages or sounds and stuff like that //TODO: Is this needed? Maybe just make OnlineExperienceProcessor handle both in a clean way public class OfflineExperienceProcessor { diff --git a/src/main/java/com/gmail/nossr50/datatypes/experience/OnlineExperienceProcessor.java b/src/main/java/com/gmail/nossr50/datatypes/experience/OnlineExperienceProcessor.java index 5e0ddaccc..97e411de5 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/experience/OnlineExperienceProcessor.java +++ b/src/main/java/com/gmail/nossr50/datatypes/experience/OnlineExperienceProcessor.java @@ -4,22 +4,22 @@ import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.player.PlayerData; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; -import com.neetgames.mcmmo.party.Party; -import com.gmail.nossr50.util.Misc; -import com.gmail.nossr50.util.Permissions; -import com.neetgames.mcmmo.experience.XPGainReason; -import com.neetgames.mcmmo.experience.XPGainSource; -import com.neetgames.mcmmo.player.MMOPlayer; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.party.ShareHandler; import com.gmail.nossr50.skills.child.FamilyTree; import com.gmail.nossr50.util.EventUtils; +import com.gmail.nossr50.util.Misc; +import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.experience.ExperienceUtils; import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.skills.PerksUtils; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.neetgames.mcmmo.exceptions.UnknownSkillException; +import com.neetgames.mcmmo.experience.XPGainReason; +import com.neetgames.mcmmo.experience.XPGainSource; +import com.neetgames.mcmmo.party.Party; +import com.neetgames.mcmmo.player.MMOPlayer; import org.bukkit.GameMode; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/AbstractMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/player/AbstractMMOPlayer.java index 246111b06..bcea8d7f1 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/AbstractMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/AbstractMMOPlayer.java @@ -14,6 +14,7 @@ public abstract class AbstractMMOPlayer implements MMOPlayer { /* Managers */ protected final @NotNull ExperienceProcessor experienceProcessor; protected final @NotNull CooldownManager cooldownManager; + protected boolean isLoaded; /** * Init for online players @@ -21,10 +22,11 @@ public abstract class AbstractMMOPlayer implements MMOPlayer { * * @param mmoPlayerData player data */ - public AbstractMMOPlayer(@NotNull Player player, @NotNull PlayerData mmoPlayerData) { + public AbstractMMOPlayer(@NotNull Player player, @NotNull PlayerData mmoPlayerData, boolean isLoaded) { this.mmoPlayerData = mmoPlayerData; this.experienceProcessor = new OnlineExperienceProcessor(mmoPlayerData); this.cooldownManager = new CooldownManager(mmoPlayerData); + this.isLoaded = isLoaded; } /** @@ -32,9 +34,18 @@ public abstract class AbstractMMOPlayer implements MMOPlayer { * * @param mmoPlayerData player data */ - public AbstractMMOPlayer(@NotNull PlayerData mmoPlayerData) { + public AbstractMMOPlayer(@NotNull PlayerData mmoPlayerData, boolean isLoaded) { this.mmoPlayerData = mmoPlayerData; this.experienceProcessor = new OfflineExperienceProcessor(mmoPlayerData); this.cooldownManager = new CooldownManager(mmoPlayerData); + this.isLoaded = isLoaded; + } + + public boolean isLoaded() { + return isLoaded; + } + + public void setLoaded(boolean loaded) { + isLoaded = loaded; } } diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/MMODataBuilder.java b/src/main/java/com/gmail/nossr50/datatypes/player/MMODataBuilder.java index dbf0ea078..ad64ea1d7 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/MMODataBuilder.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/MMODataBuilder.java @@ -52,14 +52,14 @@ public class MMODataBuilder { return null; } - public @NotNull PlayerData buildNewPlayerData(@NotNull UUID playerUUID, @NotNull String playerName) { + public @NotNull PlayerData buildNewPlayerData(@Nullable UUID playerUUID, @NotNull String playerName) { /* * New Profile with default values */ return new PlayerData(playerUUID, playerName); } - public @NotNull PlayerData build() throws Exception { + public PlayerData build() throws NullArgumentException { if(playerUUID == null) throw new NullArgumentException("playerUUID"); @@ -91,7 +91,9 @@ public class MMODataBuilder { validateBarStateMapEntries(barStateMap); - return new PlayerData(playerUUID, playerName, partyChatSpying, skillLevelValues, skillExperienceValues, abilityDeactivationTimestamps, uniquePlayerData, barStateMap, scoreboardTipsShown, lastLogin, leaderBoardExemption); + return new PlayerData(playerUUID, playerName, partyChatSpying, skillLevelValues, + skillExperienceValues, abilityDeactivationTimestamps, uniquePlayerData, + barStateMap, scoreboardTipsShown, lastLogin, leaderBoardExemption); } private void validateBarStateMapEntries(@NotNull Map map) { diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/MMODataSnapshot.java b/src/main/java/com/gmail/nossr50/datatypes/player/MMODataSnapshot.java index 2c6dd3f4f..820a3079e 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/MMODataSnapshot.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/MMODataSnapshot.java @@ -4,10 +4,7 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.google.common.collect.ImmutableMap; import com.neetgames.mcmmo.UniqueDataType; -import com.neetgames.mcmmo.player.MMOPlayerDataImpl; -import com.neetgames.mcmmo.skill.RootSkill; import com.neetgames.mcmmo.skill.SkillBossBarState; -import com.neetgames.mcmmo.skill.SuperSkill; import org.jetbrains.annotations.NotNull; import java.util.UUID; diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java index 65ff2e010..5968f8df4 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/McMMOPlayer.java @@ -5,11 +5,10 @@ import com.gmail.nossr50.config.ChatConfig; import com.gmail.nossr50.config.WorldBlacklist; import com.gmail.nossr50.datatypes.chat.ChatChannel; import com.gmail.nossr50.datatypes.skills.CoreRootSkill; -import com.neetgames.mcmmo.party.Party; -import com.gmail.nossr50.party.PartyTeleportRecord; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.party.PartyTeleportRecord; import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.skills.acrobatics.AcrobaticsManager; import com.gmail.nossr50.skills.alchemy.AlchemyManager; @@ -33,6 +32,7 @@ import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.experience.MMOExperienceBarManager; import com.gmail.nossr50.util.input.AbilityActivationProcessor; import com.gmail.nossr50.util.input.SuperSkillManagerImpl; +import com.neetgames.mcmmo.party.Party; import com.neetgames.mcmmo.player.OnlineMMOPlayer; import net.kyori.adventure.identity.Identified; import net.kyori.adventure.identity.Identity; diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerData.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerData.java index feed6a655..8399f1e63 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerData.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerData.java @@ -10,7 +10,7 @@ import com.gmail.nossr50.util.experience.MMOExperienceBarManager; import com.google.common.collect.ImmutableMap; import com.neetgames.mcmmo.UniqueDataType; import com.neetgames.mcmmo.exceptions.UnexpectedValueException; -import com.neetgames.mcmmo.skill.*; +import com.neetgames.mcmmo.skill.SkillBossBarState; import com.neetgames.neetlib.dirtydata.DirtyData; import com.neetgames.neetlib.dirtydata.DirtyMap; import com.neetgames.neetlib.mutableprimitives.MutableBoolean; @@ -19,6 +19,8 @@ import com.neetgames.neetlib.mutableprimitives.MutableLong; import com.neetgames.neetlib.mutableprimitives.MutableString; import org.apache.commons.lang.NullArgumentException; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + import java.util.EnumMap; import java.util.HashMap; import java.util.Map; @@ -30,7 +32,7 @@ public class PlayerData { /* Player Stuff */ private final @NotNull DirtyData playerName; - private final @NotNull UUID playerUUID; + private final @Nullable UUID playerUUID; /* Records */ private final DirtyData lastLogin; @@ -57,7 +59,7 @@ public class PlayerData { * @param playerName target player's name * @throws NullArgumentException thrown when never null arguments are null */ - public PlayerData(@NotNull UUID playerUUID, @NotNull String playerName) throws NullArgumentException { + public PlayerData(@Nullable UUID playerUUID, @NotNull String playerName) throws NullArgumentException { /* * New Data */ diff --git a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java index 0dccad113..32657565a 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java +++ b/src/main/java/com/gmail/nossr50/datatypes/player/PlayerProfile.java @@ -14,8 +14,8 @@ public class PlayerProfile extends AbstractMMOPlayer { * * @param mmoPlayerData target persistent player data */ - public PlayerProfile(@NotNull PlayerData mmoPlayerData) { - super(mmoPlayerData); + public PlayerProfile(@NotNull PlayerData mmoPlayerData, boolean isLoaded) { + super(mmoPlayerData, isLoaded); } @Override @@ -63,8 +63,7 @@ public class PlayerProfile extends AbstractMMOPlayer { return experienceProcessor; } - @Override - public @NotNull PlayerData getMMOPlayerDataImpl() { + public @NotNull PlayerData getPlayerData() { return mmoPlayerData; } } diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/CoreRootSkill.java b/src/main/java/com/gmail/nossr50/datatypes/skills/CoreRootSkill.java index 41104aef6..1c6ccfdfd 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/CoreRootSkill.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/CoreRootSkill.java @@ -5,7 +5,6 @@ import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.text.StringUtils; -import com.neetgames.mcmmo.player.MMOPlayer; import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.neetgames.mcmmo.skill.AbstractRootSkill; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/acrobatics/Roll.java b/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/acrobatics/Roll.java index c15f3c236..1b892fc2b 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/acrobatics/Roll.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/acrobatics/Roll.java @@ -3,7 +3,6 @@ package com.gmail.nossr50.datatypes.skills.subskills.acrobatics; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; @@ -19,6 +18,7 @@ import com.gmail.nossr50.util.skills.SkillActivationType; import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import net.kyori.adventure.text.Component; import net.kyori.adventure.text.TextComponent; import org.bukkit.Location; diff --git a/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/interfaces/SubSkill.java b/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/interfaces/SubSkill.java index 390bbd709..a05185442 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/interfaces/SubSkill.java +++ b/src/main/java/com/gmail/nossr50/datatypes/skills/subskills/interfaces/SubSkill.java @@ -1,7 +1,7 @@ package com.gmail.nossr50.datatypes.skills.subskills.interfaces; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.interfaces.Skill; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import net.kyori.adventure.text.TextComponent; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index d00e6d4ea..c52b6b523 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -6,7 +6,6 @@ import com.gmail.nossr50.config.HiddenConfig; import com.gmail.nossr50.config.WorldBlacklist; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.meta.BonusDropMeta; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.AbilityToolType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; @@ -26,6 +25,7 @@ import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.worldguard.WorldGuardManager; import com.gmail.nossr50.worldguard.WorldGuardUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.*; import org.bukkit.block.*; import org.bukkit.entity.Item; diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index d16af553a..9853e72d4 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -6,8 +6,6 @@ import com.gmail.nossr50.config.WorldBlacklist; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.meta.ProjectileOriginMeta; import com.gmail.nossr50.datatypes.player.McMMOPlayer; -import com.neetgames.mcmmo.player.MMOPlayer; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.subskills.interfaces.InteractType; @@ -33,6 +31,7 @@ import com.gmail.nossr50.util.skills.CombatUtils; import com.gmail.nossr50.util.skills.SkillActivationType; import com.gmail.nossr50.worldguard.WorldGuardManager; import com.gmail.nossr50.worldguard.WorldGuardUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java index 6e2f40b06..bfb4e1e4e 100644 --- a/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/InventoryListener.java @@ -2,7 +2,6 @@ package com.gmail.nossr50.listeners; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.WorldBlacklist; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.events.fake.FakeBrewEvent; @@ -15,6 +14,7 @@ import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.worldguard.WorldGuardManager; import com.gmail.nossr50.worldguard.WorldGuardUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; diff --git a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java index 6acd7e039..004bb2469 100644 --- a/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/PlayerListener.java @@ -5,13 +5,9 @@ import com.gmail.nossr50.config.WorldBlacklist; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.chat.ChatChannel; import com.gmail.nossr50.datatypes.player.McMMOPlayer; -import com.gmail.nossr50.util.player.UserManager; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; -import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType; import com.gmail.nossr50.events.McMMOReplaceVanillaTreasureEvent; -import com.gmail.nossr50.events.fake.FakePlayerAnimationEvent; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.party.ShareHandler; @@ -23,6 +19,7 @@ import com.gmail.nossr50.skills.repair.RepairManager; import com.gmail.nossr50.skills.salvage.Salvage; import com.gmail.nossr50.skills.salvage.SalvageManager; import com.gmail.nossr50.util.*; +import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.scoreboards.ScoreboardManager; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillUtils; @@ -30,10 +27,10 @@ import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.worldguard.WorldGuardManager; import com.gmail.nossr50.worldguard.WorldGuardUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.GameMode; import org.bukkit.Material; import org.bukkit.block.Block; -import org.bukkit.block.BlockState; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.*; import org.bukkit.entity.minecart.PoweredMinecart; diff --git a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java index 9e1f22f2a..761877b18 100644 --- a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java @@ -2,7 +2,6 @@ package com.gmail.nossr50.listeners; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.events.experience.McMMOPlayerLevelUpEvent; import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent; @@ -13,6 +12,7 @@ import com.gmail.nossr50.util.scoreboards.ScoreboardManager; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.worldguard.WorldGuardManager; import com.gmail.nossr50.worldguard.WorldGuardUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; diff --git a/src/main/java/com/gmail/nossr50/party/PartyManagerImpl.java b/src/main/java/com/gmail/nossr50/party/PartyManagerImpl.java index aeb23ed1c..fd0e4f293 100644 --- a/src/main/java/com/gmail/nossr50/party/PartyManagerImpl.java +++ b/src/main/java/com/gmail/nossr50/party/PartyManagerImpl.java @@ -1,15 +1,12 @@ package com.gmail.nossr50.party; +import com.gmail.nossr50.mcMMO; import com.neetgames.mcmmo.party.Party; import com.neetgames.mcmmo.party.PartyManager; -import com.gmail.nossr50.events.party.McMMOPartyAllianceChangeEvent; -import com.gmail.nossr50.events.party.McMMOPartyChangeEvent; -import com.gmail.nossr50.events.party.McMMOPartyChangeEvent.EventReason; -import com.gmail.nossr50.mcMMO; import org.jetbrains.annotations.NotNull; import java.io.File; -import java.util.*; +import java.util.HashMap; /** * About mcMMO parties diff --git a/src/main/java/com/gmail/nossr50/party/PartyMemberManagerImpl.java b/src/main/java/com/gmail/nossr50/party/PartyMemberManagerImpl.java index 0de3708ae..334efb74e 100644 --- a/src/main/java/com/gmail/nossr50/party/PartyMemberManagerImpl.java +++ b/src/main/java/com/gmail/nossr50/party/PartyMemberManagerImpl.java @@ -1,13 +1,13 @@ package com.gmail.nossr50.party; import com.gmail.nossr50.config.Config; +import com.gmail.nossr50.util.Misc; import com.neetgames.mcmmo.party.Party; import com.neetgames.mcmmo.party.PartyMember; import com.neetgames.mcmmo.party.PartyMemberManager; import com.neetgames.mcmmo.party.PartyMemberRank; import com.neetgames.mcmmo.player.MMOPlayer; import com.neetgames.mcmmo.player.OnlineMMOPlayer; -import com.gmail.nossr50.util.Misc; import org.bukkit.OfflinePlayer; import org.bukkit.entity.Player; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/gmail/nossr50/party/ShareHandler.java b/src/main/java/com/gmail/nossr50/party/ShareHandler.java index 3d3eed981..50a4e1336 100644 --- a/src/main/java/com/gmail/nossr50/party/ShareHandler.java +++ b/src/main/java/com/gmail/nossr50/party/ShareHandler.java @@ -1,17 +1,13 @@ package com.gmail.nossr50.party; import com.gmail.nossr50.config.Config; -import com.gmail.nossr50.config.party.ItemWeightConfig; +import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.gmail.nossr50.mcMMO; import com.neetgames.mcmmo.experience.XPGainReason; import com.neetgames.mcmmo.experience.XPGainSource; import com.neetgames.mcmmo.party.Party; import com.neetgames.mcmmo.player.OnlineMMOPlayer; -import com.gmail.nossr50.datatypes.skills.PrimarySkillType; -import com.gmail.nossr50.mcMMO; -import com.gmail.nossr50.util.Misc; -import org.bukkit.entity.Item; import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; import java.util.List; diff --git a/src/main/java/com/gmail/nossr50/runnables/SaveTimerTask.java b/src/main/java/com/gmail/nossr50/runnables/SaveTimerTask.java index 423706849..7fdf8d986 100644 --- a/src/main/java/com/gmail/nossr50/runnables/SaveTimerTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/SaveTimerTask.java @@ -1,7 +1,7 @@ package com.gmail.nossr50.runnables; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.mcMMO; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.scheduler.BukkitRunnable; public class SaveTimerTask extends BukkitRunnable { diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandAsyncTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandAsyncTask.java index 1bfc19324..2283a2fd0 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandAsyncTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandAsyncTask.java @@ -3,7 +3,6 @@ package com.gmail.nossr50.runnables.commands; import com.gmail.nossr50.datatypes.database.PlayerStat; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.mcMMO; -import com.neetgames.mcmmo.skill.RootSkill; import org.apache.commons.lang.Validate; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java index 6c923464e..6af50d467 100644 --- a/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/commands/MctopCommandDisplayTask.java @@ -2,12 +2,10 @@ package com.gmail.nossr50.runnables.commands; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.database.PlayerStat; -import com.gmail.nossr50.datatypes.skills.CoreSkills; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.scoreboards.ScoreboardManager; -import com.neetgames.mcmmo.skill.RootSkill; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java b/src/main/java/com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java index a48d84341..943aac775 100644 --- a/src/main/java/com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java +++ b/src/main/java/com/gmail/nossr50/runnables/items/ChimaeraWingWarmup.java @@ -2,7 +2,6 @@ package com.gmail.nossr50.runnables.items; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.player.McMMOPlayer; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.util.ChimaeraWing; import com.gmail.nossr50.util.ItemUtils; diff --git a/src/main/java/com/gmail/nossr50/runnables/items/TeleportationWarmup.java b/src/main/java/com/gmail/nossr50/runnables/items/TeleportationWarmup.java index e18ba71fc..904c84165 100644 --- a/src/main/java/com/gmail/nossr50/runnables/items/TeleportationWarmup.java +++ b/src/main/java/com/gmail/nossr50/runnables/items/TeleportationWarmup.java @@ -2,9 +2,8 @@ package com.gmail.nossr50.runnables.items; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.player.McMMOPlayer; -import com.gmail.nossr50.mcMMO; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.locale.LocaleLoader; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.EventUtils; import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; diff --git a/src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java b/src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java index 8d0fdd971..a7174da25 100644 --- a/src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/party/PartyAutoKickTask.java @@ -1,8 +1,8 @@ package com.gmail.nossr50.runnables.party; import com.gmail.nossr50.config.Config; -import com.neetgames.mcmmo.party.Party; import com.gmail.nossr50.mcMMO; +import com.neetgames.mcmmo.party.Party; import org.bukkit.OfflinePlayer; import org.bukkit.scheduler.BukkitRunnable; diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/AbilityCooldownTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/AbilityCooldownTask.java index 57047097f..6fe80fc15 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/AbilityCooldownTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/AbilityCooldownTask.java @@ -1,9 +1,9 @@ package com.gmail.nossr50.runnables.skills; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.gmail.nossr50.util.player.NotificationManager; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.scheduler.BukkitRunnable; public class AbilityCooldownTask extends BukkitRunnable { diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/AbilityDisableTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/AbilityDisableTask.java index 0a2264b71..da93d5dfc 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/AbilityDisableTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/AbilityDisableTask.java @@ -3,7 +3,6 @@ package com.gmail.nossr50.runnables.skills; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.EventUtils; @@ -12,6 +11,7 @@ import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.skills.ParticleEffectUtils; import com.gmail.nossr50.util.skills.PerksUtils; import com.gmail.nossr50.util.skills.SkillUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Chunk; import org.bukkit.World; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/AwardCombatXpTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/AwardCombatXpTask.java index 40c56fe6e..8f440eac8 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/AwardCombatXpTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/AwardCombatXpTask.java @@ -1,7 +1,7 @@ package com.gmail.nossr50.runnables.skills; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.entity.LivingEntity; import org.bukkit.scheduler.BukkitRunnable; diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/ExperienceBarHideTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/ExperienceBarHideTask.java index 349dbfd6f..76c7cd3da 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/ExperienceBarHideTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/ExperienceBarHideTask.java @@ -1,8 +1,7 @@ package com.gmail.nossr50.runnables.skills; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.util.experience.MMOExperienceBarManager; -import com.neetgames.mcmmo.skill.RootSkill; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.scheduler.BukkitRunnable; public class ExperienceBarHideTask extends BukkitRunnable { diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/SkillUnlockNotificationTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/SkillUnlockNotificationTask.java index e2f2657f1..e18cbe075 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/SkillUnlockNotificationTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/SkillUnlockNotificationTask.java @@ -1,8 +1,8 @@ package com.gmail.nossr50.runnables.skills; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.util.player.NotificationManager; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.scheduler.BukkitRunnable; diff --git a/src/main/java/com/gmail/nossr50/runnables/skills/ToolLowerTask.java b/src/main/java/com/gmail/nossr50/runnables/skills/ToolLowerTask.java index 3e725277a..fc1e4e797 100644 --- a/src/main/java/com/gmail/nossr50/runnables/skills/ToolLowerTask.java +++ b/src/main/java/com/gmail/nossr50/runnables/skills/ToolLowerTask.java @@ -2,9 +2,9 @@ package com.gmail.nossr50.runnables.skills; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.AbilityToolType; import com.gmail.nossr50.util.player.NotificationManager; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.scheduler.BukkitRunnable; public class ToolLowerTask extends BukkitRunnable { diff --git a/src/main/java/com/gmail/nossr50/skills/SkillManager.java b/src/main/java/com/gmail/nossr50/skills/SkillManager.java index b4a75ba52..021517b39 100644 --- a/src/main/java/com/gmail/nossr50/skills/SkillManager.java +++ b/src/main/java/com/gmail/nossr50/skills/SkillManager.java @@ -1,7 +1,7 @@ package com.gmail.nossr50.skills; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java b/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java index 34a683b9f..40274a31f 100644 --- a/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java @@ -4,7 +4,6 @@ import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.BlockLocationHistory; import com.gmail.nossr50.datatypes.experience.XPGainReason; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.mcMMO; @@ -17,6 +16,7 @@ import com.gmail.nossr50.util.skills.ParticleEffectUtils; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillActivationType; import com.gmail.nossr50.util.skills.SkillUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Location; import org.bukkit.entity.Entity; import org.bukkit.entity.LightningStrike; diff --git a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyManager.java b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyManager.java index 9a677aaf9..08a6db83d 100644 --- a/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyManager.java +++ b/src/main/java/com/gmail/nossr50/skills/alchemy/AlchemyManager.java @@ -2,13 +2,13 @@ package com.gmail.nossr50.skills.alchemy; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.config.skills.alchemy.PotionConfig; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.alchemy.PotionStage; import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.text.StringUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.inventory.ItemStack; import java.util.List; diff --git a/src/main/java/com/gmail/nossr50/skills/archery/Archery.java b/src/main/java/com/gmail/nossr50/skills/archery/Archery.java index 871d2d371..7710a7bd3 100644 --- a/src/main/java/com/gmail/nossr50/skills/archery/Archery.java +++ b/src/main/java/com/gmail/nossr50/skills/archery/Archery.java @@ -3,13 +3,12 @@ package com.gmail.nossr50.skills.archery; import com.gmail.nossr50.api.ItemSpawnReason; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.experience.ExperienceConfig; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.skills.RankUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Material; import org.bukkit.entity.LivingEntity; -import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/gmail/nossr50/skills/archery/ArcheryManager.java b/src/main/java/com/gmail/nossr50/skills/archery/ArcheryManager.java index 3c29a7400..f5a01985a 100644 --- a/src/main/java/com/gmail/nossr50/skills/archery/ArcheryManager.java +++ b/src/main/java/com/gmail/nossr50/skills/archery/ArcheryManager.java @@ -1,7 +1,6 @@ package com.gmail.nossr50.skills.archery; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.mcMMO; @@ -12,6 +11,7 @@ import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillActivationType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Location; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; diff --git a/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java b/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java index b49dce896..3cfee3b39 100644 --- a/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java +++ b/src/main/java/com/gmail/nossr50/skills/axes/AxesManager.java @@ -2,7 +2,6 @@ package com.gmail.nossr50.skills.axes; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.AbilityToolType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; @@ -13,6 +12,7 @@ import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.*; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; import org.bukkit.event.entity.EntityDamageEvent.DamageModifier; diff --git a/src/main/java/com/gmail/nossr50/skills/child/FamilyTree.java b/src/main/java/com/gmail/nossr50/skills/child/FamilyTree.java index 9e8acbbde..eb0e60d94 100644 --- a/src/main/java/com/gmail/nossr50/skills/child/FamilyTree.java +++ b/src/main/java/com/gmail/nossr50/skills/child/FamilyTree.java @@ -1,6 +1,5 @@ package com.gmail.nossr50.skills.child; -import com.gmail.nossr50.datatypes.skills.CoreSkills; import com.gmail.nossr50.mcMMO; import com.neetgames.mcmmo.exceptions.UnknownSkillException; import com.neetgames.mcmmo.skill.RootSkill; diff --git a/src/main/java/com/gmail/nossr50/skills/crossbows/CrossbowsManager.java b/src/main/java/com/gmail/nossr50/skills/crossbows/CrossbowsManager.java index 79bcec63d..472703dcc 100644 --- a/src/main/java/com/gmail/nossr50/skills/crossbows/CrossbowsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/crossbows/CrossbowsManager.java @@ -1,6 +1,5 @@ package com.gmail.nossr50.skills.crossbows; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.mcMMO; @@ -8,6 +7,7 @@ import com.gmail.nossr50.skills.SkillManager; import com.gmail.nossr50.skills.archery.Archery; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.skills.RankUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.apache.commons.lang.math.RandomUtils; import org.bukkit.Location; import org.bukkit.World; diff --git a/src/main/java/com/gmail/nossr50/skills/excavation/ExcavationManager.java b/src/main/java/com/gmail/nossr50/skills/excavation/ExcavationManager.java index 1ed7aeb18..6acad4c41 100644 --- a/src/main/java/com/gmail/nossr50/skills/excavation/ExcavationManager.java +++ b/src/main/java/com/gmail/nossr50/skills/excavation/ExcavationManager.java @@ -2,7 +2,6 @@ package com.gmail.nossr50.skills.excavation; import com.gmail.nossr50.api.ItemSpawnReason; import com.gmail.nossr50.config.Config; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.treasure.ExcavationTreasure; @@ -12,6 +11,7 @@ import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Location; import org.bukkit.block.BlockState; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java index f8b391c1f..8d844e326 100644 --- a/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java @@ -7,7 +7,6 @@ import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.config.treasure.FishingTreasureConfig; import com.gmail.nossr50.datatypes.experience.XPGainReason; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.treasure.*; @@ -25,6 +24,7 @@ import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.CombatUtils; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; diff --git a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java index e982565d6..6da34ba0f 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java @@ -7,7 +7,6 @@ import com.gmail.nossr50.config.treasure.TreasureConfig; import com.gmail.nossr50.datatypes.BlockSnapshot; import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.meta.RecentlyReplantedCropMeta; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.AbilityToolType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; @@ -27,6 +26,7 @@ import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.util.text.StringUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java index 38af5e100..c48ff47dc 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/MiningManager.java @@ -5,7 +5,6 @@ import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; @@ -17,6 +16,7 @@ import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.apache.commons.lang.math.RandomUtils; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java index 127b25a5c..1e8997995 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java @@ -4,7 +4,6 @@ import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.locale.LocaleLoader; @@ -23,6 +22,7 @@ import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.util.text.StringUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java b/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java index f9681b62e..ff9a6de14 100644 --- a/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java +++ b/src/main/java/com/gmail/nossr50/skills/salvage/SalvageManager.java @@ -5,7 +5,6 @@ import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.locale.LocaleLoader; @@ -23,6 +22,7 @@ import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.util.text.StringUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.enchantments.Enchantment; diff --git a/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java b/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java index d97aac15a..f39fee051 100644 --- a/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/smelting/SmeltingManager.java @@ -1,7 +1,6 @@ package com.gmail.nossr50.skills.smelting; import com.gmail.nossr50.config.Config; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.skills.SkillManager; @@ -9,6 +8,7 @@ import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillActivationType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.block.Furnace; import org.bukkit.event.inventory.FurnaceBurnEvent; import org.bukkit.event.inventory.FurnaceSmeltEvent; diff --git a/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java b/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java index d2877f34b..8991ef623 100644 --- a/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java @@ -1,7 +1,6 @@ package com.gmail.nossr50.skills.swords; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.AbilityToolType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; @@ -15,6 +14,7 @@ import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.CombatUtils; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillActivationType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.entity.Entity; import org.bukkit.entity.LivingEntity; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java index db97a0077..0cbf1f61b 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java @@ -4,7 +4,6 @@ import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.subskills.taming.CallOfTheWildType; @@ -25,6 +24,7 @@ import com.gmail.nossr50.util.skills.SkillActivationType; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.util.text.StringUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.attribute.Attribute; diff --git a/src/main/java/com/gmail/nossr50/skills/tridents/TridentsManager.java b/src/main/java/com/gmail/nossr50/skills/tridents/TridentsManager.java index 6c3affc97..6800de843 100644 --- a/src/main/java/com/gmail/nossr50/skills/tridents/TridentsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/tridents/TridentsManager.java @@ -1,8 +1,8 @@ package com.gmail.nossr50.skills.tridents; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.skills.SkillManager; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; public class TridentsManager extends SkillManager { public TridentsManager(OnlineMMOPlayer mmoPlayer) { diff --git a/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java b/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java index 8c7fefa7b..52a67fe72 100644 --- a/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java +++ b/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java @@ -3,7 +3,6 @@ package com.gmail.nossr50.skills.unarmed; import com.gmail.nossr50.api.ItemSpawnReason; import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.AbilityToolType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; @@ -18,6 +17,7 @@ import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.random.RandomChanceUtil; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillActivationType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Material; import org.bukkit.block.BlockState; import org.bukkit.entity.Item; diff --git a/src/main/java/com/gmail/nossr50/skills/woodcutting/WoodcuttingManager.java b/src/main/java/com/gmail/nossr50/skills/woodcutting/WoodcuttingManager.java index 54d5c7c2e..2514a7a2f 100644 --- a/src/main/java/com/gmail/nossr50/skills/woodcutting/WoodcuttingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/woodcutting/WoodcuttingManager.java @@ -5,7 +5,6 @@ import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; @@ -18,6 +17,7 @@ import com.gmail.nossr50.util.skills.CombatUtils; import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillActivationType; import com.gmail.nossr50.util.skills.SkillUtils; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java b/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java index c7fb7020c..836c6af26 100644 --- a/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java +++ b/src/main/java/com/gmail/nossr50/util/ChimaeraWing.java @@ -3,7 +3,6 @@ package com.gmail.nossr50.util; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.player.McMMOPlayer; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.runnables.items.ChimaeraWingWarmup; @@ -12,6 +11,7 @@ import com.gmail.nossr50.util.skills.CombatUtils; import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.ChatColor; import org.bukkit.Location; import org.bukkit.Material; diff --git a/src/main/java/com/gmail/nossr50/util/EventUtils.java b/src/main/java/com/gmail/nossr50/util/EventUtils.java index 19637b9ff..d674f7b2f 100644 --- a/src/main/java/com/gmail/nossr50/util/EventUtils.java +++ b/src/main/java/com/gmail/nossr50/util/EventUtils.java @@ -1,8 +1,6 @@ package com.gmail.nossr50.util; import com.gmail.nossr50.config.Config; -import com.neetgames.mcmmo.party.Party; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; @@ -32,8 +30,9 @@ import com.gmail.nossr50.events.skills.unarmed.McMMOPlayerDisarmEvent; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.player.NotificationManager; -import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.skills.CombatUtils; +import com.neetgames.mcmmo.party.Party; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.block.Block; import org.bukkit.enchantments.Enchantment; import org.bukkit.entity.Entity; diff --git a/src/main/java/com/gmail/nossr50/util/HolidayManager.java b/src/main/java/com/gmail/nossr50/util/HolidayManager.java index 872f0bf86..a1c988cf1 100644 --- a/src/main/java/com/gmail/nossr50/util/HolidayManager.java +++ b/src/main/java/com/gmail/nossr50/util/HolidayManager.java @@ -3,7 +3,6 @@ package com.gmail.nossr50.util; import com.gmail.nossr50.commands.skills.AprilCommand; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; @@ -12,6 +11,7 @@ import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.util.text.StringUtils; import com.google.common.collect.ImmutableList; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.ChatColor; import org.bukkit.Color; import org.bukkit.Statistic; diff --git a/src/main/java/com/gmail/nossr50/util/Misc.java b/src/main/java/com/gmail/nossr50/util/Misc.java index e6250fe19..0a8a3e622 100644 --- a/src/main/java/com/gmail/nossr50/util/Misc.java +++ b/src/main/java/com/gmail/nossr50/util/Misc.java @@ -1,11 +1,11 @@ package com.gmail.nossr50.util; import com.gmail.nossr50.api.ItemSpawnReason; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.events.items.McMMOItemSpawnEvent; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.runnables.player.PlayerProfileLoadingTask; import com.google.common.collect.ImmutableSet; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.World; diff --git a/src/main/java/com/gmail/nossr50/util/Permissions.java b/src/main/java/com/gmail/nossr50/util/Permissions.java index 124535948..5a039487e 100644 --- a/src/main/java/com/gmail/nossr50/util/Permissions.java +++ b/src/main/java/com/gmail/nossr50/util/Permissions.java @@ -7,7 +7,6 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill; import com.gmail.nossr50.mcMMO; -import com.neetgames.mcmmo.skill.RootSkill; import org.bukkit.Material; import org.bukkit.Server; import org.bukkit.World; diff --git a/src/main/java/com/gmail/nossr50/util/commands/CommandUtils.java b/src/main/java/com/gmail/nossr50/util/commands/CommandUtils.java index e827a86c2..29070f0f4 100644 --- a/src/main/java/com/gmail/nossr50/util/commands/CommandUtils.java +++ b/src/main/java/com/gmail/nossr50/util/commands/CommandUtils.java @@ -1,7 +1,6 @@ package com.gmail.nossr50.util.commands; import com.gmail.nossr50.config.Config; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.locale.LocaleLoader; @@ -10,6 +9,7 @@ import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.text.StringUtils; import com.google.common.collect.ImmutableList; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.OfflinePlayer; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java b/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java index ba0e6be79..7032dce1a 100644 --- a/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java +++ b/src/main/java/com/gmail/nossr50/util/experience/ExperienceBarWrapper.java @@ -2,12 +2,9 @@ package com.gmail.nossr50.util.experience; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.player.McMMOPlayer; -import com.gmail.nossr50.datatypes.skills.CoreSkills; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.util.player.PlayerLevelUtils; import com.gmail.nossr50.util.text.StringUtils; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; -import com.neetgames.mcmmo.skill.RootSkill; import org.bukkit.Bukkit; import org.bukkit.boss.BarColor; import org.bukkit.boss.BarStyle; diff --git a/src/main/java/com/gmail/nossr50/util/experience/ExperienceUtils.java b/src/main/java/com/gmail/nossr50/util/experience/ExperienceUtils.java index 9ede0b484..1c27b1954 100644 --- a/src/main/java/com/gmail/nossr50/util/experience/ExperienceUtils.java +++ b/src/main/java/com/gmail/nossr50/util/experience/ExperienceUtils.java @@ -1,7 +1,7 @@ package com.gmail.nossr50.util.experience; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/gmail/nossr50/util/experience/MMOExperienceBarManager.java b/src/main/java/com/gmail/nossr50/util/experience/MMOExperienceBarManager.java index fbf03e60d..b0c96f1af 100644 --- a/src/main/java/com/gmail/nossr50/util/experience/MMOExperienceBarManager.java +++ b/src/main/java/com/gmail/nossr50/util/experience/MMOExperienceBarManager.java @@ -3,12 +3,12 @@ package com.gmail.nossr50.util.experience; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.player.McMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; -import com.gmail.nossr50.util.Misc; -import com.gmail.nossr50.datatypes.skills.CoreSkills; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.runnables.skills.ExperienceBarHideTask; +import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.player.NotificationManager; -import com.neetgames.mcmmo.skill.*; +import com.neetgames.mcmmo.skill.SkillBossBarSetting; +import com.neetgames.mcmmo.skill.SkillBossBarState; import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/gmail/nossr50/util/input/AbilityActivationProcessor.java b/src/main/java/com/gmail/nossr50/util/input/AbilityActivationProcessor.java index 7dc9b63fd..a4fb6f572 100644 --- a/src/main/java/com/gmail/nossr50/util/input/AbilityActivationProcessor.java +++ b/src/main/java/com/gmail/nossr50/util/input/AbilityActivationProcessor.java @@ -2,8 +2,6 @@ package com.gmail.nossr50.util.input; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.gmail.nossr50.util.Misc; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; @@ -17,7 +15,9 @@ import com.gmail.nossr50.skills.taming.TamingManager; import com.gmail.nossr50.util.BlockUtils; import com.gmail.nossr50.util.ChimaeraWing; import com.gmail.nossr50.util.EventUtils; +import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.player.NotificationManager; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Bukkit; import org.bukkit.Material; import org.bukkit.block.Block; diff --git a/src/main/java/com/gmail/nossr50/util/input/SuperSkillManagerImpl.java b/src/main/java/com/gmail/nossr50/util/input/SuperSkillManagerImpl.java index e99d144ca..d4b021018 100644 --- a/src/main/java/com/gmail/nossr50/util/input/SuperSkillManagerImpl.java +++ b/src/main/java/com/gmail/nossr50/util/input/SuperSkillManagerImpl.java @@ -4,7 +4,6 @@ import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.player.McMMOPlayer; -import com.neetgames.mcmmo.player.MMOPlayerDataImpl; import com.gmail.nossr50.datatypes.skills.AbilityToolType; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; @@ -19,6 +18,7 @@ import com.gmail.nossr50.util.skills.RankUtils; import com.gmail.nossr50.util.skills.SkillUtils; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; +import com.neetgames.mcmmo.player.MMOPlayerDataImpl; import com.neetgames.mcmmo.player.SuperSkillManager; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; diff --git a/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java b/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java index bd630a535..ea08171ab 100644 --- a/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java +++ b/src/main/java/com/gmail/nossr50/util/player/NotificationManager.java @@ -6,19 +6,17 @@ import com.gmail.nossr50.datatypes.LevelUpBroadcastPredicate; import com.gmail.nossr50.datatypes.PowerLevelUpBroadcastPredicate; import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.notifications.SensitiveCommandType; -import com.gmail.nossr50.datatypes.skills.CoreSkills; -import com.gmail.nossr50.util.Misc; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.events.skills.McMMOPlayerNotificationEvent; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.sounds.SoundManager; import com.gmail.nossr50.util.sounds.SoundType; import com.gmail.nossr50.util.text.McMMOMessageType; import com.gmail.nossr50.util.text.TextComponentFactory; -import com.neetgames.mcmmo.skill.RootSkill; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.audience.MessageType; import net.kyori.adventure.identity.Identity; diff --git a/src/main/java/com/gmail/nossr50/util/player/PartyUtils.java b/src/main/java/com/gmail/nossr50/util/player/PartyUtils.java index 5161a822d..1d1218037 100644 --- a/src/main/java/com/gmail/nossr50/util/player/PartyUtils.java +++ b/src/main/java/com/gmail/nossr50/util/player/PartyUtils.java @@ -1,8 +1,8 @@ package com.gmail.nossr50.util.player; import com.gmail.nossr50.config.Config; -import com.neetgames.mcmmo.party.Party; import com.gmail.nossr50.party.PartyFeature; +import com.neetgames.mcmmo.party.Party; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/com/gmail/nossr50/util/player/PlayerLevelUtils.java b/src/main/java/com/gmail/nossr50/util/player/PlayerLevelUtils.java index f37573a9b..c5dfa3ce1 100644 --- a/src/main/java/com/gmail/nossr50/util/player/PlayerLevelUtils.java +++ b/src/main/java/com/gmail/nossr50/util/player/PlayerLevelUtils.java @@ -1,9 +1,7 @@ package com.gmail.nossr50.util.player; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; -import com.gmail.nossr50.mcMMO; -import com.neetgames.mcmmo.skill.RootSkill; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.jetbrains.annotations.NotNull; public class PlayerLevelUtils { diff --git a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java index 70b4e7b8e..ff1ad6723 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardManager.java @@ -2,7 +2,6 @@ package com.gmail.nossr50.util.scoreboards; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.database.PlayerStat; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; diff --git a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java index 8cdc69e90..470865c7b 100644 --- a/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java +++ b/src/main/java/com/gmail/nossr50/util/scoreboards/ScoreboardWrapper.java @@ -2,7 +2,6 @@ package com.gmail.nossr50.util.scoreboards; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.database.PlayerStat; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.player.PlayerProfile; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; @@ -15,6 +14,7 @@ import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.skills.child.FamilyTree; import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.scoreboards.ScoreboardManager.SidebarType; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.apache.commons.lang.Validate; import org.bukkit.ChatColor; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java index a6a3bed54..fbb61564e 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -4,7 +4,6 @@ import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.experience.ExperienceConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; import com.gmail.nossr50.datatypes.meta.OldName; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.events.fake.FakeEntityDamageByEntityEvent; @@ -24,6 +23,7 @@ import com.gmail.nossr50.util.compat.layers.persistentdata.AbstractPersistentDat import com.gmail.nossr50.util.compat.layers.persistentdata.MobMetaFlagType; import com.gmail.nossr50.util.player.NotificationManager; import com.google.common.collect.ImmutableMap; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Bukkit; import org.bukkit.GameMode; import org.bukkit.Material; diff --git a/src/main/java/com/gmail/nossr50/util/skills/PerksUtils.java b/src/main/java/com/gmail/nossr50/util/skills/PerksUtils.java index ac6838932..b78856c62 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/PerksUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/PerksUtils.java @@ -5,7 +5,6 @@ import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.events.skills.SkillActivationPerkEvent; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.Permissions; -import com.gmail.nossr50.util.player.UserManager; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.entity.Player; diff --git a/src/main/java/com/gmail/nossr50/util/skills/RankUtils.java b/src/main/java/com/gmail/nossr50/util/skills/RankUtils.java index 39c96b814..b9d39ca1a 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/RankUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/RankUtils.java @@ -1,7 +1,6 @@ package com.gmail.nossr50.util.skills; import com.gmail.nossr50.config.RankConfig; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; @@ -9,6 +8,7 @@ import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill; import com.gmail.nossr50.listeners.InteractionManager; import com.gmail.nossr50.runnables.skills.SkillUnlockNotificationTask; import com.gmail.nossr50.util.Permissions; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.plugin.Plugin; import org.jetbrains.annotations.NotNull; diff --git a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java index fa0ca4abc..4249f8b46 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java @@ -4,7 +4,6 @@ import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.HiddenConfig; import com.gmail.nossr50.datatypes.interactions.NotificationType; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; @@ -16,6 +15,7 @@ import com.gmail.nossr50.util.compat.layers.persistentdata.AbstractPersistentDat import com.gmail.nossr50.util.player.NotificationManager; import com.gmail.nossr50.util.text.StringUtils; import com.neetgames.mcmmo.exceptions.UnexpectedValueException; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.neetgames.mcmmo.skill.SkillBossBarState; import org.bukkit.Bukkit; import org.bukkit.Location; diff --git a/src/main/java/com/gmail/nossr50/util/skills/SmeltingTracker.java b/src/main/java/com/gmail/nossr50/util/skills/SmeltingTracker.java index 4c14f5bd8..4b91a430c 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/SmeltingTracker.java +++ b/src/main/java/com/gmail/nossr50/util/skills/SmeltingTracker.java @@ -1,9 +1,9 @@ package com.gmail.nossr50.util.skills; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.util.Permissions; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import org.bukkit.Bukkit; import org.bukkit.ChatColor; import org.bukkit.OfflinePlayer; diff --git a/src/main/java/com/gmail/nossr50/util/text/StringUtils.java b/src/main/java/com/gmail/nossr50/util/text/StringUtils.java index 4e99ffb17..fe4ceeae3 100644 --- a/src/main/java/com/gmail/nossr50/util/text/StringUtils.java +++ b/src/main/java/com/gmail/nossr50/util/text/StringUtils.java @@ -1,7 +1,7 @@ package com.gmail.nossr50.util.text; -import com.gmail.nossr50.party.PartyFeature; import com.gmail.nossr50.datatypes.skills.SuperAbilityType; +import com.gmail.nossr50.party.PartyFeature; import org.bukkit.Material; import org.bukkit.block.data.Ageable; import org.bukkit.block.data.BlockData; diff --git a/src/main/java/com/gmail/nossr50/util/text/TextComponentFactory.java b/src/main/java/com/gmail/nossr50/util/text/TextComponentFactory.java index 5683d5e0b..205fcba77 100644 --- a/src/main/java/com/gmail/nossr50/util/text/TextComponentFactory.java +++ b/src/main/java/com/gmail/nossr50/util/text/TextComponentFactory.java @@ -4,18 +4,16 @@ import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.RankConfig; import com.gmail.nossr50.datatypes.json.McMMOUrl; import com.gmail.nossr50.datatypes.json.McMMOWebLinks; -import com.gmail.nossr50.datatypes.skills.CoreSkills; -import com.gmail.nossr50.util.Misc; -import com.neetgames.mcmmo.player.OnlineMMOPlayer; import com.gmail.nossr50.datatypes.skills.PrimarySkillType; import com.gmail.nossr50.datatypes.skills.SubSkillType; import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill; import com.gmail.nossr50.listeners.InteractionManager; import com.gmail.nossr50.locale.LocaleLoader; import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.util.Misc; import com.gmail.nossr50.util.Permissions; import com.gmail.nossr50.util.skills.RankUtils; -import com.neetgames.mcmmo.skill.RootSkill; +import com.neetgames.mcmmo.player.OnlineMMOPlayer; import net.kyori.adventure.audience.Audience; import net.kyori.adventure.audience.MessageType; import net.kyori.adventure.identity.Identity;