From fece7347ef7b622d4f6c86792fa738039fd16bf0 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 24 May 2022 15:26:22 +0200 Subject: [PATCH 01/11] Skill Trees in MMOCore --- .../java/net/Indyuce/mmocore/MMOCore.java | 812 +++++++++--------- .../mmocore/api/player/PlayerData.java | 32 +- .../mmocore/api/util/MMOCoreUtils.java | 5 + .../mmocore/command/SkillTreeCommand.java | 38 + .../Indyuce/mmocore/gui/SkillTreeViewer.java | 345 ++++++++ .../mmocore/gui/api/item/InventoryItem.java | 8 +- .../mmocore/manager/InventoryManager.java | 64 +- .../mmocore/manager/SkillTreeManager.java | 48 +- .../data/yaml/YAMLPlayerDataManager.java | 227 ++--- .../mmocore/quest/MMOCoreQuestModule.java | 3 +- .../quest/compat/BeautyQuestModule.java | 12 +- .../quest/compat/BlackVeinQuestsModule.java | 9 +- .../quest/compat/QuestCreatorModule.java | 5 +- .../mmocore/quest/compat/QuestModule.java | 5 +- .../net/Indyuce/mmocore/tree/NodeState.java | 5 + .../net/Indyuce/mmocore/tree/SkillTree.java | 79 -- .../Indyuce/mmocore/tree/SkillTreeNode.java | 79 +- .../tree/skilltree/AutomaticSkillTree.java | 167 ++++ .../tree/skilltree/CustomSkillTree.java | 21 + .../tree/skilltree/LinkedSkillTree.java | 64 ++ .../mmocore/tree/skilltree/SkillTree.java | 154 ++++ .../mmocore/tree/skilltree/SkillTreeType.java | 7 + src/main/resources/default/commands.yml | 3 + src/main/resources/default/gui/skill-tree.yml | 25 + .../resources/default/skilltree/combat.yml | 29 + 25 files changed, 1590 insertions(+), 656 deletions(-) create mode 100644 src/main/java/net/Indyuce/mmocore/command/SkillTreeCommand.java create mode 100644 src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/NodeState.java delete mode 100644 src/main/java/net/Indyuce/mmocore/tree/SkillTree.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/skilltree/CustomSkillTree.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/skilltree/LinkedSkillTree.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTreeType.java create mode 100644 src/main/resources/default/gui/skill-tree.yml create mode 100644 src/main/resources/default/skilltree/combat.yml diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index df5b7dcf..16d534f8 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -59,410 +59,410 @@ import java.util.Iterator; import java.util.logging.Level; public class MMOCore extends LuminePlugin { - public static MMOCore plugin; - - public final WaypointManager waypointManager = new WaypointManager(); - public final SoundManager soundManager = new SoundManager(); - public final RequestManager requestManager = new RequestManager(); - public final ConfigItemManager configItems = new ConfigItemManager(); - public final PlayerActionBar actionBarManager = new PlayerActionBar(); - public final SkillManager skillManager = new SkillManager(); - public final ClassManager classManager = new ClassManager(); - public final DropTableManager dropTableManager = new DropTableManager(); - public final BoosterManager boosterManager = new BoosterManager(); - public final AttributeManager attributeManager = new AttributeManager(); - public final PartyManager partyManager = new PartyManager(); - public final QuestManager questManager = new QuestManager(); - public final ProfessionManager professionManager = new ProfessionManager(); - public final ExperienceManager experience = new ExperienceManager(); - public final LootChestManager lootChests = new LootChestManager(); - public final MMOLoadManager loadManager = new MMOLoadManager(); - public final RestrictionManager restrictionManager = new RestrictionManager(); - @Deprecated - public final SkillTreeManager skillTreeManager = new SkillTreeManager(); - - // Profession managers - public final CustomBlockManager mineManager = new CustomBlockManager(); - public final FishingManager fishingManager = new FishingManager(); - public final AlchemyManager alchemyManager = new AlchemyManager(); - public final EnchantManager enchantManager = new EnchantManager(); - public final SmithingManager smithingManager = new SmithingManager(); - - @NotNull - public ConfigManager configManager; - public VaultEconomy economy; - public RegionHandler regionHandler = new DefaultRegionHandler(); - public PlaceholderParser placeholderParser = new DefaultParser(); - public DataProvider dataProvider = new YAMLDataProvider(); - - // Modules - @NotNull - public PartyModule partyModule; - - public boolean shouldDebugSQL = false; - - private static final int MYTHICLIB_COMPATIBILITY_INDEX = 7; - - public MMOCore() { - plugin = this; - } - - public void load() { - - // Check if the ML build matches - if (MYTHICLIB_COMPATIBILITY_INDEX != MythicLib.MMOCORE_COMPATIBILITY_INDEX) { - getLogger().log(Level.WARNING, "Your versions of MythicLib and MMOCore do not match. Make sure you are using the latest builds of both plugins"); - disable(); - return; - } - - // Register target restrictions due to MMOCore in MythicLib - MythicLib.plugin.getEntities().registerRestriction(new MMOCoreTargetRestriction()); - - // Register extra objective, drop items... - if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) - loadManager.registerLoader(new WorldGuardMMOLoader()); - - if (Bukkit.getPluginManager().getPlugin("Citizens") != null) - loadManager.registerLoader(new CitizensMMOLoader()); - - if (Bukkit.getPluginManager().getPlugin("Vault") != null) loadManager.registerLoader(new VaultMMOLoader()); - - if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) - loadManager.registerLoader(new MythicMobsMMOLoader()); - } - - public void enable() { - new SpigotPlugin(70575, this).checkForUpdate(); - new Metrics(this); - saveDefaultConfig(); - - final int configVersion = getConfig().contains("config-version", true) ? getConfig().getInt("config-version") : -1; - final int defConfigVersion = getConfig().getDefaults().getInt("config-version"); - if (configVersion != defConfigVersion) { - getLogger().warning("You may be using an outdated config.yml!"); - getLogger().warning("(Your config version: '" + configVersion + "' | Expected config version: '" + defConfigVersion + "')"); - } - - if (getConfig().isConfigurationSection("mysql") && getConfig().getBoolean("mysql.enabled")) - dataProvider = new MySQLDataProvider(getConfig()); - shouldDebugSQL = getConfig().getBoolean("mysql.debug"); - - if (getConfig().isConfigurationSection("default-playerdata")) - dataProvider.getDataManager().loadDefaultData(getConfig().getConfigurationSection("default-playerdata")); - - if (Bukkit.getPluginManager().getPlugin("Vault") != null) economy = new VaultEconomy(); - - if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) { - placeholderParser = new PlaceholderAPIParser(); - getLogger().log(Level.INFO, "Hooked onto PlaceholderAPI"); - } - - if (Bukkit.getPluginManager().getPlugin("Citizens") != null) { - Bukkit.getPluginManager().registerEvents(new CitizenInteractEventListener(), this); - getLogger().log(Level.INFO, "Hooked onto Citizens"); - } - - if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) { - regionHandler = new WorldGuardRegionHandler(); - getLogger().log(Level.INFO, "Hooked onto WorldGuard"); - } - - if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) { - Bukkit.getServer().getPluginManager().registerEvents(new MythicHook(), this); - MMOCore.plugin.getLogger().log(Level.INFO, "Hooked onto MythicMobs"); - } - - /* - * Resource regeneration. Must check if entity is dead otherwise regen will make - * the 'respawn' button glitched plus HURT entity effect bug - */ - new BukkitRunnable() { - public void run() { - for (PlayerData player : PlayerData.getAll()) - if (player.isOnline() && !player.getPlayer().isDead()) - for (PlayerResource resource : PlayerResource.values()) { - double regenAmount = player.getProfess().getHandler(resource).getRegen(player); - if (regenAmount != 0) - resource.regen(player, regenAmount); - } - } - }.runTaskTimer(MMOCore.plugin, 100, 20); - - /* - * Clean active loot chests every 5 minutes. Cannot register this runnable in - * the loot chest manager because it is instanced when the plugin loads - */ - new BukkitRunnable() { - public void run() { - Iterator iterator = lootChests.getActive().iterator(); - while (iterator.hasNext()) { - LootChest next = iterator.next(); - if (next.shouldExpire()) { - iterator.remove(); - next.expire(false); - } - } - } - }.runTaskTimer(this, 5 * 60 * 20, 5 * 60 * 20); - - /* - * For the sake of the lord, make sure they aren't using MMOItems Mana and - * Stamina Addon...This should prevent a couple error reports produced by people - * not reading the installation guide... - */ - if (Bukkit.getPluginManager().getPlugin("MMOMana") != null) { - getLogger().log(Level.SEVERE, ChatColor.DARK_RED + "MMOCore is not meant to be used with MMOItems ManaAndStamina"); - getLogger().log(Level.SEVERE, ChatColor.DARK_RED + "Please read the installation guide!"); - Bukkit.broadcastMessage(ChatColor.DARK_RED + "[MMOCore] MMOCore is not meant to be used with MMOItems ManaAndStamina"); - Bukkit.broadcastMessage(ChatColor.DARK_RED + "[MMOCore] Please read the installation guide!"); - return; - } - - initializePlugin(false); - - if (getConfig().getBoolean("vanilla-exp-redirection.enabled")) - Bukkit.getPluginManager().registerEvents(new RedirectVanillaExp(getConfig().getDouble("vanilla-exp-redirection.ratio")), this); - - // Enable debug mode for extra debug tools - if (getConfig().contains("debug")) { - DebugMode.setLevel(getConfig().getInt("debug", 0)); - DebugMode.enableActionBar(); - } - - // Load quest module - try { - String questPluginName = UtilityMethods.enumName(getConfig().getString("quest-plugin")); - PartyModuleType moduleType = PartyModuleType.valueOf(questPluginName); - Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); - partyModule = moduleType.provideModule(); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not initialize quest module: " + exception.getMessage()); - partyModule = new MMOCorePartyModule(); - } - - - - // Load party module - try { - String partyPluginName = UtilityMethods.enumName(getConfig().getString("party-plugin")); - PartyModuleType moduleType = PartyModuleType.valueOf(partyPluginName); - Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); - partyModule = moduleType.provideModule(); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not initialize party module: " + exception.getMessage()); - partyModule = new MMOCorePartyModule(); - } - - - // Skill casting - try { - SkillCastingMode mode = SkillCastingMode.valueOf(UtilityMethods.enumName(getConfig().getString("skill-casting.mode"))); - Bukkit.getPluginManager().registerEvents(mode.loadFromConfig(getConfig().getConfigurationSection("skill-casting")), this); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not load skill casting: " + exception.getMessage()); - } - - if (configManager.overrideVanillaExp = getConfig().getBoolean("override-vanilla-exp")) - Bukkit.getPluginManager().registerEvents(new VanillaExperienceOverride(), this); - - if (getConfig().getBoolean("hotbar-swapping.enabled")) - try { - Bukkit.getPluginManager().registerEvents(new HotbarSwap(getConfig().getConfigurationSection("hotbar-swapping")), this); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not load hotbar swapping: " + exception.getMessage()); - } - - if (getConfig().getBoolean("prevent-spawner-xp")) - Bukkit.getPluginManager().registerEvents(new NoSpawnerEXP(), this); - - if (getConfig().getBoolean("death-exp-loss.enabled")) - Bukkit.getPluginManager().registerEvents(new DeathExperienceLoss(), this); - - if (getConfig().getBoolean("shift-click-player-profile-check")) - Bukkit.getPluginManager().registerEvents(new PlayerProfileCheck(), this); - - Bukkit.getPluginManager().registerEvents(new WaypointsListener(), this); - Bukkit.getPluginManager().registerEvents(new PlayerListener(), this); - Bukkit.getPluginManager().registerEvents(new GoldPouchesListener(), this); - Bukkit.getPluginManager().registerEvents(new BlockListener(), this); - Bukkit.getPluginManager().registerEvents(new LootableChestsListener(), this); - Bukkit.getPluginManager().registerEvents(new GuildListener(), this); - Bukkit.getPluginManager().registerEvents(new FishingListener(), this); - Bukkit.getPluginManager().registerEvents(new PlayerCollectStats(), this); - Bukkit.getPluginManager().registerEvents(new PlayerPressKeyListener(), this); - // Bukkit.getPluginManager().registerEvents(new ClassTriggers(), this); - - /* - * Initialize player data from all online players. This is very important to do - * that after registering all the professses otherwise the player datas can't - * recognize what profess the player has and professes will be lost - */ - Bukkit.getOnlinePlayers().forEach(player -> dataProvider.getDataManager().setup(player.getUniqueId())); - - // load guild data after loading player data - dataProvider.getGuildManager().load(); - - // Command - try { - final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap"); - - bukkitCommandMap.setAccessible(true); - CommandMap commandMap = (CommandMap) bukkitCommandMap.get(Bukkit.getServer()); - - FileConfiguration config = new ConfigFile("commands").getConfig(); - - if (config.contains("player")) - commandMap.register("mmocore", new PlayerStatsCommand(config.getConfigurationSection("player"))); - if (config.contains("attributes")) - commandMap.register("mmocore", new AttributesCommand(config.getConfigurationSection("attributes"))); - if (config.contains("class")) - commandMap.register("mmocore", new ClassCommand(config.getConfigurationSection("class"))); - if (config.contains("waypoints")) - commandMap.register("mmocore", new WaypointsCommand(config.getConfigurationSection("waypoints"))); - if (config.contains("quests")) - commandMap.register("mmocore", new QuestsCommand(config.getConfigurationSection("quests"))); - if (config.contains("skills")) - commandMap.register("mmocore", new SkillsCommand(config.getConfigurationSection("skills"))); - if (config.contains("friends")) - commandMap.register("mmocore", new FriendsCommand(config.getConfigurationSection("friends"))); - if (config.contains("party")) - commandMap.register("mmocore", new PartyCommand(config.getConfigurationSection("party"))); - if (config.contains("guild")) - commandMap.register("mmocore", new GuildCommand(config.getConfigurationSection("guild"))); - - if (hasEconomy() && economy.isValid()) { - if (config.contains("withdraw")) - commandMap.register("mmocore", new WithdrawCommand(config.getConfigurationSection("withdraw"))); - if (config.contains("deposit")) - commandMap.register("mmocore", new DepositCommand(config.getConfigurationSection("deposit"))); - } - } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException ex) { - ex.printStackTrace(); - } - - MMOCoreCommandTreeRoot mmoCoreCommand = new MMOCoreCommandTreeRoot(); - getCommand("mmocore").setExecutor(mmoCoreCommand); - getCommand("mmocore").setTabCompleter(mmoCoreCommand); - - if (getConfig().getBoolean("auto-save.enabled")) { - int autosave = getConfig().getInt("auto-save.interval") * 20; - new BukkitRunnable() { - public void run() { - - // Save player data - for (PlayerData data : PlayerData.getAll()) - if (data.isFullyLoaded()) - dataProvider.getDataManager().saveData(data); - - // Save guild info - for (Guild guild : dataProvider.getGuildManager().getAll()) - dataProvider.getGuildManager().save(guild); - } - }.runTaskTimerAsynchronously(MMOCore.plugin, autosave, autosave); - } - } - - public void disable() { - - // Save player data - for (PlayerData data : PlayerData.getAll()) - if (data.isFullyLoaded()) { - data.close(); - dataProvider.getDataManager().saveData(data); - } - - // Save guild info - for (Guild guild : dataProvider.getGuildManager().getAll()) - dataProvider.getGuildManager().save(guild); - - // Close MySQL data provider (memory leaks) - if (dataProvider instanceof MySQLDataProvider) - ((MySQLDataProvider) dataProvider).close(); - - // Reset active blocks - mineManager.resetRemainingBlocks(); - - // Clear spawned loot chests - lootChests.getActive().forEach(chest -> chest.expire(false)); - } - - /** - * Called either when the server starts when initializing the manager for - * the first time, or when issuing a plugin reload; in that case, stuff - * like listeners must all be cleared before. - * - * Also see {@link MMOCoreManager} - * - * @param clearBefore True when issuing a plugin reload - */ - public void initializePlugin(boolean clearBefore) { - if (clearBefore) - reloadConfig(); - - configManager = new ConfigManager(); - - if (clearBefore) - MythicLib.plugin.getSkills().initialize(true); - skillManager.initialize(clearBefore); - mineManager.initialize(clearBefore); - partyManager.initialize(clearBefore); - attributeManager.initialize(clearBefore); - - // Experience must be loaded before professions and classes - experience.initialize(clearBefore); - - // Drop tables must be loaded before professions - dropTableManager.initialize(clearBefore); - - professionManager.initialize(clearBefore); - classManager.initialize(clearBefore); - - InventoryManager.load(); - - questManager.initialize(clearBefore); - lootChests.initialize(clearBefore); - restrictionManager.initialize(clearBefore); - waypointManager.initialize(clearBefore); - requestManager.initialize(clearBefore); - soundManager.initialize(clearBefore); - configItems.initialize(clearBefore); - - if (getConfig().isConfigurationSection("action-bar")) - actionBarManager.reload(getConfig().getConfigurationSection("action-bar")); - - StatType.load(); - - if (clearBefore) - PlayerData.getAll().forEach(PlayerData::update); - } - - public static void log(String message) { - log(Level.INFO, message); - } - - public static void debug(int value, String message) { - debug(value, Level.INFO, message); - } - - public static void log(Level level, String message) { - plugin.getLogger().log(level, message); - } - - public static void debug(int value, Level level, String message) { - if (DebugMode.level > (value - 1)) plugin.getLogger().log(level, message); - } - - public File getJarFile() { - return getFile(); - } - - public boolean hasEconomy() { - return economy != null && economy.isValid(); - } - - public static void sqlDebug(String s) { - if(!MMOCore.plugin.shouldDebugSQL) return; - MMOCore.plugin.getLogger().warning("- [SQL Debug] " + s); - } + public static MMOCore plugin; + + public final WaypointManager waypointManager = new WaypointManager(); + public final SoundManager soundManager = new SoundManager(); + public final RequestManager requestManager = new RequestManager(); + public final ConfigItemManager configItems = new ConfigItemManager(); + public final PlayerActionBar actionBarManager = new PlayerActionBar(); + public final SkillManager skillManager = new SkillManager(); + public final ClassManager classManager = new ClassManager(); + public final DropTableManager dropTableManager = new DropTableManager(); + public final BoosterManager boosterManager = new BoosterManager(); + public final AttributeManager attributeManager = new AttributeManager(); + public final PartyManager partyManager = new PartyManager(); + public final QuestManager questManager = new QuestManager(); + public final ProfessionManager professionManager = new ProfessionManager(); + public final ExperienceManager experience = new ExperienceManager(); + public final LootChestManager lootChests = new LootChestManager(); + public final MMOLoadManager loadManager = new MMOLoadManager(); + public final RestrictionManager restrictionManager = new RestrictionManager(); + public final SkillTreeManager skillTreeManager = new SkillTreeManager(); + + // Profession managers + public final CustomBlockManager mineManager = new CustomBlockManager(); + public final FishingManager fishingManager = new FishingManager(); + public final AlchemyManager alchemyManager = new AlchemyManager(); + public final EnchantManager enchantManager = new EnchantManager(); + public final SmithingManager smithingManager = new SmithingManager(); + + @NotNull + public ConfigManager configManager; + public VaultEconomy economy; + public RegionHandler regionHandler = new DefaultRegionHandler(); + public PlaceholderParser placeholderParser = new DefaultParser(); + public DataProvider dataProvider = new YAMLDataProvider(); + + // Modules + @NotNull + public PartyModule partyModule; + + public boolean shouldDebugSQL = false; + + private static final int MYTHICLIB_COMPATIBILITY_INDEX = 7; + + public MMOCore() { + plugin = this; + } + + public void load() { + + // Check if the ML build matches + if (MYTHICLIB_COMPATIBILITY_INDEX != MythicLib.MMOCORE_COMPATIBILITY_INDEX) { + getLogger().log(Level.WARNING, "Your versions of MythicLib and MMOCore do not match. Make sure you are using the latest builds of both plugins"); + disable(); + return; + } + + // Register target restrictions due to MMOCore in MythicLib + MythicLib.plugin.getEntities().registerRestriction(new MMOCoreTargetRestriction()); + + // Register extra objective, drop items... + if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) + loadManager.registerLoader(new WorldGuardMMOLoader()); + + if (Bukkit.getPluginManager().getPlugin("Citizens") != null) + loadManager.registerLoader(new CitizensMMOLoader()); + + if (Bukkit.getPluginManager().getPlugin("Vault") != null) loadManager.registerLoader(new VaultMMOLoader()); + + if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) + loadManager.registerLoader(new MythicMobsMMOLoader()); + } + + public void enable() { + new SpigotPlugin(70575, this).checkForUpdate(); + new Metrics(this); + saveDefaultConfig(); + + final int configVersion = getConfig().contains("config-version", true) ? getConfig().getInt("config-version") : -1; + final int defConfigVersion = getConfig().getDefaults().getInt("config-version"); + if (configVersion != defConfigVersion) { + getLogger().warning("You may be using an outdated config.yml!"); + getLogger().warning("(Your config version: '" + configVersion + "' | Expected config version: '" + defConfigVersion + "')"); + } + + if (getConfig().isConfigurationSection("mysql") && getConfig().getBoolean("mysql.enabled")) + dataProvider = new MySQLDataProvider(getConfig()); + shouldDebugSQL = getConfig().getBoolean("mysql.debug"); + + if (getConfig().isConfigurationSection("default-playerdata")) + dataProvider.getDataManager().loadDefaultData(getConfig().getConfigurationSection("default-playerdata")); + + if (Bukkit.getPluginManager().getPlugin("Vault") != null) economy = new VaultEconomy(); + + if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) { + placeholderParser = new PlaceholderAPIParser(); + getLogger().log(Level.INFO, "Hooked onto PlaceholderAPI"); + } + + if (Bukkit.getPluginManager().getPlugin("Citizens") != null) { + Bukkit.getPluginManager().registerEvents(new CitizenInteractEventListener(), this); + getLogger().log(Level.INFO, "Hooked onto Citizens"); + } + + if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) { + regionHandler = new WorldGuardRegionHandler(); + getLogger().log(Level.INFO, "Hooked onto WorldGuard"); + } + + if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) { + Bukkit.getServer().getPluginManager().registerEvents(new MythicHook(), this); + MMOCore.plugin.getLogger().log(Level.INFO, "Hooked onto MythicMobs"); + } + + /* + * Resource regeneration. Must check if entity is dead otherwise regen will make + * the 'respawn' button glitched plus HURT entity effect bug + */ + new BukkitRunnable() { + public void run() { + for (PlayerData player : PlayerData.getAll()) + if (player.isOnline() && !player.getPlayer().isDead()) + for (PlayerResource resource : PlayerResource.values()) { + double regenAmount = player.getProfess().getHandler(resource).getRegen(player); + if (regenAmount != 0) + resource.regen(player, regenAmount); + } + } + }.runTaskTimer(MMOCore.plugin, 100, 20); + + /* + * Clean active loot chests every 5 minutes. Cannot register this runnable in + * the loot chest manager because it is instanced when the plugin loads + */ + new BukkitRunnable() { + public void run() { + Iterator iterator = lootChests.getActive().iterator(); + while (iterator.hasNext()) { + LootChest next = iterator.next(); + if (next.shouldExpire()) { + iterator.remove(); + next.expire(false); + } + } + } + }.runTaskTimer(this, 5 * 60 * 20, 5 * 60 * 20); + + /* + * For the sake of the lord, make sure they aren't using MMOItems Mana and + * Stamina Addon...This should prevent a couple error reports produced by people + * not reading the installation guide... + */ + if (Bukkit.getPluginManager().getPlugin("MMOMana") != null) { + getLogger().log(Level.SEVERE, ChatColor.DARK_RED + "MMOCore is not meant to be used with MMOItems ManaAndStamina"); + getLogger().log(Level.SEVERE, ChatColor.DARK_RED + "Please read the installation guide!"); + Bukkit.broadcastMessage(ChatColor.DARK_RED + "[MMOCore] MMOCore is not meant to be used with MMOItems ManaAndStamina"); + Bukkit.broadcastMessage(ChatColor.DARK_RED + "[MMOCore] Please read the installation guide!"); + return; + } + + initializePlugin(false); + + if (getConfig().getBoolean("vanilla-exp-redirection.enabled")) + Bukkit.getPluginManager().registerEvents(new RedirectVanillaExp(getConfig().getDouble("vanilla-exp-redirection.ratio")), this); + + // Enable debug mode for extra debug tools + if (getConfig().contains("debug")) { + DebugMode.setLevel(getConfig().getInt("debug", 0)); + DebugMode.enableActionBar(); + } + + // Load quest module + try { + String questPluginName = UtilityMethods.enumName(getConfig().getString("quest-plugin")); + PartyModuleType moduleType = PartyModuleType.valueOf(questPluginName); + Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); + partyModule = moduleType.provideModule(); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not initialize quest module: " + exception.getMessage()); + partyModule = new MMOCorePartyModule(); + } + + + // Load party module + try { + String partyPluginName = UtilityMethods.enumName(getConfig().getString("party-plugin")); + PartyModuleType moduleType = PartyModuleType.valueOf(partyPluginName); + Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); + partyModule = moduleType.provideModule(); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not initialize party module: " + exception.getMessage()); + partyModule = new MMOCorePartyModule(); + } + + + // Skill casting + try { + SkillCastingMode mode = SkillCastingMode.valueOf(UtilityMethods.enumName(getConfig().getString("skill-casting.mode"))); + Bukkit.getPluginManager().registerEvents(mode.loadFromConfig(getConfig().getConfigurationSection("skill-casting")), this); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not load skill casting: " + exception.getMessage()); + } + + if (configManager.overrideVanillaExp = getConfig().getBoolean("override-vanilla-exp")) + Bukkit.getPluginManager().registerEvents(new VanillaExperienceOverride(), this); + + if (getConfig().getBoolean("hotbar-swapping.enabled")) + try { + Bukkit.getPluginManager().registerEvents(new HotbarSwap(getConfig().getConfigurationSection("hotbar-swapping")), this); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not load hotbar swapping: " + exception.getMessage()); + } + + if (getConfig().getBoolean("prevent-spawner-xp")) + Bukkit.getPluginManager().registerEvents(new NoSpawnerEXP(), this); + + if (getConfig().getBoolean("death-exp-loss.enabled")) + Bukkit.getPluginManager().registerEvents(new DeathExperienceLoss(), this); + + if (getConfig().getBoolean("shift-click-player-profile-check")) + Bukkit.getPluginManager().registerEvents(new PlayerProfileCheck(), this); + + Bukkit.getPluginManager().registerEvents(new WaypointsListener(), this); + Bukkit.getPluginManager().registerEvents(new PlayerListener(), this); + Bukkit.getPluginManager().registerEvents(new GoldPouchesListener(), this); + Bukkit.getPluginManager().registerEvents(new BlockListener(), this); + Bukkit.getPluginManager().registerEvents(new LootableChestsListener(), this); + Bukkit.getPluginManager().registerEvents(new GuildListener(), this); + Bukkit.getPluginManager().registerEvents(new FishingListener(), this); + Bukkit.getPluginManager().registerEvents(new PlayerCollectStats(), this); + Bukkit.getPluginManager().registerEvents(new PlayerPressKeyListener(), this); + // Bukkit.getPluginManager().registerEvents(new ClassTriggers(), this); + + /* + * Initialize player data from all online players. This is very important to do + * that after registering all the professses otherwise the player datas can't + * recognize what profess the player has and professes will be lost + */ + Bukkit.getOnlinePlayers().forEach(player -> dataProvider.getDataManager().setup(player.getUniqueId())); + + // load guild data after loading player data + dataProvider.getGuildManager().load(); + + // Command + try { + final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap"); + + bukkitCommandMap.setAccessible(true); + CommandMap commandMap = (CommandMap) bukkitCommandMap.get(Bukkit.getServer()); + + FileConfiguration config = new ConfigFile("commands").getConfig(); + + if (config.contains("player")) + commandMap.register("mmocore", new PlayerStatsCommand(config.getConfigurationSection("player"))); + if (config.contains("attributes")) + commandMap.register("mmocore", new AttributesCommand(config.getConfigurationSection("attributes"))); + if (config.contains("class")) + commandMap.register("mmocore", new ClassCommand(config.getConfigurationSection("class"))); + if (config.contains("waypoints")) + commandMap.register("mmocore", new WaypointsCommand(config.getConfigurationSection("waypoints"))); + if (config.contains("quests")) + commandMap.register("mmocore", new QuestsCommand(config.getConfigurationSection("quests"))); + if (config.contains("skills")) + commandMap.register("mmocore", new SkillsCommand(config.getConfigurationSection("skills"))); + if (config.contains("friends")) + commandMap.register("mmocore", new FriendsCommand(config.getConfigurationSection("friends"))); + if (config.contains("party")) + commandMap.register("mmocore", new PartyCommand(config.getConfigurationSection("party"))); + if (config.contains("guild")) + commandMap.register("mmocore", new GuildCommand(config.getConfigurationSection("guild"))); + if (config.contains("skill-tree")) + commandMap.register("mmocore", new SkillTreeCommand(config.getConfigurationSection("skill-tree"))); + if (hasEconomy() && economy.isValid()) { + if (config.contains("withdraw")) + commandMap.register("mmocore", new WithdrawCommand(config.getConfigurationSection("withdraw"))); + if (config.contains("deposit")) + commandMap.register("mmocore", new DepositCommand(config.getConfigurationSection("deposit"))); + } + } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException ex) { + ex.printStackTrace(); + } + + MMOCoreCommandTreeRoot mmoCoreCommand = new MMOCoreCommandTreeRoot(); + getCommand("mmocore").setExecutor(mmoCoreCommand); + getCommand("mmocore").setTabCompleter(mmoCoreCommand); + + if (getConfig().getBoolean("auto-save.enabled")) { + int autosave = getConfig().getInt("auto-save.interval") * 20; + new BukkitRunnable() { + public void run() { + + // Save player data + for (PlayerData data : PlayerData.getAll()) + if (data.isFullyLoaded()) + dataProvider.getDataManager().saveData(data); + + // Save guild info + for (Guild guild : dataProvider.getGuildManager().getAll()) + dataProvider.getGuildManager().save(guild); + } + }.runTaskTimerAsynchronously(MMOCore.plugin, autosave, autosave); + } + } + + public void disable() { + + // Save player data + for (PlayerData data : PlayerData.getAll()) + if (data.isFullyLoaded()) { + data.close(); + dataProvider.getDataManager().saveData(data); + } + + // Save guild info + for (Guild guild : dataProvider.getGuildManager().getAll()) + dataProvider.getGuildManager().save(guild); + + // Close MySQL data provider (memory leaks) + if (dataProvider instanceof MySQLDataProvider) + ((MySQLDataProvider) dataProvider).close(); + + // Reset active blocks + mineManager.resetRemainingBlocks(); + + // Clear spawned loot chests + lootChests.getActive().forEach(chest -> chest.expire(false)); + } + + /** + * Called either when the server starts when initializing the manager for + * the first time, or when issuing a plugin reload; in that case, stuff + * like listeners must all be cleared before. + *

+ * Also see {@link MMOCoreManager} + * + * @param clearBefore True when issuing a plugin reload + */ + public void initializePlugin(boolean clearBefore) { + if (clearBefore) + reloadConfig(); + + configManager = new ConfigManager(); + + if (clearBefore) + MythicLib.plugin.getSkills().initialize(true); + skillManager.initialize(clearBefore); + mineManager.initialize(clearBefore); + partyManager.initialize(clearBefore); + attributeManager.initialize(clearBefore); + + // Experience must be loaded before professions and classes + experience.initialize(clearBefore); + + // Drop tables must be loaded before professions + dropTableManager.initialize(clearBefore); + + professionManager.initialize(clearBefore); + classManager.initialize(clearBefore); + + InventoryManager.load(); + + questManager.initialize(clearBefore); + lootChests.initialize(clearBefore); + restrictionManager.initialize(clearBefore); + waypointManager.initialize(clearBefore); + requestManager.initialize(clearBefore); + soundManager.initialize(clearBefore); + configItems.initialize(clearBefore); + skillTreeManager.initialize(clearBefore); + + if (getConfig().isConfigurationSection("action-bar")) + actionBarManager.reload(getConfig().getConfigurationSection("action-bar")); + + StatType.load(); + + if (clearBefore) + PlayerData.getAll().forEach(PlayerData::update); + } + + public static void log(String message) { + log(Level.INFO, message); + } + + public static void debug(int value, String message) { + debug(value, Level.INFO, message); + } + + public static void log(Level level, String message) { + plugin.getLogger().log(level, message); + } + + public static void debug(int value, Level level, String message) { + if (DebugMode.level > (value - 1)) plugin.getLogger().log(level, message); + } + + public File getJarFile() { + return getFile(); + } + + public boolean hasEconomy() { + return economy != null && economy.isValid(); + } + + public static void sqlDebug(String s) { + if (!MMOCore.plugin.shouldDebugSQL) return; + MMOCore.plugin.getLogger().warning("- [SQL Debug] " + s); + } } diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index a5ed447a..d4ec1909 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -1,6 +1,5 @@ package net.Indyuce.mmocore.api.player; -import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.player.MMOPlayerData; import io.lumine.mythic.lib.player.TemporaryPlayerData; import io.lumine.mythic.lib.player.cooldown.CooldownMap; @@ -8,7 +7,9 @@ import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.ConfigMessage; import net.Indyuce.mmocore.api.SoundEvent; import net.Indyuce.mmocore.player.Unlockable; -import net.Indyuce.mmocore.waypoint.CostType; +import net.Indyuce.mmocore.tree.NodeState; +import net.Indyuce.mmocore.tree.SkillTreeNode; +import net.Indyuce.mmocore.tree.skilltree.SkillTree; import net.Indyuce.mmocore.waypoint.Waypoint; import net.Indyuce.mmocore.api.event.PlayerExperienceGainEvent; import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent; @@ -49,10 +50,12 @@ import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.scheduler.BukkitRunnable; import org.jetbrains.annotations.NotNull; +import org.w3c.dom.Node; import javax.annotation.Nullable; import java.util.*; import java.util.logging.Level; +import java.util.stream.Collectors; public class PlayerData extends OfflinePlayerData implements Closable, ExperienceTableClaimer { @@ -113,6 +116,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc */ private boolean fullyLoaded = false; + + //Value of the last skill tree the player was viewing + private SkillTree cachedSkillTree = null; + private final HashMap nodeStates= new HashMap<>(); /** * If the player data was loaded using temporary data. * See {@link TemporaryPlayerData} for more info @@ -168,6 +175,14 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } } + public NodeState getNodeState(SkillTreeNode node) { + return nodeStates.get(node); + } + + public void setNodeState(SkillTreeNode node,NodeState nodeState) { + nodeStates.put(node,nodeState); + } + @Override public void close() { @@ -226,6 +241,17 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return Math.max(1, level); } + public void setCachedSkillTree(SkillTree cachedSkillTree) { + this.cachedSkillTree = cachedSkillTree; + } + + public SkillTree getCachedSkillTree() { + + if (cachedSkillTree == null) + return MMOCore.plugin.skillTreeManager.getAll().stream().collect(Collectors.toList()).get(0); + return cachedSkillTree; + } + @Nullable public AbstractParty getParty() { return MMOCore.plugin.partyModule.getParty(this); @@ -548,7 +574,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc member.giveExperience(value, EXPSource.PARTY_SHARING, null, false); } - PlayerExperienceGainEvent event = new PlayerExperienceGainEvent(this, value, source); + PlayerExperienceGainEvent event = new PlayerExperienceGainEvent(this, value, source); Bukkit.getPluginManager().callEvent(event); if (event.isCancelled()) return; diff --git a/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java b/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java index b15bb60a..8a94b8c8 100644 --- a/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java +++ b/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java @@ -29,6 +29,7 @@ import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.Locale; public class MMOCoreUtils { public static boolean pluginItem(ItemStack item) { @@ -54,6 +55,10 @@ public class MMOCoreUtils { return builder.toString(); } + public static String toEnumName(String str) { + return str.replace("-", "_").toUpperCase(); + } + /** * Displays an in game indicator using a hologram. This uses * LumineUtils hologramFactory to summon holograms diff --git a/src/main/java/net/Indyuce/mmocore/command/SkillTreeCommand.java b/src/main/java/net/Indyuce/mmocore/command/SkillTreeCommand.java new file mode 100644 index 00000000..77e67f4a --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/command/SkillTreeCommand.java @@ -0,0 +1,38 @@ +package net.Indyuce.mmocore.command; + +import net.Indyuce.mmocore.api.event.MMOCommandEvent; +import net.Indyuce.mmocore.api.player.PlayerData; +import net.Indyuce.mmocore.manager.InventoryManager; +import org.bukkit.Bukkit; +import org.bukkit.command.Command; +import org.bukkit.command.CommandExecutor; +import org.bukkit.command.CommandSender; +import org.bukkit.command.defaults.BukkitCommand; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.entity.Player; +import org.jetbrains.annotations.NotNull; + +import java.util.Optional; + +public class SkillTreeCommand extends BukkitCommand { + public SkillTreeCommand(ConfigurationSection config) { + super(config.getString("main")); + + setAliases(config.getStringList("aliases")); + setDescription("Opens the skills menu."); + } + @Override + public boolean execute(@NotNull CommandSender sender, String s, String[] args) { + if (!(sender instanceof Player)) + return false; + PlayerData data = PlayerData.get((Player) sender); + MMOCommandEvent event = new MMOCommandEvent(data, "skills"); + Bukkit.getServer().getPluginManager().callEvent(event); + if (event.isCancelled()) + return true; + InventoryManager.TREE_VIEW.newInventory(data).open(); + return true; + } + + +} diff --git a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java new file mode 100644 index 00000000..955d7b85 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java @@ -0,0 +1,345 @@ +package net.Indyuce.mmocore.gui; + +import io.lumine.mythic.lib.player.modifier.PlayerModifier; +import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.api.player.PlayerData; +import net.Indyuce.mmocore.gui.api.EditableInventory; +import net.Indyuce.mmocore.gui.api.GeneratedInventory; +import net.Indyuce.mmocore.gui.api.item.InventoryItem; +import net.Indyuce.mmocore.gui.api.item.Placeholders; +import net.Indyuce.mmocore.gui.api.item.SimplePlaceholderItem; +import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.NodeState; +import net.Indyuce.mmocore.tree.skilltree.SkillTree; +import net.Indyuce.mmocore.tree.SkillTreeNode; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.event.inventory.InventoryAction; +import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.persistence.PersistentDataContainer; +import org.bukkit.persistence.PersistentDataType; + +import java.util.List; + +public class SkillTreeViewer extends EditableInventory { + + + public SkillTreeViewer() { + super("skill-tree"); + } + + @Override + public InventoryItem load(String function, ConfigurationSection config) { + if (function.equals("skill-tree")) { + return new SkillTreeItem(config); + } + if (function.equals("skill-tree-node")) + return new SkillTreeNodeItem(config); + if (function.equals("next-tree-list-page")) { + return new NextTreeListPageItem(config); + } + if (function.equals("previous-tree-list-page")) { + return new PreviousTreeListPageItem(config); + } + return null; + } + + + public SkillTreeInventory newInventory(PlayerData playerData) { + return new SkillTreeInventory(playerData, this); + } + + + public class SkillTreeItem extends InventoryItem { + + public SkillTreeItem(ConfigurationSection config) { + super(config); + + } + + @Override + public ItemStack display(SkillTreeInventory inv, int n) { + int index = 4 * inv.treeListPage + n; + SkillTree skillTree = MMOCore.plugin.skillTreeManager.get(index); + //We display with the material corresponding to the skillTree + ItemStack item = super.display(inv, n, skillTree.getGuiMaterial()); + ItemMeta meta = item.getItemMeta(); + PersistentDataContainer container = meta.getPersistentDataContainer(); + container.set(new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING, skillTree.getId()); + item.setItemMeta(meta); + return item; + } + + @Override + public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { + int index = 4 * inv.treeListPage + n; + SkillTree skillTree = MMOCore.plugin.skillTreeManager.get(index); + Placeholders holders = new Placeholders(); + holders.register("name", skillTree.getName()); + holders.register("id", skillTree.getId()); + return holders; + } + } + + public class NextTreeListPageItem extends SimplePlaceholderItem { + + public NextTreeListPageItem(ConfigurationSection config) { + super(config); + } + + @Override + public boolean canDisplay(SkillTreeInventory inv) { + return inv.getTreeListPage() < inv.getMaxTreeListPage(); + } + } + + public class PreviousTreeListPageItem extends SimplePlaceholderItem { + + public PreviousTreeListPageItem(ConfigurationSection config) { + super(config); + } + + @Override + public boolean canDisplay(SkillTreeInventory inv) { + return inv.getTreeListPage() > 0; + } + } + + + public class SkillTreeNodeItem extends InventoryItem { + private final LockedSkillNodeItem lockedSkillNode; + private final UnlockedSkillNodeItem unlockedSkillNode; + private final PathTreeNodeItem pathTreeNode; + + + public SkillTreeNodeItem(ConfigurationSection config) { + super(config); + Validate.isTrue(config.contains("locked-skill-node")); + Validate.isTrue(config.contains("unlocked-skill-node")); + Validate.isTrue(config.contains("path-tree-node")); + lockedSkillNode = new LockedSkillNodeItem(config.getConfigurationSection("locked-skill-node")); + unlockedSkillNode = new UnlockedSkillNodeItem(config.getConfigurationSection("unlocked-skill-node")); + pathTreeNode = new PathTreeNodeItem(config.getConfigurationSection("path-tree-node")); + } + + + @Override + public ItemStack display(SkillTreeInventory inv, int n) { + int slot = getSlots().get(n); + int deltaX = (slot - inv.getMinSlot()) % 9; + int deltaY = (slot - inv.getMinSlot()) / 9; + IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY); + ItemStack item=null; + if (inv.getSkillTree().isNode(coordinates)) { + SkillTreeNode node = inv.getSkillTree().getNode(coordinates); + if (inv.getPlayerData().getNodeState(node).equals(NodeState.UNLOCKED)) + item = unlockedSkillNode.display(inv, n, coordinates); + else if (inv.getPlayerData().getNodeState(node).equals(NodeState.LOCKED)) + item = lockedSkillNode.display(inv, n, coordinates); + + } //We check if is a path only if the skillTree is an automatic Skill Tree + else if (inv.getSkillTree().isPath(coordinates)) + item = pathTreeNode.display(inv, n); + else + //If it is none of the above we just display air + return new ItemStack(Material.AIR); + + //We save the coordinates of the node + ItemMeta meta = item.getItemMeta(); + PersistentDataContainer container = meta.getPersistentDataContainer(); + container.set(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER, coordinates.getX()); + container.set(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER, coordinates.getY()); + item.setItemMeta(meta); + return item; + } + + + @Override + public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { + return new Placeholders(); + } + + } + + public class LockedSkillNodeItem extends InventoryItem { + + public LockedSkillNodeItem(ConfigurationSection config) { + super(config); + } + + public ItemStack display(SkillTreeInventory inv, int n, IntegerCoordinates coordinates) { + return super.display(inv, n); + } + + @Override + public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { + int slot = getSlots().get(n); + int deltaX = (slot - inv.getMinSlot()) % 9; + int deltaY = (slot - inv.getMinSlot()) / 9; + IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY); + SkillTreeNode treeNode = inv.getSkillTree().getNode(coordinates); + Placeholders holders = new Placeholders(); + holders.register("name", treeNode.getName()); + holders.register("node-state", inv.getPlayerData().getNodeState(treeNode)); + //Display what nodes this node unlocks + String str = ""; + for (SkillTreeNode node : treeNode.getChildren()) + str += node.getName() + ","; + //We remove the last comma + str = str.substring(0, str.length() - 1); + holders.register("unlocks", str); + //Display all the modifiers this node gives + str = ""; + for (PlayerModifier playerModifier : treeNode.getModifiers()) { + //TODO + str += "\n" + playerModifier.getKey(); + } + + holders.register("modifiers", str); + + return holders; + } + } + + public class UnlockedSkillNodeItem extends InventoryItem { + public UnlockedSkillNodeItem(ConfigurationSection config) { + super(config); + } + + + public ItemStack display(SkillTreeInventory inv, int n, IntegerCoordinates coordinates) { + return super.display(inv, n); + } + + @Override + public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { + int slot = getSlots().get(n); + int deltaX = (slot - inv.getMinSlot()) % 9; + int deltaY = (slot - inv.getMinSlot()) / 9; + IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY); + SkillTreeNode treeNode = inv.getSkillTree().getNode(coordinates); + Placeholders holders = new Placeholders(); + holders.register("name", treeNode.getName()); + holders.register("node-state", inv.getPlayerData().getNodeState(treeNode)); + String str = ""; + for (SkillTreeNode node : treeNode.getChildren()) + str += node.getName() + ","; + //We remove the last comma + str = str.substring(0, str.length() - 1); + holders.register("unlocks", str); + str = ""; + for (PlayerModifier playerModifier : treeNode.getModifiers()) { + //TODO + str += "\n" + playerModifier.getKey(); + } + + holders.register("modifiers", str); + return holders; + } + + + } + + public class PathTreeNodeItem extends SimplePlaceholderItem { + public PathTreeNodeItem(ConfigurationSection config) { + super(config); + } + + } + + + public class SkillTreeInventory extends GeneratedInventory { + private int x, y; + //width and height correspond to the the size of the 'board' representing the skill tree + private int minSlot, middleSlot, maxSlot; + private final int width, height; + private int treeListPage; + private final int maxTreeListPage; + private final SkillTree skillTree; + + + public SkillTreeInventory(PlayerData playerData, EditableInventory editable) { + super(playerData, editable); + skillTree = playerData.getCachedSkillTree(); + + maxTreeListPage = MMOCore.plugin.skillTreeManager.getAll().size() / 4; + + //We get the width and height of the GUI(corresponding to the slots given) + List slots = getByFunction("skill-tree-node").getSlots(); + minSlot = 64; + maxSlot = 0; + for (int slot : slots) { + if (slot < minSlot) + minSlot = slot; + if (slot > maxSlot) + maxSlot = slot; + } + width = (maxSlot - minSlot) % 9; + height = (maxSlot - minSlot) / 9; + middleSlot = minSlot + width / 2 + 9 * (height / 2); + } + + public int getX() { + return x; + } + + public int getY() { + return y; + } + + public int getTreeListPage() { + return treeListPage; + } + + public int getMaxTreeListPage() { + return maxTreeListPage; + } + + @Override + public String calculateName() { + return getEditable().getName().replace("{skill-tree-name}", skillTree.getName()).replace("{skill-tree-id}", skillTree.getId()); + } + + public SkillTree getSkillTree() { + return skillTree; + } + + public int getMinSlot() { + return minSlot; + } + + @Override + public void whenClicked(InventoryClickEvent event, InventoryItem item) { + if (event.getAction().equals(InventoryAction.MOVE_TO_OTHER_INVENTORY)) { + int offset = event.getSlot() - middleSlot; + x += offset % 9; + y += offset / 9; + open(); + return; + } + if (item.getFunction().equals("next-tree-list-page")) { + treeListPage++; + open(); + } + + if (item.getFunction().equals("previous-tree-list-page")) { + treeListPage--; + open(); + } + + if (item.getFunction().equals("skill-tree")) { + String id = event.getCurrentItem().getItemMeta().getPersistentDataContainer().get( + new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING); + playerData.setCachedSkillTree(MMOCore.plugin.skillTreeManager.get(id)); + newInventory(playerData).open(); + } + if (item.getFunction().equals("skill-tree-node")) { + + } + } + } +} diff --git a/src/main/java/net/Indyuce/mmocore/gui/api/item/InventoryItem.java b/src/main/java/net/Indyuce/mmocore/gui/api/item/InventoryItem.java index 1de7b85d..86b737ca 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/api/item/InventoryItem.java +++ b/src/main/java/net/Indyuce/mmocore/gui/api/item/InventoryItem.java @@ -133,10 +133,14 @@ public abstract class InventoryItem { return display(inv, 0); } - public ItemStack display(T inv, int n) { + public ItemStack display(T inv,int n) { + return display(inv,n,null); + } + + public ItemStack display(T inv, int n,Material specificMaterial) { Placeholders placeholders = getPlaceholders(inv, n); - ItemStack item = new ItemStack(material); + ItemStack item = new ItemStack(specificMaterial==null?material:specificMaterial); ItemMeta meta = item.getItemMeta(); if (texture != null && meta instanceof SkullMeta) diff --git a/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java b/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java index 46b9a8f6..599de4bf 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java @@ -6,15 +6,7 @@ import java.util.logging.Level; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.ConfigFile; -import net.Indyuce.mmocore.gui.AttributeView; -import net.Indyuce.mmocore.gui.ClassConfirmation; -import net.Indyuce.mmocore.gui.ClassSelect; -import net.Indyuce.mmocore.gui.PlayerStats; -import net.Indyuce.mmocore.gui.QuestViewer; -import net.Indyuce.mmocore.gui.SkillList; -import net.Indyuce.mmocore.gui.SubclassConfirmation; -import net.Indyuce.mmocore.gui.SubclassSelect; -import net.Indyuce.mmocore.gui.WaypointViewer; +import net.Indyuce.mmocore.gui.*; import net.Indyuce.mmocore.gui.api.EditableInventory; import net.Indyuce.mmocore.gui.social.friend.EditableFriendList; import net.Indyuce.mmocore.gui.social.friend.EditableFriendRemoval; @@ -24,32 +16,32 @@ import net.Indyuce.mmocore.gui.social.party.EditablePartyCreation; import net.Indyuce.mmocore.gui.social.party.EditablePartyView; public class InventoryManager { - public static final PlayerStats PLAYER_STATS = new PlayerStats(); - public static final SkillList SKILL_LIST = new SkillList(); - public static final ClassSelect CLASS_SELECT = new ClassSelect(); - public static final SubclassSelect SUBCLASS_SELECT = new SubclassSelect(); - public static final ClassConfirmation CLASS_CONFIRM = new ClassConfirmation(); - public static final SubclassConfirmation SUBCLASS_CONFIRM = new SubclassConfirmation(); - public static final WaypointViewer WAYPOINTS = new WaypointViewer(); - public static final EditableFriendList FRIEND_LIST = new EditableFriendList(); - public static final EditableFriendRemoval FRIEND_REMOVAL = new EditableFriendRemoval(); - public static final EditablePartyView PARTY_VIEW = new EditablePartyView(); - public static final EditablePartyCreation PARTY_CREATION = new EditablePartyCreation(); - public static final EditableGuildView GUILD_VIEW = new EditableGuildView(); - public static final EditableGuildCreation GUILD_CREATION = new EditableGuildCreation(); - public static final QuestViewer QUEST_LIST = new QuestViewer(); - public static final AttributeView ATTRIBUTE_VIEW = new AttributeView(); + public static final PlayerStats PLAYER_STATS = new PlayerStats(); + public static final SkillList SKILL_LIST = new SkillList(); + public static final ClassSelect CLASS_SELECT = new ClassSelect(); + public static final SubclassSelect SUBCLASS_SELECT = new SubclassSelect(); + public static final ClassConfirmation CLASS_CONFIRM = new ClassConfirmation(); + public static final SubclassConfirmation SUBCLASS_CONFIRM = new SubclassConfirmation(); + public static final WaypointViewer WAYPOINTS = new WaypointViewer(); + public static final EditableFriendList FRIEND_LIST = new EditableFriendList(); + public static final EditableFriendRemoval FRIEND_REMOVAL = new EditableFriendRemoval(); + public static final EditablePartyView PARTY_VIEW = new EditablePartyView(); + public static final EditablePartyCreation PARTY_CREATION = new EditablePartyCreation(); + public static final EditableGuildView GUILD_VIEW = new EditableGuildView(); + public static final EditableGuildCreation GUILD_CREATION = new EditableGuildCreation(); + public static final QuestViewer QUEST_LIST = new QuestViewer(); + public static final AttributeView ATTRIBUTE_VIEW = new AttributeView(); + public static final SkillTreeViewer TREE_VIEW = new SkillTreeViewer(); + public static final List list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION); - public static final List list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION); - - public static void load() { - list.forEach(inv -> { - MMOCore.plugin.configManager.loadDefaultFile("gui", inv.getId() + ".yml"); - try { - inv.reload(new ConfigFile("/gui", inv.getId()).getConfig()); - } catch (IllegalArgumentException exception) { - MMOCore.log(Level.WARNING, "Could not load inventory " + inv.getId() + ": " + exception.getMessage()); - } - }); - } + public static void load() { + list.forEach(inv -> { + MMOCore.plugin.configManager.loadDefaultFile("gui", inv.getId() + ".yml"); + try { + inv.reload(new ConfigFile("/gui", inv.getId()).getConfig()); + } catch (IllegalArgumentException exception) { + MMOCore.log(Level.WARNING, "Could not load inventory " + inv.getId() + ": " + exception.getMessage()); + } + }); + } } diff --git a/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java b/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java index 29a5b7bd..1d005cf9 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java @@ -1,21 +1,63 @@ package net.Indyuce.mmocore.manager; +import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.gui.SkillTreeViewer; import net.Indyuce.mmocore.manager.registry.MMOCoreRegister; -import net.Indyuce.mmocore.tree.SkillTree; +import net.Indyuce.mmocore.tree.SkillTreeNode; +import net.Indyuce.mmocore.tree.skilltree.SkillTree; +import org.bukkit.configuration.file.YamlConfiguration; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + -@Deprecated public class SkillTreeManager extends MMOCoreRegister { + private final ArrayList skillTreeNodes = new ArrayList<>(); @Override + public void register(SkillTree tree){ + super.register(tree); + tree.getNodes().forEach((node)->skillTreeNodes.add(node)); + } + + + public ArrayList getAllNodes() { + return skillTreeNodes; + } + + public SkillTree get(int index) { + return registered.values().stream().collect(Collectors.toList()).get(index); + } + + @Override + public String getRegisteredObjectName() { return "skill tree"; } + @Override public void initialize(boolean clearBefore) { if (clearBefore) registered.clear(); + File file = new File(MMOCore.plugin.getDataFolder() + "/skillTree"); + if (!file.exists()) + file.mkdirs(); + load(file); + } - // TODO + + public void load(File file) { + if (file.isDirectory()) { + List fileList = Arrays.asList(file.listFiles()).stream().sorted().collect(Collectors.toList()); + for (File child : fileList) { + load(child); + } + } else { + register(SkillTree.loadSkillTree(YamlConfiguration.loadConfiguration(file))); + } } } diff --git a/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java b/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java index 7efe48fa..fbfd93e5 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java @@ -10,6 +10,8 @@ import net.Indyuce.mmocore.api.player.stats.StatType; import net.Indyuce.mmocore.guild.provided.Guild; import net.Indyuce.mmocore.manager.data.DataProvider; import net.Indyuce.mmocore.manager.data.PlayerDataManager; +import net.Indyuce.mmocore.tree.NodeState; +import net.Indyuce.mmocore.tree.SkillTreeNode; import org.apache.commons.lang.Validate; import org.bukkit.configuration.file.FileConfiguration; import org.jetbrains.annotations.NotNull; @@ -21,128 +23,137 @@ import java.util.logging.Level; import java.util.stream.Collectors; public class YAMLPlayerDataManager extends PlayerDataManager { - private final DataProvider provider; + private final DataProvider provider; - public YAMLPlayerDataManager(DataProvider provider) { - this.provider = provider; - } + public YAMLPlayerDataManager(DataProvider provider) { + this.provider = provider; + } - @Override - public void loadData(PlayerData data) { - FileConfiguration config = new ConfigFile(data.getUniqueId()).getConfig(); + @Override + public void loadData(PlayerData data) { + FileConfiguration config = new ConfigFile(data.getUniqueId()).getConfig(); - data.setClassPoints(config.getInt("class-points", getDefaultData().getClassPoints())); - data.setSkillPoints(config.getInt("skill-points", getDefaultData().getSkillPoints())); - data.setAttributePoints(config.getInt("attribute-points", getDefaultData().getAttributePoints())); - data.setAttributeReallocationPoints(config.getInt("attribute-realloc-points", getDefaultData().getAttrReallocPoints())); - data.setLevel(config.getInt("level", getDefaultData().getLevel())); - data.setExperience(config.getInt("experience")); - if (config.contains("class")) - data.setClass(MMOCore.plugin.classManager.get(config.getString("class"))); + data.setClassPoints(config.getInt("class-points", getDefaultData().getClassPoints())); + data.setSkillPoints(config.getInt("skill-points", getDefaultData().getSkillPoints())); + data.setAttributePoints(config.getInt("attribute-points", getDefaultData().getAttributePoints())); + data.setAttributeReallocationPoints(config.getInt("attribute-realloc-points", getDefaultData().getAttrReallocPoints())); + data.setLevel(config.getInt("level", getDefaultData().getLevel())); + data.setExperience(config.getInt("experience")); + if (config.contains("class")) + data.setClass(MMOCore.plugin.classManager.get(config.getString("class"))); - if (!data.hasUsedTemporaryData()) { - data.setMana(data.getStats().getStat(StatType.MAX_MANA)); - data.setStamina(data.getStats().getStat(StatType.MAX_STAMINA)); - data.setStellium(data.getStats().getStat(StatType.MAX_STELLIUM)); - } + if (!data.hasUsedTemporaryData()) { + data.setMana(data.getStats().getStat(StatType.MAX_MANA)); + data.setStamina(data.getStats().getStat(StatType.MAX_STAMINA)); + data.setStellium(data.getStats().getStat(StatType.MAX_STELLIUM)); + } - if (config.contains("guild")) { - Guild guild = provider.getGuildManager().getGuild(config.getString("guild")); - data.setGuild(guild.getMembers().has(data.getUniqueId()) ? guild : null); - } - if (config.contains("attribute")) - data.getAttributes().load(config.getConfigurationSection("attribute")); - if (config.contains("profession")) - data.getCollectionSkills().load(config.getConfigurationSection("profession")); - if (config.contains("quest")) - data.getQuestData().load(config.getConfigurationSection("quest")); - data.getQuestData().updateBossBar(); - if (config.contains("waypoints")) - data.getWaypoints().addAll(config.getStringList("waypoints")); - if (config.contains("friends")) - config.getStringList("friends").forEach(str -> data.getFriends().add(UUID.fromString(str))); - if (config.contains("skill")) - config.getConfigurationSection("skill").getKeys(false).forEach(id -> data.setSkillLevel(id, config.getInt("skill." + id))); - if (config.contains("bound-skills")) - for (String id : config.getStringList("bound-skills")) - if (data.getProfess().hasSkill(id)) - data.getBoundSkills().add(data.getProfess().getSkill(id)); + if (config.contains("guild")) { + Guild guild = provider.getGuildManager().getGuild(config.getString("guild")); + data.setGuild(guild.getMembers().has(data.getUniqueId()) ? guild : null); + } + if (config.contains("attribute")) + data.getAttributes().load(config.getConfigurationSection("attribute")); + if (config.contains("profession")) + data.getCollectionSkills().load(config.getConfigurationSection("profession")); + if (config.contains("quest")) + data.getQuestData().load(config.getConfigurationSection("quest")); + data.getQuestData().updateBossBar(); + if (config.contains("waypoints")) + data.getWaypoints().addAll(config.getStringList("waypoints")); + if (config.contains("friends")) + config.getStringList("friends").forEach(str -> data.getFriends().add(UUID.fromString(str))); + if (config.contains("skill")) + config.getConfigurationSection("skill").getKeys(false).forEach(id -> data.setSkillLevel(id, config.getInt("skill." + id))); + if (config.contains("bound-skills")) + for (String id : config.getStringList("bound-skills")) + if (data.getProfess().hasSkill(id)) + data.getBoundSkills().add(data.getProfess().getSkill(id)); + if (config.contains("times-claimed")) + for (String key : config.getConfigurationSection("times-claimed").getKeys(true)) + data.getItemClaims().put(key, config.getInt("times-claimed." + key)); + for (SkillTreeNode node : MMOCore.plugin.skillTreeManager.getAllNodes()) { + String str = config.getString("skill-tree-nodes." + node.getTree().getId() + "." + node.getId()); + if (str == null) + data.setNodeState(node, NodeState.LOCKED); + else + data.setNodeState(node,NodeState.valueOf(str)); + } + // Load class slots, use try so the player can log in. + if (config.contains("class-info")) + for (String key : config.getConfigurationSection("class-info").getKeys(false)) + try { + PlayerClass profess = MMOCore.plugin.classManager.get(key); + Validate.notNull(profess, "Could not find class '" + key + "'"); + data.applyClassInfo(profess, new SavedClassInformation(config.getConfigurationSection("class-info." + key))); + } catch (IllegalArgumentException exception) { + MMOCore.log(Level.WARNING, "Could not load class info '" + key + "': " + exception.getMessage()); + } - if (config.contains("times-claimed")) - for (String key : config.getConfigurationSection("times-claimed").getKeys(true)) - data.getItemClaims().put(key, config.getInt("times-claimed." + key)); + data.setFullyLoaded(); + } - // Load class slots, use try so the player can log in. - if (config.contains("class-info")) - for (String key : config.getConfigurationSection("class-info").getKeys(false)) - try { - PlayerClass profess = MMOCore.plugin.classManager.get(key); - Validate.notNull(profess, "Could not find class '" + key + "'"); - data.applyClassInfo(profess, new SavedClassInformation(config.getConfigurationSection("class-info." + key))); - } catch (IllegalArgumentException exception) { - MMOCore.log(Level.WARNING, "Could not load class info '" + key + "': " + exception.getMessage()); - } + @Override + public void saveData(PlayerData data) { + ConfigFile file = new ConfigFile(data.getUniqueId()); + FileConfiguration config = file.getConfig(); - data.setFullyLoaded(); - } + config.set("class-points", data.getClassPoints()); + config.set("skill-points", data.getSkillPoints()); + config.set("attribute-points", data.getAttributePoints()); + // config.set("skill-realloc-points", skillReallocationPoints); + config.set("attribute-realloc-points", data.getAttributeReallocationPoints()); + config.set("level", data.getLevel()); + config.set("experience", data.getExperience()); + config.set("class", data.getProfess().getId()); + config.set("waypoints", new ArrayList<>(data.getWaypoints())); + config.set("friends", data.getFriends().stream().map(UUID::toString).collect(Collectors.toList())); + config.set("last-login", data.getLastLogin()); + config.set("guild", data.hasGuild() ? data.getGuild().getId() : null); - @Override - public void saveData(PlayerData data) { - ConfigFile file = new ConfigFile(data.getUniqueId()); - FileConfiguration config = file.getConfig(); + config.set("skill", null); + data.mapSkillLevels().forEach((key1, value) -> config.set("skill." + key1, value)); + data.getItemClaims().forEach((key, times) -> config.set("times-claimed." + key, times)); - config.set("class-points", data.getClassPoints()); - config.set("skill-points", data.getSkillPoints()); - config.set("attribute-points", data.getAttributePoints()); - // config.set("skill-realloc-points", skillReallocationPoints); - config.set("attribute-realloc-points", data.getAttributeReallocationPoints()); - config.set("level", data.getLevel()); - config.set("experience", data.getExperience()); - config.set("class", data.getProfess().getId()); - config.set("waypoints", new ArrayList<>(data.getWaypoints())); - config.set("friends", data.getFriends().stream().map(UUID::toString).collect(Collectors.toList())); - config.set("last-login", data.getLastLogin()); - config.set("guild", data.hasGuild() ? data.getGuild().getId() : null); + //Save the node states for the player + for (SkillTreeNode node : MMOCore.plugin.skillTreeManager.getAllNodes()) { + config.set("skill-tree-nodes." + node.getTree().getId() + "." + node.getId(),data.getNodeState(node)); + } + List boundSkills = new ArrayList<>(); + data.getBoundSkills().forEach(skill -> boundSkills.add(skill.getSkill().getHandler().getId())); + config.set("bound-skills", boundSkills); - config.set("skill", null); - data.mapSkillLevels().forEach((key1, value) -> config.set("skill." + key1, value)); - data.getItemClaims().forEach((key, times) -> config.set("times-claimed." + key, times)); + config.set("attribute", null); + config.createSection("attribute"); + data.getAttributes().save(config.getConfigurationSection("attribute")); - List boundSkills = new ArrayList<>(); - data.getBoundSkills().forEach(skill -> boundSkills.add(skill.getSkill().getHandler().getId())); - config.set("bound-skills", boundSkills); + config.set("profession", null); + config.createSection("profession"); + data.getCollectionSkills().save(config.getConfigurationSection("profession")); - config.set("attribute", null); - config.createSection("attribute"); - data.getAttributes().save(config.getConfigurationSection("attribute")); + config.set("quest", null); + config.createSection("quest"); + data.getQuestData().save(config.getConfigurationSection("quest")); - config.set("profession", null); - config.createSection("profession"); - data.getCollectionSkills().save(config.getConfigurationSection("profession")); + config.set("class-info", null); + for (String key : data.getSavedClasses()) { + SavedClassInformation info = data.getClassInfo(key); + config.set("class-info." + key + ".level", info.getLevel()); + config.set("class-info." + key + ".experience", info.getExperience()); + config.set("class-info." + key + ".skill-points", info.getSkillPoints()); + config.set("class-info." + key + ".attribute-points", info.getAttributePoints()); + config.set("class-info." + key + ".attribute-realloc-points", info.getAttributeReallocationPoints()); + info.getSkillKeys().forEach(skill -> config.set("class-info." + key + ".skill." + skill, info.getSkillLevel(skill))); + info.getAttributeKeys() + .forEach(attribute -> config.set("class-info." + key + ".attribute." + attribute, info.getAttributeLevel(attribute))); + } - config.set("quest", null); - config.createSection("quest"); - data.getQuestData().save(config.getConfigurationSection("quest")); + file.save(); + } - config.set("class-info", null); - for (String key : data.getSavedClasses()) { - SavedClassInformation info = data.getClassInfo(key); - config.set("class-info." + key + ".level", info.getLevel()); - config.set("class-info." + key + ".experience", info.getExperience()); - config.set("class-info." + key + ".skill-points", info.getSkillPoints()); - config.set("class-info." + key + ".attribute-points", info.getAttributePoints()); - config.set("class-info." + key + ".attribute-realloc-points", info.getAttributeReallocationPoints()); - info.getSkillKeys().forEach(skill -> config.set("class-info." + key + ".skill." + skill, info.getSkillLevel(skill))); - info.getAttributeKeys() - .forEach(attribute -> config.set("class-info." + key + ".attribute." + attribute, info.getAttributeLevel(attribute))); - } - - file.save(); - } - - @NotNull - @Override - public OfflinePlayerData getOffline(UUID uuid) { - return isLoaded(uuid) ? get(uuid) : new YAMLOfflinePlayerData(uuid); - } + @NotNull + @Override + public OfflinePlayerData getOffline(UUID uuid) { + return isLoaded(uuid) ? get(uuid) : new YAMLOfflinePlayerData(uuid); + } } diff --git a/src/main/java/net/Indyuce/mmocore/quest/MMOCoreQuestModule.java b/src/main/java/net/Indyuce/mmocore/quest/MMOCoreQuestModule.java index 1af7fdbc..c50b3c09 100644 --- a/src/main/java/net/Indyuce/mmocore/quest/MMOCoreQuestModule.java +++ b/src/main/java/net/Indyuce/mmocore/quest/MMOCoreQuestModule.java @@ -6,8 +6,9 @@ import net.Indyuce.mmocore.quest.compat.QuestModule; import org.bukkit.entity.Player; public class MMOCoreQuestModule implements QuestModule { + @Override - public AbstractQuest getQuestOrThrow(String id) { + public AbstractQuest getQuest(String id) { Quest quest=MMOCore.plugin.questManager.get(id); if(quest==null) return null; diff --git a/src/main/java/net/Indyuce/mmocore/quest/compat/BeautyQuestModule.java b/src/main/java/net/Indyuce/mmocore/quest/compat/BeautyQuestModule.java index e1e4f720..e984b203 100644 --- a/src/main/java/net/Indyuce/mmocore/quest/compat/BeautyQuestModule.java +++ b/src/main/java/net/Indyuce/mmocore/quest/compat/BeautyQuestModule.java @@ -8,11 +8,13 @@ import fr.skytasul.quests.structure.Quest; import net.Indyuce.mmocore.quest.AbstractQuest; import org.bukkit.entity.Player; +import javax.annotation.Nonnull; + public class BeautyQuestModule implements QuestModule { @Override - public BeautyQuestQuest getQuestOrThrow(String questId) { + public BeautyQuestQuest getQuest(String questId) { Quest quest=QuestsAPI.getQuests().getQuest(Integer.parseInt(questId)); return quest==null?null:new BeautyQuestQuest(quest); } @@ -20,15 +22,15 @@ public class BeautyQuestModule implements QuestModule{ @Override - public QuestCreatorQuest getQuestOrThrow(String id) { + public QuestCreatorQuest getQuest(String id) { return new QuestCreatorQuest(id); } @Override public boolean hasCompletedQuest(String questId, Player player) { UserQC playerData=UserQC.cachedOrNull(player); - Validate.notNull(playerData,"QuestCreator User hasn't been loaded!"); + if(playerData==null) + return false; //Gets all the quests the player has succeeded at List elements=playerData.getQuestHistory().getElements(questId, Arrays.asList(QuestEndType.SUCCESS),0); for(QuestHistoryElement el:elements) { diff --git a/src/main/java/net/Indyuce/mmocore/quest/compat/QuestModule.java b/src/main/java/net/Indyuce/mmocore/quest/compat/QuestModule.java index d4cae6b4..bb66ecfc 100644 --- a/src/main/java/net/Indyuce/mmocore/quest/compat/QuestModule.java +++ b/src/main/java/net/Indyuce/mmocore/quest/compat/QuestModule.java @@ -3,12 +3,15 @@ package net.Indyuce.mmocore.quest.compat; import net.Indyuce.mmocore.quest.AbstractQuest; import org.bukkit.entity.Player; +import javax.annotation.Nullable; + public interface QuestModule { /** * @return Quest with given name */ - public T getQuestOrThrow(String id); + @Nullable + public T getQuest(String id); /** * @return If a specific player did a certain quest diff --git a/src/main/java/net/Indyuce/mmocore/tree/NodeState.java b/src/main/java/net/Indyuce/mmocore/tree/NodeState.java new file mode 100644 index 00000000..33ff58b0 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/NodeState.java @@ -0,0 +1,5 @@ +package net.Indyuce.mmocore.tree; + +public enum NodeState { + LOCKED,UNLOCKED; +} diff --git a/src/main/java/net/Indyuce/mmocore/tree/SkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/SkillTree.java deleted file mode 100644 index 15282002..00000000 --- a/src/main/java/net/Indyuce/mmocore/tree/SkillTree.java +++ /dev/null @@ -1,79 +0,0 @@ -package net.Indyuce.mmocore.tree; - -import net.Indyuce.mmocore.MMOCore; -import net.Indyuce.mmocore.manager.registry.RegisterObject; -import org.apache.commons.lang.Validate; -import org.bukkit.configuration.ConfigurationSection; -import org.jetbrains.annotations.NotNull; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.Objects; -import java.util.logging.Level; - -/** - * A passive skill tree that features nodes, or passive skills. - *

- * The player can explore the passive skill tree using the right GUI - * and unlock nodes by spending passive skill points. Unlocking nodes - * grant permanent player modifiers, including - * - stats - * - active or passive MythicLib skills - * - active or passive MMOCore skills - * - extra attribute pts - * - particle or potion effects - * - * @author jules - * @see {@link SkillTreeNode} - */ -public class SkillTree implements RegisterObject { - private final String id, name; - private final Map nodes = new HashMap<>(); - - public SkillTree(ConfigurationSection config) { - this.id = config.getName(); - this.name = Objects.requireNonNull(config.getString("name"), "Could not find skill tree name"); - Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find tree passive skills"); - for (String xKey : config.getConfigurationSection("nodes").getKeys(false)) - for (String yKey : config.getConfigurationSection("nodes." + xKey).getKeys(false)) - try { - int x = Integer.parseInt(xKey), y = Integer.parseInt(yKey); - SkillTreeNode node = new SkillTreeNode(this, x, y, config.getConfigurationSection("nodes." + xKey + "." + yKey)); - nodes.put(node.getCoordinates(), node); - } catch (RuntimeException exception) { - MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load tree node '" + xKey + "." + yKey + "' for skill tree '" + id + "': " + exception.getMessage()); - } - } - - @Override - public String getId() { - return id; - } - - public String getName() { - return name; - } - - public Collection getNodes() { - return nodes.values(); - } - - @NotNull - public SkillTreeNode getNode(IntegerCoordinates coords) { - return Objects.requireNonNull(nodes.get(coords), "Could not find node in tree '" + id + "' with coordinates '" + coords.toString() + "'"); - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - SkillTree skillTree = (SkillTree) o; - return id.equals(skillTree.id); - } - - @Override - public int hashCode() { - return Objects.hash(id); - } -} diff --git a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java index 61b396ae..cf3d79f8 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java @@ -4,27 +4,53 @@ import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.player.modifier.PlayerModifier; import io.lumine.mythic.lib.util.configobject.ConfigSectionObject; import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.player.Unlockable; +import net.Indyuce.mmocore.tree.skilltree.AutomaticSkillTree; +import net.Indyuce.mmocore.tree.skilltree.SkillTree; import org.apache.commons.lang.Validate; import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; -import java.util.HashSet; -import java.util.List; -import java.util.Objects; -import java.util.Set; +import java.util.*; public class SkillTreeNode implements Unlockable { private final SkillTree tree; - private final String name; - private final IntegerCoordinates coordinates; + private final String name,id; + private IntegerCoordinates coordinates; private final List lore; private final Set modifiers = new HashSet<>(); + private final ArrayList children = new ArrayList<>(); + private final ArrayList parents=new ArrayList<>(); + + + + public SkillTreeNode(SkillTree tree, ConfigurationSection config) { + + Validate.notNull(config, "Config cannot be null"); + this.id=config.getName(); + this.tree = tree; + name = Objects.requireNonNull(config.getString("name"), "Could not find node name"); + lore = config.getStringList("lore"); + Validate.isTrue(config.contains("node-type"),"Could not find the node type"); + + + //If coordinates are precised adn we are not wiht an automaticTreewe set them up + if((!(tree instanceof AutomaticSkillTree))&&config.contains("coordinates.x")&&config.contains("coordinates.y")) { + coordinates=new IntegerCoordinates(config.getInt("coordinates.x"),config.getInt("coordinates.y")); + } + for (String key : config.getConfigurationSection("modifiers").getKeys(false)) { + PlayerModifier mod = MythicLib.plugin.getModifiers().loadPlayerModifier(new ConfigSectionObject(config.getConfigurationSection(key))); + modifiers.add(mod); + } + } public SkillTreeNode(SkillTree tree, int x, int y, ConfigurationSection config) { Validate.notNull(config, "Config cannot be null"); + this.id=config.getName(); this.tree = tree; name = Objects.requireNonNull(config.getString("name"), "Could not find node name"); + Validate.isTrue(config.contains("node-type"),"Could not find the node type"); coordinates = new IntegerCoordinates(x, y); lore = config.getStringList("lore"); for (String key : config.getConfigurationSection("modifiers").getKeys(false)) { @@ -33,6 +59,44 @@ public class SkillTreeNode implements Unlockable { } } + + /** + * + */ + protected void whenPostLoaded(@NotNull ConfigurationSection config) { + + } + + public SkillTree getTree() { + return tree; + } + + //Used when postLoaded + public void addParent(SkillTreeNode parent) { + parents.add(parent); + } + + public void addChild(SkillTreeNode child) {children.add(child);} + + public void setCoordinates(IntegerCoordinates coordinates) { + this.coordinates = coordinates; + } + + + public ArrayList getParents() { + return parents; + } + + public ArrayList getChildren() { + return children; + } + + + + public String getId() { + return id; + } + public String getName() { return name; } @@ -57,6 +121,8 @@ public class SkillTreeNode implements Unlockable { return "skill_tree:" + tree.getId() + "_" + coordinates.getX() + "_" + coordinates.getY(); } + + @Override public boolean equals(Object o) { if (this == o) return true; @@ -91,4 +157,5 @@ public class SkillTreeNode implements Unlockable { String treeId = treeIdBuilder.toString(); return MMOCore.plugin.skillTreeManager.get(treeId).getNode(coords); } + } diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java new file mode 100644 index 00000000..a8336f09 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java @@ -0,0 +1,167 @@ +package net.Indyuce.mmocore.tree.skilltree; + +import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.SkillTreeNode; +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.ConfigurationSection; + +import java.util.ArrayList; +import java.util.HashMap; + +public class AutomaticSkillTree extends SkillTree { + private SkillTreeNode root; + //Represents all the coordinates that will be displayed as a path (between 2 nodes of the tree) + private final ArrayList pathToParents = new ArrayList<>(); + + //Hash map to store the left and right branches of each node + private final HashMap nodeBranches = new HashMap<>(); + + public AutomaticSkillTree(ConfigurationSection config) { + super(config); + } + + @Override + public void whenPostLoaded(ConfigurationSection config) { + + + //We setup the children and parents for each node. + for (SkillTreeNode node : nodes.values()) { + ConfigurationSection section = config.getConfigurationSection(node.getId()); + for (String child : section.getStringList("children")) { + node.addChild(getNode(child)); + getNode(child).addParent(node); + } + } + + + //We find the root of the tree wich is + for (SkillTreeNode node : nodes.values()) { + if (node.getParents().size() == 0) { + Validate.isTrue(root == null, "Their can't be more than 1 root in the skillTree!"); + root = node; + } + } + //We setup the width of all the nodes recursively + setupTreeWidth(root); + //We recursively setup all the coordinates of the tree nodes + root.setCoordinates(new IntegerCoordinates(0, 0)); + setupCoordinates(root); + + //We get and cache the values of minX,minY,maxX and maxY + minX = nodeBranches.get(root).getLeftBranches(); + minY = 0; + maxX = nodeBranches.get(root).getRightBranches(); + + for (SkillTreeNode node : nodes.values()) { + if (node.getCoordinates().getY() > maxY) + maxY = node.getCoordinates().getY(); + } + + //Eventually we setup the coordinateNodesMap + super.setupCoordinatesNodesMap(); + + } + + /** + * Recursive algorithm to automatically calculate the integercoordinates each node should have to have a good display. + * It also fills the list pathToParents representing all the coordinates corresponding to a path between 2 nodes (for the GUI) + * + * @param node the root + */ + private void setupCoordinates(SkillTreeNode node) { + int childrenSize = node.getChildren().size(); + int x = node.getCoordinates().getX(); + ; + int y = node.getCoordinates().getY(); + ; + int leftOffset = 0; + int rightOffset = 0; + for (int i = 0; i < childrenSize; i++) { + SkillTreeNode child = node.getChildren().get(i); + + if (childrenSize % 2 == 0 && i == 0) { + child.setCoordinates(new IntegerCoordinates(x, y + 2)); + leftOffset += 2 + nodeBranches.get(child).getLeftBranches(); + rightOffset += 2 + nodeBranches.get(child).getRightBranches(); + } else if (i % 2 == 0) { + child.setCoordinates(new IntegerCoordinates(x - leftOffset - 2 - nodeBranches.get(child).getWidth(), y + 2)); + leftOffset += 2 + nodeBranches.get(child).getWidth(); + } else { + child.setCoordinates(new IntegerCoordinates(x + rightOffset + 2 + nodeBranches.get(child).getWidth(), y + 2)); + rightOffset += 2 + nodeBranches.get(child).getWidth(); + } + + //We setup the path to parent variable (Used for the GUI) + int childX = child.getCoordinates().getX(); + int childY = child.getCoordinates().getY(); + + int parentX = node.getParents().get(0).getCoordinates().getX(); + pathToParents.add(new IntegerCoordinates(childX, childY - 1)); + int offset = childX > parentX ? -1 : 1; + while (childX != parentX) { + pathToParents.add(new IntegerCoordinates(childX, childY - 2)); + childX += offset; + } + + + //We setup the coordinates for the associated child + setupCoordinates(child); + } + + } + + public Branches getBranches(SkillTreeNode node) { + return nodeBranches.get(node); + } + + /** + * Recursively sed to setup all the right and left branches of the node to later determine its coordinates for GUI display + */ + public void setupTreeWidth(SkillTreeNode node) { + int childrenSize = node.getChildren().size(); + int leftBranches = 0; + int rightBranches = 0; + for (int i = 0; i < childrenSize; i++) { + SkillTreeNode child = node.getChildren().get(i); + setupTreeWidth(child); + if (childrenSize % 2 == 0 && i == 0) { + + leftBranches += nodeBranches.get(child).getLeftBranches(); + rightBranches += nodeBranches.get(child).getRightBranches(); + } else if (i % 2 == 0) { + leftBranches += nodeBranches.get(child).getWidth() + 2; + } else { + rightBranches += nodeBranches.get(child).getWidth() + 2; + } + + } + } + + @Override + public boolean isPath(IntegerCoordinates coordinates) { + return pathToParents.contains(coordinates); + } + + + private class Branches { + private final int leftBranches, rightBranches; + + public Branches(int leftBranches, int rightBranches) { + this.leftBranches = leftBranches; + this.rightBranches = rightBranches; + } + + public int getLeftBranches() { + return leftBranches; + } + + public int getRightBranches() { + return rightBranches; + } + + public int getWidth() { + return leftBranches + rightBranches; + } + } +} + diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/CustomSkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/CustomSkillTree.java new file mode 100644 index 00000000..25beed35 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/CustomSkillTree.java @@ -0,0 +1,21 @@ +package net.Indyuce.mmocore.tree.skilltree; + +import net.Indyuce.mmocore.tree.IntegerCoordinates; +import org.bukkit.configuration.ConfigurationSection; +import org.jetbrains.annotations.NotNull; + +public class CustomSkillTree extends SkillTree{ + public CustomSkillTree(ConfigurationSection config) { + super(config); + } + + @Override + protected void whenPostLoaded(@NotNull ConfigurationSection configurationSection) { + + } + + @Override + public boolean isPath(IntegerCoordinates coordinates) { + return false; + } +} diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/LinkedSkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/LinkedSkillTree.java new file mode 100644 index 00000000..a6221fa7 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/LinkedSkillTree.java @@ -0,0 +1,64 @@ +package net.Indyuce.mmocore.tree.skilltree; + +import io.netty.handler.codec.http.cookie.CookieDecoder; +import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.SkillTreeNode; +import org.apache.commons.lang.Validate; +import org.bukkit.configuration.ConfigurationSection; +import org.jetbrains.annotations.NotNull; + +import java.util.Arrays; +import java.util.List; + +public class LinkedSkillTree extends SkillTree{ + + + public LinkedSkillTree(ConfigurationSection config) { + super(config); + + //We setup the coordinate map because coordinates are given in the yml for linked skill tree + setupCoordinatesNodesMap(); + } + + + + @Override + protected void whenPostLoaded(@NotNull ConfigurationSection configurationSection) { + + SkillTreeNode root=getNode(new IntegerCoordinates(0,0)); + Validate.notNull(root,"Their must be a node(the root of the tree) at the coordinates (0,0) "); + //We setup all the children and parent relations between the nodes + setupChildren(root); + } + + /** + * There is no paths on a linked skill tree + */ + @Override + public boolean isPath(IntegerCoordinates coordinates) { + return false; + } + + /** + * Recursive algorithm to setup the parents and children of each skillTreeNode + */ + public void setupChildren(SkillTreeNode node) { + int x=node.getCoordinates().getX(); + int y=node.getCoordinates().getY(); + List checkCoordinates= Arrays.asList(new IntegerCoordinates(x+1,y), + new IntegerCoordinates(x-1,y),new IntegerCoordinates(x,y+1),new IntegerCoordinates(x,y-1)); + for(IntegerCoordinates coor:checkCoordinates) { + //We add Parent and child only if the node exists and doesn't have a parent already + + if(isNode(coor)) { + SkillTreeNode child=getNode(coor); + if(child.getParents().size()==0) { + child.addParent(node); + node.addChild(child); + //We call recursively the algorithm + setupChildren(child); + }} + + } + } +} diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java new file mode 100644 index 00000000..1b15c8d8 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java @@ -0,0 +1,154 @@ +package net.Indyuce.mmocore.tree.skilltree; + +import io.lumine.mythic.lib.api.util.PostLoadObject; +import net.Indyuce.mmocore.api.util.MMOCoreUtils; +import net.Indyuce.mmocore.manager.registry.RegisterObject; +import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.NodeState; +import net.Indyuce.mmocore.tree.SkillTreeNode; +import org.apache.commons.lang.Validate; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.util.*; + +/** + * A passive skill tree that features nodes, or passive skills. + *

+ * The player can explore the passive skill tree using the right GUI + * and unlock nodes by spending passive skill points. Unlocking nodes + * grant permanent player modifiers, including + * - stats + * - active or passive MythicLib skills + * - active or passive MMOCore skills + * - extra attribute pts + * - particle or potion effects + * + * @author jules + * @author Ka0rX + * @see {@link SkillTreeNode} + */ +public abstract class SkillTree extends PostLoadObject implements RegisterObject { + private final String id, name; + private final Material guiMaterial; + //2 different maps to get the nodes + protected final Map coordinatesNodes = new HashMap<>(); + protected final Map nodes = new HashMap<>(); + //Caches the height of the skill tree + protected int minX, minY, maxX, maxY; + + public SkillTree(ConfigurationSection config) { + super(config); + this.id = Objects.requireNonNull(config.getString("id"), "Could not find skill tree id"); + this.name = Objects.requireNonNull(config.getString("name"), "Could not find skill tree name"); + this.guiMaterial = Material.valueOf(MMOCoreUtils.toEnumName(Objects.requireNonNull(config.getString("material")))); + Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find any nodes in the tree"); + for (String key : config.getConfigurationSection("nodes").getKeys(false)) { + SkillTreeNode node = new SkillTreeNode(this, config.getConfigurationSection("nodes." + key)); + } + } + + public void setupCoordinatesNodesMap() { + for (SkillTreeNode node : nodes.values()) { + coordinatesNodes.put(node.getCoordinates(), node); + } + } + + @Override + protected abstract void whenPostLoaded(@NotNull ConfigurationSection configurationSection); + + public int getMaxX() { + return maxX; + } + + public int getMinX() { + return minX; + } + + public int getMinY() { + return minY; + } + + public int getMaxY() { + return maxY; + } + + + public static SkillTree loadSkillTree(ConfigurationSection config) { + String string = config.getString("type"); + + Validate.isTrue(string.equals("automatic") || string.equals("linked") || string.equals("custom"), "You must precise the type of the skill tree in the yml!" + + "\nAllowed values: 'automatic','linked','custom'"); + SkillTree skillTree = null; + if (string.equals("automatic")) { + skillTree = new AutomaticSkillTree(config); + skillTree.postLoad(); + } + if (string.equals("linked")) { + skillTree = new LinkedSkillTree(config); + skillTree.postLoad(); + } + if (string.equals("custom")) { + skillTree = new CustomSkillTree(config); + skillTree.postLoad(); + } + + return skillTree; + } + + @Nullable + /** + * Returns null if it is not a node and returns the node type if it a node + */ + public boolean isNode(IntegerCoordinates coordinates) { + for (SkillTreeNode node : nodes.values()) { + if (node.getCoordinates().equals(coordinates)) + return true; + } + return false; + } + + public abstract boolean isPath(IntegerCoordinates coordinates); + + public Material getGuiMaterial() { + return guiMaterial; + } + + @Override + public String getId() { + return id; + } + + public String getName() { + return name; + } + + public Collection getNodes() { + return nodes.values(); + } + + @NotNull + public SkillTreeNode getNode(IntegerCoordinates coords) { + return Objects.requireNonNull(nodes.get(coords), "Could not find node in tree '" + id + "' with coordinates '" + coords.toString() + "'"); + } + + @NotNull + public SkillTreeNode getNode(String name) { + return Objects.requireNonNull(nodes.get(name), "Could not find node in tree '" + id + "' with name '" + name + "'"); + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + SkillTree skillTree = (SkillTree) o; + return id.equals(skillTree.id); + } + + @Override + public int hashCode() { + return Objects.hash(id); + } +} diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTreeType.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTreeType.java new file mode 100644 index 00000000..60914414 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTreeType.java @@ -0,0 +1,7 @@ +package net.Indyuce.mmocore.tree.skilltree; + +public enum SkillTreeType { + AUTOMATIC_SKILL_TREE(), + LINKED_SKILL_TREE, + CUSTOM_SKILL_TREE; +} diff --git a/src/main/resources/default/commands.yml b/src/main/resources/default/commands.yml index b6ddec29..781e5975 100644 --- a/src/main/resources/default/commands.yml +++ b/src/main/resources/default/commands.yml @@ -28,6 +28,9 @@ guild: withdraw: main: "withdraw" aliases: ["w"] +skill-tree: + main: "skilltree" + aliase: ["st"] deposit: main: "deposit" aliases: ["d"] \ No newline at end of file diff --git a/src/main/resources/default/gui/skill-tree.yml b/src/main/resources/default/gui/skill-tree.yml new file mode 100644 index 00000000..25c3af73 --- /dev/null +++ b/src/main/resources/default/gui/skill-tree.yml @@ -0,0 +1,25 @@ +# GUI display name +name: 'Current Skill Tree: &6{skill-tree-name}' + +# Number of slots in your inventory. Must be +# between 9 and 54 and must be a multiple of 9. +slots: 54 + +items: + skill-tree: + name: '{skill-tree-node}' + function: 'skill-tree' + slots: [9,18,27,36] + + next-tree-list-page: + function: 'next-tree-list-page' + material: 'ARROW' + slots: [ 45 ] + + previous-tree-list-page: + function: 'previous-tree-list-page' + material: "ARROW" + slots: [ 0 ] + + skill-tree-node: + function: 'skill-tree-node' diff --git a/src/main/resources/default/skilltree/combat.yml b/src/main/resources/default/skilltree/combat.yml new file mode 100644 index 00000000..19cceeb5 --- /dev/null +++ b/src/main/resources/default/skilltree/combat.yml @@ -0,0 +1,29 @@ +id: 'combat' +name: 'Combat Skill Tree' + + +#The type of the Skill tree, can be : +#'linked'->You must only precise nodes coordinates. 2 adjacent nodes will be affiliated. The root is at coordinates 0,0. +#'automatic'-> You must only precise the children(there can more than 1) of each node. Each node can only have one parent and the root has none. +# The display coordinates will be automatically calculated to have a good render. +#'custom'-> You must precise coordinates and children for each node, each node can have multiple parents and children. +# The coordinates are only used for display on the GUI but will not have any impact on the affiliation between nodes. + +type: 'linked' + +#The material that will represent the skill tree in the GUI +material: 'DIAMOND_SWORD' + +nodes: + strength: + name: 'Combat strength' + #Coordinates of the node + coordinates: + x: 0 + y: 0 + strength2: + name: 'Combat strength 2' + coordinates: + x: 1 + y: 0 + From 7fee8736edb08ebe696975439a798b78583c212b Mon Sep 17 00:00:00 2001 From: Guillaume Date: Sat, 11 Jun 2022 19:13:18 +0200 Subject: [PATCH 02/11] Skill Trees in MMOCore --- hs_err_pid12252.log | 536 ++++++++ hs_err_pid23924.log | 525 ++++++++ replay_pid12252.log | 1124 +++++++++++++++++ .../net/Indyuce/mmocore/api/SoundEvent.java | 5 +- .../mmocore/api/player/PlayerData.java | 145 ++- .../mmocore/api/util/MMOCoreUtils.java | 43 +- .../mmocore/command/CommandVerbose.java | 4 +- .../command/MMOCoreCommandTreeRoot.java | 1 + .../rpg/admin/AdminCommandTreeNode.java | 3 +- .../admin/SkillTreePointsCommandTreeNode.java | 88 ++ .../Indyuce/mmocore/gui/SkillTreeViewer.java | 312 +++-- .../mmocore/gui/api/item/InventoryItem.java | 15 +- .../mmocore/manager/ConfigManager.java | 3 + .../mmocore/manager/InventoryManager.java | 2 +- .../mmocore/manager/SkillTreeManager.java | 13 +- .../data/mysql/MySQLPlayerDataManager.java | 1 + .../data/yaml/YAMLPlayerDataManager.java | 48 +- .../manager/registry/MMOCoreRegister.java | 3 + .../net/Indyuce/mmocore/tree/NodeState.java | 3 +- .../net/Indyuce/mmocore/tree/ParentType.java | 5 + .../Indyuce/mmocore/tree/SkillTreeNode.java | 271 +++- .../tree/skilltree/AutomaticSkillTree.java | 89 +- .../tree/skilltree/CustomSkillTree.java | 32 +- .../tree/skilltree/LinkedSkillTree.java | 158 ++- .../mmocore/tree/skilltree/SkillTree.java | 158 ++- .../tree/skilltree/display/DisplayInfo.java | 55 + .../mmocore/tree/skilltree/display/Icon.java | 54 + .../Indyuce/mmocore/waypoint/Waypoint.java | 5 + src/main/resources/config.yml | 1 + .../default/expcurves/skill -tree-node.txt | 25 + src/main/resources/default/gui/skill-tree.yml | 16 +- src/main/resources/default/messages.yml | 11 +- .../resources/default/skilltree/combat.yml | 9 +- src/main/resources/default/sounds.yml | 4 + 34 files changed, 3458 insertions(+), 309 deletions(-) create mode 100644 hs_err_pid12252.log create mode 100644 hs_err_pid23924.log create mode 100644 replay_pid12252.log create mode 100644 src/main/java/net/Indyuce/mmocore/command/rpg/admin/SkillTreePointsCommandTreeNode.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/ParentType.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/skilltree/display/DisplayInfo.java create mode 100644 src/main/java/net/Indyuce/mmocore/tree/skilltree/display/Icon.java create mode 100644 src/main/resources/default/expcurves/skill -tree-node.txt diff --git a/hs_err_pid12252.log b/hs_err_pid12252.log new file mode 100644 index 00000000..fc278af1 --- /dev/null +++ b/hs_err_pid12252.log @@ -0,0 +1,536 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (mmap) failed to map 65536 bytes for Failed to commit metaspace. +# Possible reasons: +# The system is out of physical RAM or swap space +# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap +# Possible solutions: +# Reduce memory load on the system +# Increase physical memory or swap space +# Check if swap backing store is full +# Decrease Java heap size (-Xmx/-Xms) +# Decrease number of Java threads +# Decrease Java thread stack sizes (-Xss) +# Set larger code cache with -XX:ReservedCodeCacheSize= +# JVM is running with Unscaled Compressed Oops mode in which the Java heap is +# placed in the first 4GB address space. The Java Heap base address is the +# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress +# to set the Java Heap base and to place the Java Heap above 4GB virtual address. +# This output file may be truncated or incomplete. +# +# Out of Memory Error (virtualSpaceNode.cpp:110), pid=12252, tid=5504 +# +# JRE version: Java(TM) SE Runtime Environment (18.0.1+10) (build 18.0.1+10-24) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64) +# No core dump will be written. Minidumps are not enabled by default on client versions of Windows +# + +--------------- S U M M A R Y ------------ + +Command Line: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8 org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive + +Host: AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx , 8 cores, 5G, Windows 10 , 64 bit Build 19041 (10.0.19041.1706) +Time: Tue May 24 23:24:28 2022 Paris, Madrid (heure duild 19041 (10.0.19041.1706) elapsed time: 0.830927 seconds (0d 0h 0m 0s) + +--------------- T H R E A D --------------- + +Current thread (0x00000196db61cea0): JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=5504, stack(0x000000221d000000,0x000000221d100000)] + + +Current CompileTask: +C1: 831 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes) + +Stack: [0x000000221d000000,0x000000221d100000] +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x69887a] +V [jvm.dll+0x7f38bd] +V [jvm.dll+0x7f51ce] +V [jvm.dll+0x7f5883] +V [jvm.dll+0x25ca3f] +V [jvm.dll+0x7ef5cb] +V [jvm.dll+0x63ea76] +V [jvm.dll+0x63eada] +V [jvm.dll+0x64135e] +V [jvm.dll+0x64121e] +V [jvm.dll+0x63f43e] +V [jvm.dll+0x650d9a] +V [jvm.dll+0x649c8a] +V [jvm.dll+0x1e4700] +V [jvm.dll+0x1e48e6] +V [jvm.dll+0x1485de] +V [jvm.dll+0x148926] +V [jvm.dll+0x147d9a] +V [jvm.dll+0x149a81] +V [jvm.dll+0x23e8ca] +V [jvm.dll+0x23cbb5] +V [jvm.dll+0x7a5fb1] +V [jvm.dll+0x7a03ea] +V [jvm.dll+0x697725] +C [ucrtbase.dll+0x21bb2] +C [KERNEL32.DLL+0x17034] +C [ntdll.dll+0x52651] + + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x00000196df8513a0, length=12, elements={ +0x00000196be777660, 0x00000196db5e6ac0, 0x00000196db5e7720, 0x00000196db603f40, +0x00000196db6058f0, 0x00000196db606290, 0x00000196db606d70, 0x00000196db608b90, +0x00000196db61cea0, 0x00000196db6333c0, 0x00000196df884700, 0x00000196df8888a0 +} + +Java Threads: ( => current thread ) + 0x00000196be777660 JavaThread "main" [_thread_in_vm, id=16080, stack(0x000000221c200000,0x000000221c300000)] + 0x00000196db5e6ac0 JavaThread "Reference Handler" daemon [_thread_blocked, id=3240, stack(0x000000221c900000,0x000000221ca00000)] + 0x00000196db5e7720 JavaThread "Finalizer" daemon [_thread_blocked, id=31388, stack(0x000000221ca00000,0x000000221cb00000)] + 0x00000196db603f40 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=27972, stack(0x000000221cb00000,0x000000221cc00000)] + 0x00000196db6058f0 JavaThread "Attach Listener" daemon [_thread_blocked, id=29668, stack(0x000000221cc00000,0x000000221cd00000)] + 0x00000196db606290 JavaThread "Service Thread" daemon [_thread_blocked, id=28240, stack(0x000000221cd00000,0x000000221ce00000)] + 0x00000196db606d70 JavaThread "Monitor Deflation Thread" daemon [_thread_blocked, id=1896, stack(0x000000221ce00000,0x000000221cf00000)] + 0x00000196db608b90 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=27540, stack(0x000000221cf00000,0x000000221d000000)] +=>0x00000196db61cea0 JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=5504, stack(0x000000221d000000,0x000000221d100000)] + 0x00000196db6333c0 JavaThread "Sweeper thread" daemon [_thread_blocked, id=25016, stack(0x000000221d100000,0x000000221d200000)] + 0x00000196df884700 JavaThread "Notification Thread" daemon [_thread_blocked, id=36124, stack(0x000000221d200000,0x000000221d300000)] + 0x00000196df8888a0 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=20016, stack(0x000000221d400000,0x000000221d500000)] + +Other Threads: + 0x00000196be7eab00 VMThread "VM Thread" [stack: 0x000000221c800000,0x000000221c900000] [id=8764] + 0x00000196df887a00 WatcherThread "VM Periodic Task Thread" [stack: 0x000000221d300000,0x000000221d400000] [id=36084] + 0x00000196be7c7f90 WorkerThread "GC Thread#0" [stack: 0x000000221c300000,0x000000221c400000] [id=33236] + 0x00000196be7d5d20 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000221c400000,0x000000221c500000] [id=9264] + 0x00000196be7d6eb0 WorkerThread "G1 Conc#0" [stack: 0x000000221c500000,0x000000221c600000] [id=9172] + 0x00000196be81e530 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000221c600000,0x000000221c700000] [id=25384] + 0x00000196be81ee40 ConcurrentGCThread "G1 Service" [stack: 0x000000221c700000,0x000000221c800000] [id=22176] + +Threads with active compile tasks: +C1 CompilerThread0 969 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes) + +VM state: not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x00000196be771460] Metaspace_lock - owner thread: 0x00000196db61cea0 +[0x00000196be773730] MethodData_lock - owner thread: 0x00000196db61cea0 + +Heap address: 0x00000000a1400000, size: 1516 MB, Compressed Oops mode: 32-bit + +CDS archive(s) mapped at: [0x0000000800000000-0x0000000800ba0000-0x0000000800ba0000), size 12189696, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0. +Compressed class space mapped at: 0x0000000800c00000-0x0000000840c00000, reserved size: 1073741824 +Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x100000000 + +GC Precious Log: + CardTable entry size: 512 + Card Set container configuration: InlinePtr #cards 5 size 8 Array Of Cards #cards 12 size 40 Howl #buckets 4 coarsen threshold 1843 Howl Bitmap #cards 512 size 80 coarsen threshold 460 Card regions per heap region 1 cards per card region 2048 + CPUs: 8 total, 8 available + Memory: 6061M + Large Page Support: Disabled + NUMA Support: Disabled + Compressed Oops: Enabled (32-bit) + Heap Region Size: 1M + Heap Min Capacity: 8M + Heap Initial Capacity: 96M + Heap Max Capacity: 1516M + Pre-touch: Disabled + Parallel Workers: 8 + Concurrent Workers: 2 + Concurrent Refinement Workers: 8 + Periodic GC: Disabled + +Heap: + garbage-first heap total 98304K, used 5120K [0x00000000a1400000, 0x0000000100000000) + region size 1024K, 7 young (7168K), 0 survivors (0K) + Metaspace used 2358K, committed 2496K, reserved 1114112K + class space used 212K, committed 320K, reserved 1048576K + +Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next) +| 0|0x00000000a1400000, 0x00000000a1400000, 0x00000000a1500000| 0%| F| |TAMS 0x00000000a1400000, 0x00000000a1400000| Untracked +| 1|0x00000000a1500000, 0x00000000a1500000, 0x00000000a1600000| 0%| F| |TAMS 0x00000000a1500000, 0x00000000a1500000| Untracked +| 2|0x00000000a1600000, 0x00000000a1600000, 0x00000000a1700000| 0%| F| |TAMS 0x00000000a1600000, 0x00000000a1600000| Untracked +| 3|0x00000000a1700000, 0x00000000a1700000, 0x00000000a1800000| 0%| F| |TAMS 0x00000000a1700000, 0x00000000a1700000| Untracked +| 4|0x00000000a1800000, 0x00000000a1800000, 0x00000000a1900000| 0%| F| |TAMS 0x00000000a1800000, 0x00000000a1800000| Untracked +| 5|0x00000000a1900000, 0x00000000a1900000, 0x00000000a1a00000| 0%| F| |TAMS 0x00000000a1900000, 0x00000000a1900000| Untracked +| 6|0x00000000a1a00000, 0x00000000a1a00000, 0x00000000a1b00000| 0%| F| |TAMS 0x00000000a1a00000, 0x00000000a1a00000| Untracked +| 7|0x00000000a1b00000, 0x00000000a1b00000, 0x00000000a1c00000| 0%| F| |TAMS 0x00000000a1b00000, 0x00000000a1b00000| Untracked +| 8|0x00000000a1c00000, 0x00000000a1c00000, 0x00000000a1d00000| 0%| F| |TAMS 0x00000000a1c00000, 0x00000000a1c00000| Untracked +| 9|0x00000000a1d00000, 0x00000000a1d00000, 0x00000000a1e00000| 0%| F| |TAMS 0x00000000a1d00000, 0x00000000a1d00000| Untracked +| 10|0x00000000a1e00000, 0x00000000a1e00000, 0x00000000a1f00000| 0%| F| |TAMS 0x00000000a1e00000, 0x00000000a1e00000| Untracked +| 11|0x00000000a1f00000, 0x00000000a1f00000, 0x00000000a2000000| 0%| F| |TAMS 0x00000000a1f00000, 0x00000000a1f00000| Untracked +| 12|0x00000000a2000000, 0x00000000a2000000, 0x00000000a2100000| 0%| F| |TAMS 0x00000000a2000000, 0x00000000a2000000| Untracked +| 13|0x00000000a2100000, 0x00000000a2100000, 0x00000000a2200000| 0%| F| |TAMS 0x00000000a2100000, 0x00000000a2100000| Untracked +| 14|0x00000000a2200000, 0x00000000a2200000, 0x00000000a2300000| 0%| F| |TAMS 0x00000000a2200000, 0x00000000a2200000| Untracked +| 15|0x00000000a2300000, 0x00000000a2300000, 0x00000000a2400000| 0%| F| |TAMS 0x00000000a2300000, 0x00000000a2300000| Untracked +| 16|0x00000000a2400000, 0x00000000a2400000, 0x00000000a2500000| 0%| F| |TAMS 0x00000000a2400000, 0x00000000a2400000| Untracked +| 17|0x00000000a2500000, 0x00000000a2500000, 0x00000000a2600000| 0%| F| |TAMS 0x00000000a2500000, 0x00000000a2500000| Untracked +| 18|0x00000000a2600000, 0x00000000a2600000, 0x00000000a2700000| 0%| F| |TAMS 0x00000000a2600000, 0x00000000a2600000| Untracked +| 19|0x00000000a2700000, 0x00000000a2700000, 0x00000000a2800000| 0%| F| |TAMS 0x00000000a2700000, 0x00000000a2700000| Untracked +| 20|0x00000000a2800000, 0x00000000a2800000, 0x00000000a2900000| 0%| F| |TAMS 0x00000000a2800000, 0x00000000a2800000| Untracked +| 21|0x00000000a2900000, 0x00000000a2900000, 0x00000000a2a00000| 0%| F| |TAMS 0x00000000a2900000, 0x00000000a2900000| Untracked +| 22|0x00000000a2a00000, 0x00000000a2a00000, 0x00000000a2b00000| 0%| F| |TAMS 0x00000000a2a00000, 0x00000000a2a00000| Untracked +| 23|0x00000000a2b00000, 0x00000000a2b00000, 0x00000000a2c00000| 0%| F| |TAMS 0x00000000a2b00000, 0x00000000a2b00000| Untracked +| 24|0x00000000a2c00000, 0x00000000a2c00000, 0x00000000a2d00000| 0%| F| |TAMS 0x00000000a2c00000, 0x00000000a2c00000| Untracked +| 25|0x00000000a2d00000, 0x00000000a2d00000, 0x00000000a2e00000| 0%| F| |TAMS 0x00000000a2d00000, 0x00000000a2d00000| Untracked +| 26|0x00000000a2e00000, 0x00000000a2e00000, 0x00000000a2f00000| 0%| F| |TAMS 0x00000000a2e00000, 0x00000000a2e00000| Untracked +| 27|0x00000000a2f00000, 0x00000000a2f00000, 0x00000000a3000000| 0%| F| |TAMS 0x00000000a2f00000, 0x00000000a2f00000| Untracked +| 28|0x00000000a3000000, 0x00000000a3000000, 0x00000000a3100000| 0%| F| |TAMS 0x00000000a3000000, 0x00000000a3000000| Untracked +| 29|0x00000000a3100000, 0x00000000a3100000, 0x00000000a3200000| 0%| F| |TAMS 0x00000000a3100000, 0x00000000a3100000| Untracked +| 30|0x00000000a3200000, 0x00000000a3200000, 0x00000000a3300000| 0%| F| |TAMS 0x00000000a3200000, 0x00000000a3200000| Untracked +| 31|0x00000000a3300000, 0x00000000a3300000, 0x00000000a3400000| 0%| F| |TAMS 0x00000000a3300000, 0x00000000a3300000| Untracked +| 32|0x00000000a3400000, 0x00000000a3400000, 0x00000000a3500000| 0%| F| |TAMS 0x00000000a3400000, 0x00000000a3400000| Untracked +| 33|0x00000000a3500000, 0x00000000a3500000, 0x00000000a3600000| 0%| F| |TAMS 0x00000000a3500000, 0x00000000a3500000| Untracked +| 34|0x00000000a3600000, 0x00000000a3600000, 0x00000000a3700000| 0%| F| |TAMS 0x00000000a3600000, 0x00000000a3600000| Untracked +| 35|0x00000000a3700000, 0x00000000a3700000, 0x00000000a3800000| 0%| F| |TAMS 0x00000000a3700000, 0x00000000a3700000| Untracked +| 36|0x00000000a3800000, 0x00000000a3800000, 0x00000000a3900000| 0%| F| |TAMS 0x00000000a3800000, 0x00000000a3800000| Untracked +| 37|0x00000000a3900000, 0x00000000a3900000, 0x00000000a3a00000| 0%| F| |TAMS 0x00000000a3900000, 0x00000000a3900000| Untracked +| 38|0x00000000a3a00000, 0x00000000a3a00000, 0x00000000a3b00000| 0%| F| |TAMS 0x00000000a3a00000, 0x00000000a3a00000| Untracked +| 39|0x00000000a3b00000, 0x00000000a3b00000, 0x00000000a3c00000| 0%| F| |TAMS 0x00000000a3b00000, 0x00000000a3b00000| Untracked +| 40|0x00000000a3c00000, 0x00000000a3c00000, 0x00000000a3d00000| 0%| F| |TAMS 0x00000000a3c00000, 0x00000000a3c00000| Untracked +| 41|0x00000000a3d00000, 0x00000000a3d00000, 0x00000000a3e00000| 0%| F| |TAMS 0x00000000a3d00000, 0x00000000a3d00000| Untracked +| 42|0x00000000a3e00000, 0x00000000a3e00000, 0x00000000a3f00000| 0%| F| |TAMS 0x00000000a3e00000, 0x00000000a3e00000| Untracked +| 43|0x00000000a3f00000, 0x00000000a3f00000, 0x00000000a4000000| 0%| F| |TAMS 0x00000000a3f00000, 0x00000000a3f00000| Untracked +| 44|0x00000000a4000000, 0x00000000a4000000, 0x00000000a4100000| 0%| F| |TAMS 0x00000000a4000000, 0x00000000a4000000| Untracked +| 45|0x00000000a4100000, 0x00000000a4100000, 0x00000000a4200000| 0%| F| |TAMS 0x00000000a4100000, 0x00000000a4100000| Untracked +| 46|0x00000000a4200000, 0x00000000a4200000, 0x00000000a4300000| 0%| F| |TAMS 0x00000000a4200000, 0x00000000a4200000| Untracked +| 47|0x00000000a4300000, 0x00000000a4300000, 0x00000000a4400000| 0%| F| |TAMS 0x00000000a4300000, 0x00000000a4300000| Untracked +| 48|0x00000000a4400000, 0x00000000a4400000, 0x00000000a4500000| 0%| F| |TAMS 0x00000000a4400000, 0x00000000a4400000| Untracked +| 49|0x00000000a4500000, 0x00000000a4500000, 0x00000000a4600000| 0%| F| |TAMS 0x00000000a4500000, 0x00000000a4500000| Untracked +| 50|0x00000000a4600000, 0x00000000a4600000, 0x00000000a4700000| 0%| F| |TAMS 0x00000000a4600000, 0x00000000a4600000| Untracked +| 51|0x00000000a4700000, 0x00000000a4700000, 0x00000000a4800000| 0%| F| |TAMS 0x00000000a4700000, 0x00000000a4700000| Untracked +| 52|0x00000000a4800000, 0x00000000a4800000, 0x00000000a4900000| 0%| F| |TAMS 0x00000000a4800000, 0x00000000a4800000| Untracked +| 53|0x00000000a4900000, 0x00000000a4900000, 0x00000000a4a00000| 0%| F| |TAMS 0x00000000a4900000, 0x00000000a4900000| Untracked +| 54|0x00000000a4a00000, 0x00000000a4a00000, 0x00000000a4b00000| 0%| F| |TAMS 0x00000000a4a00000, 0x00000000a4a00000| Untracked +| 55|0x00000000a4b00000, 0x00000000a4b00000, 0x00000000a4c00000| 0%| F| |TAMS 0x00000000a4b00000, 0x00000000a4b00000| Untracked +| 56|0x00000000a4c00000, 0x00000000a4c00000, 0x00000000a4d00000| 0%| F| |TAMS 0x00000000a4c00000, 0x00000000a4c00000| Untracked +| 57|0x00000000a4d00000, 0x00000000a4d00000, 0x00000000a4e00000| 0%| F| |TAMS 0x00000000a4d00000, 0x00000000a4d00000| Untracked +| 58|0x00000000a4e00000, 0x00000000a4e00000, 0x00000000a4f00000| 0%| F| |TAMS 0x00000000a4e00000, 0x00000000a4e00000| Untracked +| 59|0x00000000a4f00000, 0x00000000a4f00000, 0x00000000a5000000| 0%| F| |TAMS 0x00000000a4f00000, 0x00000000a4f00000| Untracked +| 60|0x00000000a5000000, 0x00000000a5000000, 0x00000000a5100000| 0%| F| |TAMS 0x00000000a5000000, 0x00000000a5000000| Untracked +| 61|0x00000000a5100000, 0x00000000a5100000, 0x00000000a5200000| 0%| F| |TAMS 0x00000000a5100000, 0x00000000a5100000| Untracked +| 62|0x00000000a5200000, 0x00000000a5200000, 0x00000000a5300000| 0%| F| |TAMS 0x00000000a5200000, 0x00000000a5200000| Untracked +| 63|0x00000000a5300000, 0x00000000a5300000, 0x00000000a5400000| 0%| F| |TAMS 0x00000000a5300000, 0x00000000a5300000| Untracked +| 64|0x00000000a5400000, 0x00000000a5400000, 0x00000000a5500000| 0%| F| |TAMS 0x00000000a5400000, 0x00000000a5400000| Untracked +| 65|0x00000000a5500000, 0x00000000a5500000, 0x00000000a5600000| 0%| F| |TAMS 0x00000000a5500000, 0x00000000a5500000| Untracked +| 66|0x00000000a5600000, 0x00000000a5600000, 0x00000000a5700000| 0%| F| |TAMS 0x00000000a5600000, 0x00000000a5600000| Untracked +| 67|0x00000000a5700000, 0x00000000a5700000, 0x00000000a5800000| 0%| F| |TAMS 0x00000000a5700000, 0x00000000a5700000| Untracked +| 68|0x00000000a5800000, 0x00000000a5800000, 0x00000000a5900000| 0%| F| |TAMS 0x00000000a5800000, 0x00000000a5800000| Untracked +| 69|0x00000000a5900000, 0x00000000a5900000, 0x00000000a5a00000| 0%| F| |TAMS 0x00000000a5900000, 0x00000000a5900000| Untracked +| 70|0x00000000a5a00000, 0x00000000a5a00000, 0x00000000a5b00000| 0%| F| |TAMS 0x00000000a5a00000, 0x00000000a5a00000| Untracked +| 71|0x00000000a5b00000, 0x00000000a5b00000, 0x00000000a5c00000| 0%| F| |TAMS 0x00000000a5b00000, 0x00000000a5b00000| Untracked +| 72|0x00000000a5c00000, 0x00000000a5c00000, 0x00000000a5d00000| 0%| F| |TAMS 0x00000000a5c00000, 0x00000000a5c00000| Untracked +| 73|0x00000000a5d00000, 0x00000000a5d00000, 0x00000000a5e00000| 0%| F| |TAMS 0x00000000a5d00000, 0x00000000a5d00000| Untracked +| 74|0x00000000a5e00000, 0x00000000a5e00000, 0x00000000a5f00000| 0%| F| |TAMS 0x00000000a5e00000, 0x00000000a5e00000| Untracked +| 75|0x00000000a5f00000, 0x00000000a5f00000, 0x00000000a6000000| 0%| F| |TAMS 0x00000000a5f00000, 0x00000000a5f00000| Untracked +| 76|0x00000000a6000000, 0x00000000a6000000, 0x00000000a6100000| 0%| F| |TAMS 0x00000000a6000000, 0x00000000a6000000| Untracked +| 77|0x00000000a6100000, 0x00000000a6100000, 0x00000000a6200000| 0%| F| |TAMS 0x00000000a6100000, 0x00000000a6100000| Untracked +| 78|0x00000000a6200000, 0x00000000a6200000, 0x00000000a6300000| 0%| F| |TAMS 0x00000000a6200000, 0x00000000a6200000| Untracked +| 79|0x00000000a6300000, 0x00000000a6300000, 0x00000000a6400000| 0%| F| |TAMS 0x00000000a6300000, 0x00000000a6300000| Untracked +| 80|0x00000000a6400000, 0x00000000a6400000, 0x00000000a6500000| 0%| F| |TAMS 0x00000000a6400000, 0x00000000a6400000| Untracked +| 81|0x00000000a6500000, 0x00000000a6500000, 0x00000000a6600000| 0%| F| |TAMS 0x00000000a6500000, 0x00000000a6500000| Untracked +| 82|0x00000000a6600000, 0x00000000a6600000, 0x00000000a6700000| 0%| F| |TAMS 0x00000000a6600000, 0x00000000a6600000| Untracked +| 83|0x00000000a6700000, 0x00000000a6700000, 0x00000000a6800000| 0%| F| |TAMS 0x00000000a6700000, 0x00000000a6700000| Untracked +| 84|0x00000000a6800000, 0x00000000a6800000, 0x00000000a6900000| 0%| F| |TAMS 0x00000000a6800000, 0x00000000a6800000| Untracked +| 85|0x00000000a6900000, 0x00000000a6900000, 0x00000000a6a00000| 0%| F| |TAMS 0x00000000a6900000, 0x00000000a6900000| Untracked +| 86|0x00000000a6a00000, 0x00000000a6a00000, 0x00000000a6b00000| 0%| F| |TAMS 0x00000000a6a00000, 0x00000000a6a00000| Untracked +| 87|0x00000000a6b00000, 0x00000000a6b00000, 0x00000000a6c00000| 0%| F| |TAMS 0x00000000a6b00000, 0x00000000a6b00000| Untracked +| 88|0x00000000a6c00000, 0x00000000a6c00000, 0x00000000a6d00000| 0%| F| |TAMS 0x00000000a6c00000, 0x00000000a6c00000| Untracked +| 89|0x00000000a6d00000, 0x00000000a6d76700, 0x00000000a6e00000| 46%| E| |TAMS 0x00000000a6d00000, 0x00000000a6d00000| Complete +| 90|0x00000000a6e00000, 0x00000000a6f00000, 0x00000000a6f00000|100%| E|CS|TAMS 0x00000000a6e00000, 0x00000000a6e00000| Complete +| 91|0x00000000a6f00000, 0x00000000a7000000, 0x00000000a7000000|100%| E|CS|TAMS 0x00000000a6f00000, 0x00000000a6f00000| Complete +| 92|0x00000000a7000000, 0x00000000a7100000, 0x00000000a7100000|100%| E| |TAMS 0x00000000a7000000, 0x00000000a7000000| Complete +| 93|0x00000000a7100000, 0x00000000a7200000, 0x00000000a7200000|100%| E|CS|TAMS 0x00000000a7100000, 0x00000000a7100000| Complete +| 94|0x00000000a7200000, 0x00000000a7300000, 0x00000000a7300000|100%| E|CS|TAMS 0x00000000a7200000, 0x00000000a7200000| Complete +| 95|0x00000000a7300000, 0x00000000a7400000, 0x00000000a7400000|100%| E|CS|TAMS 0x00000000a7300000, 0x00000000a7300000| Complete + +Card table byte_map: [0x00000196d56e0000,0x00000196d59e0000] _byte_map_base: 0x00000196d51d6000 + +Marking Bits (Prev, Next): (CMBitMap*) 0x00000196be7c95a0, (CMBitMap*) 0x00000196be7c95e0 + Prev Bits: [0x00000196d5ce0000, 0x00000196d7490000) + Next Bits: [0x00000196d7490000, 0x00000196d8c40000) + +Polling page: 0x00000196bc8d0000 + +Metaspace: + +Usage: + Non-class: 2.10 MB used. + Class: 212.52 KB used. + Both: 2.30 MB used. + +Virtual space: + Non-class space: 64.00 MB reserved, 2.12 MB ( 3%) committed, 1 nodes. + Class space: 1.00 GB reserved, 320.00 KB ( <1%) committed, 1 nodes. + Both: 1.06 GB reserved, 2.44 MB ( <1%) committed. + +Chunk freelists: + Non-Class: 3.25 MB + Class: 3.66 MB + Both: 6.91 MB + +MaxMetaspaceSize: unlimited +CompressedClassSpaceSize: 1.00 GB +Initial GC threshold: 21.00 MB +Current GC threshold: 21.00 MB +CDS: on +MetaspaceReclaimPolicy: balanced + - commit_granule_bytes: 65536. + - commit_granule_words: 8192. + - virtual_space_node_default_size: 8388608. + - enlarge_chunks_in_place: 1. + - new_chunks_are_fully_committed: 0. + - uncommit_free_chunks: 1. + - use_allocation_guard: 0. + + +Internal statistics: + +num_allocs_failed_limit: 0. +num_arena_births: 32. +num_arena_deaths: 0. +num_vsnodes_births: 2. +num_vsnodes_deaths: 0. +num_space_committed: 39. +num_space_uncommitted: 0. +num_chunks_returned_to_freelist: 0. +num_chunks_taken_from_freelist: 74. +num_chunk_merges: 0. +num_chunk_splits: 50. +num_chunks_enlarged: 39. +num_inconsistent_stats: 0. + +CodeHeap 'non-profiled nmethods': size=120000Kb used=153Kb max_used=153Kb free=119846Kb + bounds [0x00000196cdb80000, 0x00000196cddf0000, 0x00000196d50b0000] +CodeHeap 'profiled nmethods': size=120000Kb used=883Kb max_used=883Kb free=119116Kb + bounds [0x00000196c6650000, 0x00000196c68c0000, 0x00000196cdb80000] +CodeHeap 'non-nmethods': size=5760Kb used=1140Kb max_used=1155Kb free=4619Kb + bounds [0x00000196c60b0000, 0x00000196c6320000, 0x00000196c6650000] + total_blobs=957 nmethods=544 adapters=326 + compilation: enabled + stopped_count=0, restarted_count=0 + full_count=0 + +Compilation events (20 events): +Event: 0.809 Thread 0x00000196db61cea0 534 3 java.lang.String::indexOf (18 bytes) +Event: 0.809 Thread 0x00000196db61cea0 nmethod 534 0x00000196c6729c90 code [0x00000196c6729e60, 0x00000196c672a128] +Event: 0.810 Thread 0x00000196db61cea0 535 3 java.lang.String::indexOf (113 bytes) +Event: 0.810 Thread 0x00000196db61cea0 nmethod 535 0x00000196c672a290 code [0x00000196c672a4c0, 0x00000196c672aae8] +Event: 0.811 Thread 0x00000196db61cea0 536 3 java.net.URL:: (8 bytes) +Event: 0.811 Thread 0x00000196db61cea0 nmethod 536 0x00000196c672ac90 code [0x00000196c672ae40, 0x00000196c672af88] +Event: 0.812 Thread 0x00000196db608b90 537 % 4 java.lang.StringLatin1::indexOf @ 30 (121 bytes) +Event: 0.816 Thread 0x00000196db61cea0 539 3 jdk.internal.jimage.BasicImageReader::getLocationIndex (52 bytes) +Event: 0.817 Thread 0x00000196db61cea0 nmethod 539 0x00000196c672b010 code [0x00000196c672b200, 0x00000196c672b698] +Event: 0.819 Thread 0x00000196db61cea0 541 3 java.util.ArrayList$Itr::next (66 bytes) +Event: 0.820 Thread 0x00000196db61cea0 nmethod 541 0x00000196c672b910 code [0x00000196c672bb00, 0x00000196c672bec8] +Event: 0.820 Thread 0x00000196db61cea0 542 3 java.util.ArrayList$Itr::checkForComodification (23 bytes) +Event: 0.820 Thread 0x00000196db61cea0 nmethod 542 0x00000196c672c090 code [0x00000196c672c240, 0x00000196c672c408] +Event: 0.820 Thread 0x00000196db61cea0 543 3 java.lang.Character::getType (9 bytes) +Event: 0.820 Thread 0x00000196db61cea0 nmethod 543 0x00000196c672c510 code [0x00000196c672c6c0, 0x00000196c672c8b8] +Event: 0.820 Thread 0x00000196db61cea0 544 3 java.lang.CharacterDataLatin1::getType (11 bytes) +Event: 0.820 Thread 0x00000196db61cea0 nmethod 544 0x00000196c672c990 code [0x00000196c672cb40, 0x00000196c672ccf8] +Event: 0.824 Thread 0x00000196db61cea0 545 3 jdk.internal.loader.ClassLoaders$AppClassLoader::loadClass (40 bytes) +Event: 0.825 Thread 0x00000196db608b90 nmethod 537% 0x00000196cdba5610 code [0x00000196cdba57a0, 0x00000196cdba5b18] +Event: 0.825 Thread 0x00000196db608b90 540 4 java.nio.Buffer::scope (17 bytes) + +GC Heap History (0 events): +No events + +Deoptimization events (4 events): +Event: 0.300 Thread 0x00000196be777660 Uncommon trap: trap_request=0xffffff45 fr.pc=0x00000196cdb8b264 relative=0x0000000000000064 +Event: 0.300 Thread 0x00000196be777660 Uncommon trap: reason=unstable_if action=reinterpret pc=0x00000196cdb8b264 method=java.io.WinNTFileSystem.isSlash(C)Z @ 9 c2 +Event: 0.300 Thread 0x00000196be777660 DEOPT PACKING pc=0x00000196cdb8b264 sp=0x000000221c2fe330 +Event: 0.300 Thread 0x00000196be777660 DEOPT UNPACKING pc=0x00000196c61023a3 sp=0x000000221c2fe2b8 mode 2 + +Classes loaded (20 events): +Event: 0.776 Loading class sun/net/ProgressMeteringPolicy +Event: 0.776 Loading class sun/net/ProgressMeteringPolicy done +Event: 0.776 Loading class sun/net/DefaultProgressMeteringPolicy done +Event: 0.782 Loading class java/lang/IllegalAccessException +Event: 0.782 Loading class java/lang/IllegalAccessException done +Event: 0.783 Loading class java/lang/InstantiationException +Event: 0.783 Loading class java/lang/InstantiationException done +Event: 0.792 Loading class java/io/StringWriter +Event: 0.792 Loading class java/io/StringWriter done +Event: 0.793 Loading class java/io/StringReader +Event: 0.793 Loading class java/io/StringReader done +Event: 0.797 Loading class java/lang/AssertionError +Event: 0.797 Loading class java/lang/AssertionError done +Event: 0.805 Loading class java/lang/StringIndexOutOfBoundsException +Event: 0.805 Loading class java/lang/IndexOutOfBoundsException +Event: 0.805 Loading class java/lang/IndexOutOfBoundsException done +Event: 0.805 Loading class java/lang/StringIndexOutOfBoundsException done +Event: 0.818 Loading class jdk/internal/misc/ScopedMemoryAccess$Scope +Event: 0.818 Loading class jdk/internal/misc/ScopedMemoryAccess$Scope done +Event: 0.824 Loading class java/io/FileReader + +Classes unloaded (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (3 events): +Event: 0.332 Thread 0x00000196be777660 Exception (0x00000000a704d590) +thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766] +Event: 0.468 Thread 0x00000196be777660 Exception (0x00000000a6f51a28) +thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766] +Event: 0.601 Thread 0x00000196be777660 Exception (0x00000000a6f9a260) +thrown [s\open\src\hotspot\share\interpreter\linkResolver.cpp, line 766] + +VM Operations (12 events): +Event: 0.116 Executing VM operation: HandshakeAllThreads +Event: 0.116 Executing VM operation: HandshakeAllThreads done +Event: 0.363 Executing VM operation: HandshakeAllThreads +Event: 0.363 Executing VM operation: HandshakeAllThreads done +Event: 0.500 Executing VM operation: HandshakeAllThreads +Event: 0.500 Executing VM operation: HandshakeAllThreads done +Event: 0.612 Executing VM operation: HandshakeAllThreads +Event: 0.612 Executing VM operation: HandshakeAllThreads done +Event: 0.659 Executing VM operation: HandshakeAllThreads +Event: 0.659 Executing VM operation: HandshakeAllThreads done +Event: 0.773 Executing VM operation: HandshakeAllThreads +Event: 0.774 Executing VM operation: HandshakeAllThreads done + +Events (20 events): +Event: 0.030 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll +Event: 0.031 Thread 0x00000196be777660 Thread added: 0x00000196be777660 +Event: 0.035 Thread 0x00000196db5e6ac0 Thread added: 0x00000196db5e6ac0 +Event: 0.035 Thread 0x00000196db5e7720 Thread added: 0x00000196db5e7720 +Event: 0.056 Thread 0x00000196db603f40 Thread added: 0x00000196db603f40 +Event: 0.056 Thread 0x00000196db6058f0 Thread added: 0x00000196db6058f0 +Event: 0.056 Thread 0x00000196db606290 Thread added: 0x00000196db606290 +Event: 0.056 Thread 0x00000196db606d70 Thread added: 0x00000196db606d70 +Event: 0.057 Thread 0x00000196db608b90 Thread added: 0x00000196db608b90 +Event: 0.057 Thread 0x00000196db61cea0 Thread added: 0x00000196db61cea0 +Event: 0.057 Thread 0x00000196db6333c0 Thread added: 0x00000196db6333c0 +Event: 0.086 Thread 0x00000196df884700 Thread added: 0x00000196df884700 +Event: 0.094 Thread 0x00000196df8888a0 Thread added: 0x00000196df8888a0 +Event: 0.102 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\net.dll +Event: 0.107 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\nio.dll +Event: 0.115 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\zip.dll +Event: 0.368 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\verify.dll +Event: 0.399 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll +Event: 0.653 Loaded shared library C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-2708375098780757364.dll +Event: 0.690 Loaded shared library C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-3176157090017154440.dll + + +Dynamic libraries: +0x00007ff7a7750000 - 0x00007ff7a7760000 C:\Program Files\Java\jdk-18.0.1\bin\java.exe +0x00007ffbfbb50000 - 0x00007ffbfbd45000 C:\WINDOWS\SYSTEM32\ntdll.dll +0x00007ffbd8b00000 - 0x00007ffbd8b16000 C:\Program Files\Avast Software\Avast\aswhook.dll +0x00007ffbf9ba0000 - 0x00007ffbf9c5d000 C:\WINDOWS\System32\KERNEL32.DLL +0x00007ffbf97d0000 - 0x00007ffbf9a9d000 C:\WINDOWS\System32\KERNELBASE.dll +0x00007ffbf9aa0000 - 0x00007ffbf9ba0000 C:\WINDOWS\System32\ucrtbase.dll +0x00007ffbf2cb0000 - 0x00007ffbf2cc8000 C:\Program Files\Java\jdk-18.0.1\bin\jli.dll +0x00007ffbec2b0000 - 0x00007ffbec2ca000 C:\Program Files\Java\jdk-18.0.1\bin\VCRUNTIME140.dll +0x00007ffbfb5f0000 - 0x00007ffbfb69e000 C:\WINDOWS\System32\ADVAPI32.dll +0x00007ffbf9da0000 - 0x00007ffbf9e3e000 C:\WINDOWS\System32\msvcrt.dll +0x00007ffbfa6b0000 - 0x00007ffbfa74c000 C:\WINDOWS\System32\sechost.dll +0x00007ffbfb460000 - 0x00007ffbfb585000 C:\WINDOWS\System32\RPCRT4.dll +0x00007ffbfb7c0000 - 0x00007ffbfb960000 C:\WINDOWS\System32\USER32.dll +0x00007ffbdc100000 - 0x00007ffbdc39a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll +0x00007ffbf9700000 - 0x00007ffbf9722000 C:\WINDOWS\System32\win32u.dll +0x00007ffbfa680000 - 0x00007ffbfa6aa000 C:\WINDOWS\System32\GDI32.dll +0x00007ffbf9540000 - 0x00007ffbf964b000 C:\WINDOWS\System32\gdi32full.dll +0x00007ffbf9340000 - 0x00007ffbf93dd000 C:\WINDOWS\System32\msvcp_win.dll +0x00007ffbf2c30000 - 0x00007ffbf2c3a000 C:\WINDOWS\SYSTEM32\VERSION.dll +0x00007ffbfa650000 - 0x00007ffbfa680000 C:\WINDOWS\System32\IMM32.DLL +0x00007ffbf3df0000 - 0x00007ffbf3dfc000 C:\Program Files\Java\jdk-18.0.1\bin\vcruntime140_1.dll +0x00007ffbda4c0000 - 0x00007ffbda54d000 C:\Program Files\Java\jdk-18.0.1\bin\msvcp140.dll +0x00007ffbbf6a0000 - 0x00007ffbc02b0000 C:\Program Files\Java\jdk-18.0.1\bin\server\jvm.dll +0x00007ffbf9c60000 - 0x00007ffbf9c68000 C:\WINDOWS\System32\PSAPI.DLL +0x00007ffbe6a50000 - 0x00007ffbe6a59000 C:\WINDOWS\SYSTEM32\WSOCK32.dll +0x00007ffbedb20000 - 0x00007ffbedb47000 C:\WINDOWS\SYSTEM32\WINMM.dll +0x00007ffbfa7b0000 - 0x00007ffbfa81b000 C:\WINDOWS\System32\WS2_32.dll +0x00007ffbf7120000 - 0x00007ffbf7132000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll +0x00007ffbf07b0000 - 0x00007ffbf07ba000 C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll +0x00007ffbe8240000 - 0x00007ffbe8424000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL +0x00007ffbe8210000 - 0x00007ffbe823c000 C:\WINDOWS\SYSTEM32\dbgcore.DLL +0x00007ffbf92b0000 - 0x00007ffbf9332000 C:\WINDOWS\System32\bcryptPrimitives.dll +0x00007ffbec280000 - 0x00007ffbec2a5000 C:\Program Files\Java\jdk-18.0.1\bin\java.dll +0x00007ffbd4ec0000 - 0x00007ffbd4f96000 C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll +0x00007ffbfa8d0000 - 0x00007ffbfb014000 C:\WINDOWS\System32\SHELL32.dll +0x00007ffbf7320000 - 0x00007ffbf7ab4000 C:\WINDOWS\SYSTEM32\windows.storage.dll +0x00007ffbfb020000 - 0x00007ffbfb374000 C:\WINDOWS\System32\combase.dll +0x00007ffbf8bf0000 - 0x00007ffbf8c1c000 C:\WINDOWS\SYSTEM32\Wldp.dll +0x00007ffbfa090000 - 0x00007ffbfa13d000 C:\WINDOWS\System32\SHCORE.dll +0x00007ffbfb590000 - 0x00007ffbfb5e5000 C:\WINDOWS\System32\shlwapi.dll +0x00007ffbf91a0000 - 0x00007ffbf91bf000 C:\WINDOWS\SYSTEM32\profapi.dll +0x00007ffbec260000 - 0x00007ffbec273000 C:\Program Files\Java\jdk-18.0.1\bin\net.dll +0x00007ffbf02b0000 - 0x00007ffbf03ba000 C:\WINDOWS\SYSTEM32\WINHTTP.dll +0x00007ffbf8910000 - 0x00007ffbf897a000 C:\WINDOWS\system32\mswsock.dll +0x00007ffbebfa0000 - 0x00007ffbebfb6000 C:\Program Files\Java\jdk-18.0.1\bin\nio.dll +0x00007ffbe4750000 - 0x00007ffbe4768000 C:\Program Files\Java\jdk-18.0.1\bin\zip.dll +0x00007ffbf3e60000 - 0x00007ffbf3e70000 C:\Program Files\Java\jdk-18.0.1\bin\verify.dll +0x00007ffbf8b40000 - 0x00007ffbf8b58000 C:\WINDOWS\SYSTEM32\CRYPTSP.dll +0x00007ffbf8290000 - 0x00007ffbf82c4000 C:\WINDOWS\system32\rsaenh.dll +0x00007ffbf97a0000 - 0x00007ffbf97c7000 C:\WINDOWS\System32\bcrypt.dll +0x00007ffbf9120000 - 0x00007ffbf914e000 C:\WINDOWS\SYSTEM32\USERENV.dll +0x00007ffbf8b60000 - 0x00007ffbf8b6c000 C:\WINDOWS\SYSTEM32\CRYPTBASE.dll +0x00007ffbf8610000 - 0x00007ffbf864b000 C:\WINDOWS\SYSTEM32\IPHLPAPI.DLL +0x00007ffbf9ec0000 - 0x00007ffbf9ec8000 C:\WINDOWS\System32\NSI.dll +0x00007ffbefaa0000 - 0x00007ffbefab7000 C:\WINDOWS\SYSTEM32\dhcpcsvc6.DLL +0x00007ffbf0450000 - 0x00007ffbf046d000 C:\WINDOWS\SYSTEM32\dhcpcsvc.DLL +0x00007ffbf8650000 - 0x00007ffbf871b000 C:\WINDOWS\SYSTEM32\DNSAPI.dll +0x00007ffbf3800000 - 0x00007ffbf380a000 C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-2708375098780757364.dll +0x00007ffbf2c80000 - 0x00007ffbf2c8a000 C:\Users\guill\AppData\Local\Temp\jansi-1.17.1-3176157090017154440.dll + +dbghelp: loaded successfully - version: 4.0.5 - missing functions: none +symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Program Files\Java\jdk-18.0.1\bin;C:\WINDOWS\SYSTEM32;C:\Program Files\Avast Software\Avast;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Program Files\Java\jdk-18.0.1\bin\server;C:\Users\guill\AppData\Local\Temp + +VM Arguments: +jvm_args: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8 +java_command: org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive +java_class_path (initial): C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license +Launcher Type: SUN_STANDARD + +[Global flags] + intx CICompilerCount = 4 {product} {ergonomic} + uint ConcGCThreads = 2 {product} {ergonomic} + uint G1ConcRefinementThreads = 8 {product} {ergonomic} + size_t G1HeapRegionSize = 1048576 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 100663296 {product} {ergonomic} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 1589641216 {product} {ergonomic} + size_t MaxNewSize = 953155584 {product} {ergonomic} + size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} + size_t MinHeapSize = 8388608 {product} {ergonomic} + uintx NonNMethodCodeHeapSize = 5839372 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 122909434 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 122909434 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + size_t SoftMaxHeapSize = 1589641216 {manageable} {ergonomic} + bool UseCompressedClassPointers = true {product lp64_product} {ergonomic} + bool UseCompressedOops = true {product lp64_product} {ergonomic} + bool UseG1GC = true {product} {ergonomic} + bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} + +Logging: +Log output configuration: + #0: stdout all=warning uptime,level,tags foldmultilines=false + #1: stderr all=off uptime,level,tags foldmultilines=false + +Environment Variables: +PATH=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk-16.0.2\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;PATH;C:\Users\guill\AppData\Local\Microsoft\WindowsApps;C:\Windows\System32;;C:\Users\guill\Desktop\Microsoft VS Code\bin;C:\Users\guill\AppData\Roaming\npm +USERNAME=guill +OS=Windows_NT +PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD + + + +--------------- S Y S T E M --------------- + +OS: + Windows 10 , 64 bit Build 19041 (10.0.19041.1706) +OS uptime: 11 days 18:11 hours +Hyper-V role detected + +CPU: total 8 (initial active 8) (8 cores per cpu, 2 threads per core) family 23 model 24 stepping 1 microcode 0x0, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4a, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, hv + +Memory: 4k page, system-wide physical 6061M (387M free) +TotalPageFile size 24493M (AvailPageFile size 0M) +current process WorkingSet (physical memory assigned to process): 44M, peak: 44M +current process commit charge ("private bytes"): 182M, peak: 182M + +vm_info: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24) for windows-amd64 JRE (18.0.1+10-24), built on Mar 9 2022 22:41:56 by "mach5one" with MS VC++ 16.8 / 16.9 (VS2019) + +END. diff --git a/hs_err_pid23924.log b/hs_err_pid23924.log new file mode 100644 index 00000000..42aed127 --- /dev/null +++ b/hs_err_pid23924.log @@ -0,0 +1,525 @@ +# +# There is insufficient memory for the Java Runtime Environment to continue. +# Native memory allocation (mmap) failed to map 65536 bytes for Failed to commit metaspace. +# Possible reasons: +# The system is out of physical RAM or swap space +# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap +# Possible solutions: +# Reduce memory load on the system +# Increase physical memory or swap space +# Check if swap backing store is full +# Decrease Java heap size (-Xmx/-Xms) +# Decrease number of Java threads +# Decrease Java thread stack sizes (-Xss) +# Set larger code cache with -XX:ReservedCodeCacheSize= +# JVM is running with Unscaled Compressed Oops mode in which the Java heap is +# placed in the first 4GB address space. The Java Heap base address is the +# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress +# to set the Java Heap base and to place the Java Heap above 4GB virtual address. +# This output file may be truncated or incomplete. +# +# Out of Memory Error (virtualSpaceNode.cpp:110), pid=23924, tid=35452 +# +# JRE version: Java(TM) SE Runtime Environment (18.0.1+10) (build 18.0.1+10-24) +# Java VM: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64) +# No core dump will be written. Minidumps are not enabled by default on client versions of Windows +# + +--------------- S U M M A R Y ------------ + +Command Line: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8 org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive + +Host: AMD Ryzen 7 3700U with Radeon Vega Mobile Gfx , 8 cores, 5G, Windows 10 , 64 bit Build 19041 (10.0.19041.1706) +Time: Tue May 24 23:24:35 2022 Paris, Madrid (heure duild 19041 (10.0.19041.1706) elapsed time: 1.633790 seconds (0d 0h 0m 1s) + +--------------- T H R E A D --------------- + +Current thread (0x000002cbfa035c40): JavaThread "main" [_thread_in_vm, id=35452, stack(0x000000db19a00000,0x000000db19b00000)] + +Stack: [0x000000db19a00000,0x000000db19b00000] +Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) +V [jvm.dll+0x69887a] +V [jvm.dll+0x7f38bd] +V [jvm.dll+0x7f51ce] +V [jvm.dll+0x7f5883] +V [jvm.dll+0x25ca3f] +V [jvm.dll+0x7ef5cb] +V [jvm.dll+0x63ea76] +V [jvm.dll+0x63eada] +V [jvm.dll+0x64135e] +V [jvm.dll+0x64121e] +V [jvm.dll+0x63f43e] +V [jvm.dll+0x649ab7] +V [jvm.dll+0x64ce3b] +V [jvm.dll+0x76af50] +V [jvm.dll+0x57dc2a] +V [jvm.dll+0x57f856] +V [jvm.dll+0x57d4be] +V [jvm.dll+0x57fe0b] +V [jvm.dll+0x659f38] +V [jvm.dll+0x655f11] +C 0x000002cb8787d621 + +Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) +j java.lang.invoke.MethodHandleNatives.resolve(Ljava/lang/invoke/MemberName;Ljava/lang/Class;IZ)Ljava/lang/invoke/MemberName;+0 java.base@18.0.1 +j java.lang.invoke.MemberName$Factory.resolve(BLjava/lang/invoke/MemberName;Ljava/lang/Class;IZ)Ljava/lang/invoke/MemberName;+36 java.base@18.0.1 +j java.lang.invoke.MemberName$Factory.resolveOrFail(BLjava/lang/invoke/MemberName;Ljava/lang/Class;ILjava/lang/Class;)Ljava/lang/invoke/MemberName;+31 java.base@18.0.1 +j java.lang.invoke.DirectMethodHandle.makePreparedLambdaForm(Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/LambdaForm;+330 java.base@18.0.1 +j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MethodType;I)Ljava/lang/invoke/LambdaForm;+17 java.base@18.0.1 +j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MemberName;Z)Ljava/lang/invoke/LambdaForm;+159 java.base@18.0.1 +j java.lang.invoke.DirectMethodHandle.preparedLambdaForm(Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/LambdaForm;+2 java.base@18.0.1 +j java.lang.invoke.DirectMethodHandle.make(BLjava/lang/Class;Ljava/lang/invoke/MemberName;Ljava/lang/Class;)Ljava/lang/invoke/DirectMethodHandle;+163 java.base@18.0.1 +j java.lang.invoke.DirectMethodHandle.make(Ljava/lang/Class;Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;+17 java.base@18.0.1 +j java.lang.invoke.DirectMethodHandle.make(Ljava/lang/invoke/MemberName;)Ljava/lang/invoke/DirectMethodHandle;+17 java.base@18.0.1 +j java.lang.invoke.Invokers.basicInvoker()Ljava/lang/invoke/MethodHandle;+60 java.base@18.0.1 +j java.lang.invoke.LambdaForm$NamedFunction.(Ljava/lang/invoke/MethodType;)V+42 java.base@18.0.1 +j java.lang.invoke.LambdaForm$Name.(Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)V+6 java.base@18.0.1 +j java.lang.invoke.Invokers.invokeHandleForm(Ljava/lang/invoke/MethodType;ZI)Ljava/lang/invoke/LambdaForm;+595 java.base@18.0.1 +j java.lang.invoke.Invokers.methodHandleInvokeLinkerMethod(Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+144 java.base@18.0.1 +j java.lang.invoke.MethodHandleNatives.linkMethodImpl(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+20 java.base@18.0.1 +j java.lang.invoke.MethodHandleNatives.linkMethod(Ljava/lang/Class;ILjava/lang/Class;Ljava/lang/String;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/invoke/MemberName;+14 java.base@18.0.1 +v ~StubRoutines::call_stub +j jdk.internal.reflect.DirectMethodHandleAccessor.invokeImpl(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+72 java.base@18.0.1 +j jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+23 java.base@18.0.1 +j java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;+102 java.base@18.0.1 +j org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced([Ljava/lang/String;)V+45 +j org.codehaus.plexus.classworlds.launcher.Launcher.launch([Ljava/lang/String;)V+2 +j org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode([Ljava/lang/String;)I+101 +j org.codehaus.plexus.classworlds.launcher.Launcher.main([Ljava/lang/String;)V+1 +j org.codehaus.classworlds.Launcher.main([Ljava/lang/String;)V+1 +v ~StubRoutines::call_stub + +--------------- P R O C E S S --------------- + +Threads class SMR info: +_java_thread_list=0x000002cb9b18d4a0, length=12, elements={ +0x000002cbfa035c40, 0x000002cb96ee2c60, 0x000002cb96ee6070, 0x000002cb96f00d20, +0x000002cb96f02ad0, 0x000002cb96f03c10, 0x000002cb96f04e90, 0x000002cb96f09a80, +0x000002cb96f2bd60, 0x000002cb96f406c0, 0x000002cb9b1ca2c0, 0x000002cb9b1d2850 +} + +Java Threads: ( => current thread ) +=>0x000002cbfa035c40 JavaThread "main" [_thread_in_vm, id=35452, stack(0x000000db19a00000,0x000000db19b00000)] + 0x000002cb96ee2c60 JavaThread "Reference Handler" daemon [_thread_blocked, id=5596, stack(0x000000db1a100000,0x000000db1a200000)] + 0x000002cb96ee6070 JavaThread "Finalizer" daemon [_thread_blocked, id=23040, stack(0x000000db1a200000,0x000000db1a300000)] + 0x000002cb96f00d20 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=34692, stack(0x000000db1a300000,0x000000db1a400000)] + 0x000002cb96f02ad0 JavaThread "Attach Listener" daemon [_thread_blocked, id=10076, stack(0x000000db1a400000,0x000000db1a500000)] + 0x000002cb96f03c10 JavaThread "Service Thread" daemon [_thread_blocked, id=30556, stack(0x000000db1a500000,0x000000db1a600000)] + 0x000002cb96f04e90 JavaThread "Monitor Deflation Thread" daemon [_thread_blocked, id=27468, stack(0x000000db1a600000,0x000000db1a700000)] + 0x000002cb96f09a80 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=24056, stack(0x000000db1a700000,0x000000db1a800000)] + 0x000002cb96f2bd60 JavaThread "C1 CompilerThread0" daemon [_thread_in_vm, id=22596, stack(0x000000db1a800000,0x000000db1a900000)] + 0x000002cb96f406c0 JavaThread "Sweeper thread" daemon [_thread_blocked, id=18792, stack(0x000000db1a900000,0x000000db1aa00000)] + 0x000002cb9b1ca2c0 JavaThread "Notification Thread" daemon [_thread_blocked, id=3768, stack(0x000000db1aa00000,0x000000db1ab00000)] + 0x000002cb9b1d2850 JavaThread "Common-Cleaner" daemon [_thread_blocked, id=24964, stack(0x000000db1ac00000,0x000000db1ad00000)] + +Other Threads: + 0x000002cbfa0fe0b0 VMThread "VM Thread" [stack: 0x000000db1a000000,0x000000db1a100000] [id=14012] + 0x000002cb9b1d25e0 WatcherThread "VM Periodic Task Thread" [stack: 0x000000db1ab00000,0x000000db1ac00000] [id=30256] + 0x000002cbfa0889b0 WorkerThread "GC Thread#0" [stack: 0x000000db19b00000,0x000000db19c00000] [id=19068] + 0x000002cbfa096740 ConcurrentGCThread "G1 Main Marker" [stack: 0x000000db19c00000,0x000000db19d00000] [id=30540] + 0x000002cbfa0978d0 WorkerThread "G1 Conc#0" [stack: 0x000000db19d00000,0x000000db19e00000] [id=22284] + 0x000002cbfa0dc550 ConcurrentGCThread "G1 Refine#0" [stack: 0x000000db19e00000,0x000000db19f00000] [id=34192] + 0x000002cbfa0dce60 ConcurrentGCThread "G1 Service" [stack: 0x000000db19f00000,0x000000db1a000000] [id=17324] + +Threads with active compile tasks: +C1 CompilerThread0 1768 307 3 jdk.internal.org.objectweb.asm.ByteVector::putShort (52 bytes) + +VM state: not at safepoint (normal execution) + +VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event]) +[0x000002cbfa01e690] Metaspace_lock - owner thread: 0x000002cbfa035c40 +[0x000002cbfa02ff60] MethodData_lock - owner thread: 0x000002cb96f2bd60 + +Heap address: 0x00000000a1400000, size: 1516 MB, Compressed Oops mode: 32-bit + +CDS archive(s) mapped at: [0x0000000800000000-0x0000000800ba0000-0x0000000800ba0000), size 12189696, SharedBaseAddress: 0x0000000800000000, ArchiveRelocationMode: 0. +Compressed class space mapped at: 0x0000000800c00000-0x0000000840c00000, reserved size: 1073741824 +Narrow klass base: 0x0000000800000000, Narrow klass shift: 0, Narrow klass range: 0x100000000 + +GC Precious Log: + CardTable entry size: 512 + Card Set container configuration: InlinePtr #cards 5 size 8 Array Of Cards #cards 12 size 40 Howl #buckets 4 coarsen threshold 1843 Howl Bitmap #cards 512 size 80 coarsen threshold 460 Card regions per heap region 1 cards per card region 2048 + CPUs: 8 total, 8 available + Memory: 6061M + Large Page Support: Disabled + NUMA Support: Disabled + Compressed Oops: Enabled (32-bit) + Heap Region Size: 1M + Heap Min Capacity: 8M + Heap Initial Capacity: 96M + Heap Max Capacity: 1516M + Pre-touch: Disabled + Parallel Workers: 8 + Concurrent Workers: 2 + Concurrent Refinement Workers: 8 + Periodic GC: Disabled + +Heap: + garbage-first heap total 98304K, used 3072K [0x00000000a1400000, 0x0000000100000000) + region size 1024K, 4 young (4096K), 0 survivors (0K) + Metaspace used 709K, committed 832K, reserved 1114112K + class space used 47K, committed 128K, reserved 1048576K + +Heap Regions: E=young(eden), S=young(survivor), O=old, HS=humongous(starts), HC=humongous(continues), CS=collection set, F=free, OA=open archive, CA=closed archive, TAMS=top-at-mark-start (previous, next) +| 0|0x00000000a1400000, 0x00000000a1400000, 0x00000000a1500000| 0%| F| |TAMS 0x00000000a1400000, 0x00000000a1400000| Untracked +| 1|0x00000000a1500000, 0x00000000a1500000, 0x00000000a1600000| 0%| F| |TAMS 0x00000000a1500000, 0x00000000a1500000| Untracked +| 2|0x00000000a1600000, 0x00000000a1600000, 0x00000000a1700000| 0%| F| |TAMS 0x00000000a1600000, 0x00000000a1600000| Untracked +| 3|0x00000000a1700000, 0x00000000a1700000, 0x00000000a1800000| 0%| F| |TAMS 0x00000000a1700000, 0x00000000a1700000| Untracked +| 4|0x00000000a1800000, 0x00000000a1800000, 0x00000000a1900000| 0%| F| |TAMS 0x00000000a1800000, 0x00000000a1800000| Untracked +| 5|0x00000000a1900000, 0x00000000a1900000, 0x00000000a1a00000| 0%| F| |TAMS 0x00000000a1900000, 0x00000000a1900000| Untracked +| 6|0x00000000a1a00000, 0x00000000a1a00000, 0x00000000a1b00000| 0%| F| |TAMS 0x00000000a1a00000, 0x00000000a1a00000| Untracked +| 7|0x00000000a1b00000, 0x00000000a1b00000, 0x00000000a1c00000| 0%| F| |TAMS 0x00000000a1b00000, 0x00000000a1b00000| Untracked +| 8|0x00000000a1c00000, 0x00000000a1c00000, 0x00000000a1d00000| 0%| F| |TAMS 0x00000000a1c00000, 0x00000000a1c00000| Untracked +| 9|0x00000000a1d00000, 0x00000000a1d00000, 0x00000000a1e00000| 0%| F| |TAMS 0x00000000a1d00000, 0x00000000a1d00000| Untracked +| 10|0x00000000a1e00000, 0x00000000a1e00000, 0x00000000a1f00000| 0%| F| |TAMS 0x00000000a1e00000, 0x00000000a1e00000| Untracked +| 11|0x00000000a1f00000, 0x00000000a1f00000, 0x00000000a2000000| 0%| F| |TAMS 0x00000000a1f00000, 0x00000000a1f00000| Untracked +| 12|0x00000000a2000000, 0x00000000a2000000, 0x00000000a2100000| 0%| F| |TAMS 0x00000000a2000000, 0x00000000a2000000| Untracked +| 13|0x00000000a2100000, 0x00000000a2100000, 0x00000000a2200000| 0%| F| |TAMS 0x00000000a2100000, 0x00000000a2100000| Untracked +| 14|0x00000000a2200000, 0x00000000a2200000, 0x00000000a2300000| 0%| F| |TAMS 0x00000000a2200000, 0x00000000a2200000| Untracked +| 15|0x00000000a2300000, 0x00000000a2300000, 0x00000000a2400000| 0%| F| |TAMS 0x00000000a2300000, 0x00000000a2300000| Untracked +| 16|0x00000000a2400000, 0x00000000a2400000, 0x00000000a2500000| 0%| F| |TAMS 0x00000000a2400000, 0x00000000a2400000| Untracked +| 17|0x00000000a2500000, 0x00000000a2500000, 0x00000000a2600000| 0%| F| |TAMS 0x00000000a2500000, 0x00000000a2500000| Untracked +| 18|0x00000000a2600000, 0x00000000a2600000, 0x00000000a2700000| 0%| F| |TAMS 0x00000000a2600000, 0x00000000a2600000| Untracked +| 19|0x00000000a2700000, 0x00000000a2700000, 0x00000000a2800000| 0%| F| |TAMS 0x00000000a2700000, 0x00000000a2700000| Untracked +| 20|0x00000000a2800000, 0x00000000a2800000, 0x00000000a2900000| 0%| F| |TAMS 0x00000000a2800000, 0x00000000a2800000| Untracked +| 21|0x00000000a2900000, 0x00000000a2900000, 0x00000000a2a00000| 0%| F| |TAMS 0x00000000a2900000, 0x00000000a2900000| Untracked +| 22|0x00000000a2a00000, 0x00000000a2a00000, 0x00000000a2b00000| 0%| F| |TAMS 0x00000000a2a00000, 0x00000000a2a00000| Untracked +| 23|0x00000000a2b00000, 0x00000000a2b00000, 0x00000000a2c00000| 0%| F| |TAMS 0x00000000a2b00000, 0x00000000a2b00000| Untracked +| 24|0x00000000a2c00000, 0x00000000a2c00000, 0x00000000a2d00000| 0%| F| |TAMS 0x00000000a2c00000, 0x00000000a2c00000| Untracked +| 25|0x00000000a2d00000, 0x00000000a2d00000, 0x00000000a2e00000| 0%| F| |TAMS 0x00000000a2d00000, 0x00000000a2d00000| Untracked +| 26|0x00000000a2e00000, 0x00000000a2e00000, 0x00000000a2f00000| 0%| F| |TAMS 0x00000000a2e00000, 0x00000000a2e00000| Untracked +| 27|0x00000000a2f00000, 0x00000000a2f00000, 0x00000000a3000000| 0%| F| |TAMS 0x00000000a2f00000, 0x00000000a2f00000| Untracked +| 28|0x00000000a3000000, 0x00000000a3000000, 0x00000000a3100000| 0%| F| |TAMS 0x00000000a3000000, 0x00000000a3000000| Untracked +| 29|0x00000000a3100000, 0x00000000a3100000, 0x00000000a3200000| 0%| F| |TAMS 0x00000000a3100000, 0x00000000a3100000| Untracked +| 30|0x00000000a3200000, 0x00000000a3200000, 0x00000000a3300000| 0%| F| |TAMS 0x00000000a3200000, 0x00000000a3200000| Untracked +| 31|0x00000000a3300000, 0x00000000a3300000, 0x00000000a3400000| 0%| F| |TAMS 0x00000000a3300000, 0x00000000a3300000| Untracked +| 32|0x00000000a3400000, 0x00000000a3400000, 0x00000000a3500000| 0%| F| |TAMS 0x00000000a3400000, 0x00000000a3400000| Untracked +| 33|0x00000000a3500000, 0x00000000a3500000, 0x00000000a3600000| 0%| F| |TAMS 0x00000000a3500000, 0x00000000a3500000| Untracked +| 34|0x00000000a3600000, 0x00000000a3600000, 0x00000000a3700000| 0%| F| |TAMS 0x00000000a3600000, 0x00000000a3600000| Untracked +| 35|0x00000000a3700000, 0x00000000a3700000, 0x00000000a3800000| 0%| F| |TAMS 0x00000000a3700000, 0x00000000a3700000| Untracked +| 36|0x00000000a3800000, 0x00000000a3800000, 0x00000000a3900000| 0%| F| |TAMS 0x00000000a3800000, 0x00000000a3800000| Untracked +| 37|0x00000000a3900000, 0x00000000a3900000, 0x00000000a3a00000| 0%| F| |TAMS 0x00000000a3900000, 0x00000000a3900000| Untracked +| 38|0x00000000a3a00000, 0x00000000a3a00000, 0x00000000a3b00000| 0%| F| |TAMS 0x00000000a3a00000, 0x00000000a3a00000| Untracked +| 39|0x00000000a3b00000, 0x00000000a3b00000, 0x00000000a3c00000| 0%| F| |TAMS 0x00000000a3b00000, 0x00000000a3b00000| Untracked +| 40|0x00000000a3c00000, 0x00000000a3c00000, 0x00000000a3d00000| 0%| F| |TAMS 0x00000000a3c00000, 0x00000000a3c00000| Untracked +| 41|0x00000000a3d00000, 0x00000000a3d00000, 0x00000000a3e00000| 0%| F| |TAMS 0x00000000a3d00000, 0x00000000a3d00000| Untracked +| 42|0x00000000a3e00000, 0x00000000a3e00000, 0x00000000a3f00000| 0%| F| |TAMS 0x00000000a3e00000, 0x00000000a3e00000| Untracked +| 43|0x00000000a3f00000, 0x00000000a3f00000, 0x00000000a4000000| 0%| F| |TAMS 0x00000000a3f00000, 0x00000000a3f00000| Untracked +| 44|0x00000000a4000000, 0x00000000a4000000, 0x00000000a4100000| 0%| F| |TAMS 0x00000000a4000000, 0x00000000a4000000| Untracked +| 45|0x00000000a4100000, 0x00000000a4100000, 0x00000000a4200000| 0%| F| |TAMS 0x00000000a4100000, 0x00000000a4100000| Untracked +| 46|0x00000000a4200000, 0x00000000a4200000, 0x00000000a4300000| 0%| F| |TAMS 0x00000000a4200000, 0x00000000a4200000| Untracked +| 47|0x00000000a4300000, 0x00000000a4300000, 0x00000000a4400000| 0%| F| |TAMS 0x00000000a4300000, 0x00000000a4300000| Untracked +| 48|0x00000000a4400000, 0x00000000a4400000, 0x00000000a4500000| 0%| F| |TAMS 0x00000000a4400000, 0x00000000a4400000| Untracked +| 49|0x00000000a4500000, 0x00000000a4500000, 0x00000000a4600000| 0%| F| |TAMS 0x00000000a4500000, 0x00000000a4500000| Untracked +| 50|0x00000000a4600000, 0x00000000a4600000, 0x00000000a4700000| 0%| F| |TAMS 0x00000000a4600000, 0x00000000a4600000| Untracked +| 51|0x00000000a4700000, 0x00000000a4700000, 0x00000000a4800000| 0%| F| |TAMS 0x00000000a4700000, 0x00000000a4700000| Untracked +| 52|0x00000000a4800000, 0x00000000a4800000, 0x00000000a4900000| 0%| F| |TAMS 0x00000000a4800000, 0x00000000a4800000| Untracked +| 53|0x00000000a4900000, 0x00000000a4900000, 0x00000000a4a00000| 0%| F| |TAMS 0x00000000a4900000, 0x00000000a4900000| Untracked +| 54|0x00000000a4a00000, 0x00000000a4a00000, 0x00000000a4b00000| 0%| F| |TAMS 0x00000000a4a00000, 0x00000000a4a00000| Untracked +| 55|0x00000000a4b00000, 0x00000000a4b00000, 0x00000000a4c00000| 0%| F| |TAMS 0x00000000a4b00000, 0x00000000a4b00000| Untracked +| 56|0x00000000a4c00000, 0x00000000a4c00000, 0x00000000a4d00000| 0%| F| |TAMS 0x00000000a4c00000, 0x00000000a4c00000| Untracked +| 57|0x00000000a4d00000, 0x00000000a4d00000, 0x00000000a4e00000| 0%| F| |TAMS 0x00000000a4d00000, 0x00000000a4d00000| Untracked +| 58|0x00000000a4e00000, 0x00000000a4e00000, 0x00000000a4f00000| 0%| F| |TAMS 0x00000000a4e00000, 0x00000000a4e00000| Untracked +| 59|0x00000000a4f00000, 0x00000000a4f00000, 0x00000000a5000000| 0%| F| |TAMS 0x00000000a4f00000, 0x00000000a4f00000| Untracked +| 60|0x00000000a5000000, 0x00000000a5000000, 0x00000000a5100000| 0%| F| |TAMS 0x00000000a5000000, 0x00000000a5000000| Untracked +| 61|0x00000000a5100000, 0x00000000a5100000, 0x00000000a5200000| 0%| F| |TAMS 0x00000000a5100000, 0x00000000a5100000| Untracked +| 62|0x00000000a5200000, 0x00000000a5200000, 0x00000000a5300000| 0%| F| |TAMS 0x00000000a5200000, 0x00000000a5200000| Untracked +| 63|0x00000000a5300000, 0x00000000a5300000, 0x00000000a5400000| 0%| F| |TAMS 0x00000000a5300000, 0x00000000a5300000| Untracked +| 64|0x00000000a5400000, 0x00000000a5400000, 0x00000000a5500000| 0%| F| |TAMS 0x00000000a5400000, 0x00000000a5400000| Untracked +| 65|0x00000000a5500000, 0x00000000a5500000, 0x00000000a5600000| 0%| F| |TAMS 0x00000000a5500000, 0x00000000a5500000| Untracked +| 66|0x00000000a5600000, 0x00000000a5600000, 0x00000000a5700000| 0%| F| |TAMS 0x00000000a5600000, 0x00000000a5600000| Untracked +| 67|0x00000000a5700000, 0x00000000a5700000, 0x00000000a5800000| 0%| F| |TAMS 0x00000000a5700000, 0x00000000a5700000| Untracked +| 68|0x00000000a5800000, 0x00000000a5800000, 0x00000000a5900000| 0%| F| |TAMS 0x00000000a5800000, 0x00000000a5800000| Untracked +| 69|0x00000000a5900000, 0x00000000a5900000, 0x00000000a5a00000| 0%| F| |TAMS 0x00000000a5900000, 0x00000000a5900000| Untracked +| 70|0x00000000a5a00000, 0x00000000a5a00000, 0x00000000a5b00000| 0%| F| |TAMS 0x00000000a5a00000, 0x00000000a5a00000| Untracked +| 71|0x00000000a5b00000, 0x00000000a5b00000, 0x00000000a5c00000| 0%| F| |TAMS 0x00000000a5b00000, 0x00000000a5b00000| Untracked +| 72|0x00000000a5c00000, 0x00000000a5c00000, 0x00000000a5d00000| 0%| F| |TAMS 0x00000000a5c00000, 0x00000000a5c00000| Untracked +| 73|0x00000000a5d00000, 0x00000000a5d00000, 0x00000000a5e00000| 0%| F| |TAMS 0x00000000a5d00000, 0x00000000a5d00000| Untracked +| 74|0x00000000a5e00000, 0x00000000a5e00000, 0x00000000a5f00000| 0%| F| |TAMS 0x00000000a5e00000, 0x00000000a5e00000| Untracked +| 75|0x00000000a5f00000, 0x00000000a5f00000, 0x00000000a6000000| 0%| F| |TAMS 0x00000000a5f00000, 0x00000000a5f00000| Untracked +| 76|0x00000000a6000000, 0x00000000a6000000, 0x00000000a6100000| 0%| F| |TAMS 0x00000000a6000000, 0x00000000a6000000| Untracked +| 77|0x00000000a6100000, 0x00000000a6100000, 0x00000000a6200000| 0%| F| |TAMS 0x00000000a6100000, 0x00000000a6100000| Untracked +| 78|0x00000000a6200000, 0x00000000a6200000, 0x00000000a6300000| 0%| F| |TAMS 0x00000000a6200000, 0x00000000a6200000| Untracked +| 79|0x00000000a6300000, 0x00000000a6300000, 0x00000000a6400000| 0%| F| |TAMS 0x00000000a6300000, 0x00000000a6300000| Untracked +| 80|0x00000000a6400000, 0x00000000a6400000, 0x00000000a6500000| 0%| F| |TAMS 0x00000000a6400000, 0x00000000a6400000| Untracked +| 81|0x00000000a6500000, 0x00000000a6500000, 0x00000000a6600000| 0%| F| |TAMS 0x00000000a6500000, 0x00000000a6500000| Untracked +| 82|0x00000000a6600000, 0x00000000a6600000, 0x00000000a6700000| 0%| F| |TAMS 0x00000000a6600000, 0x00000000a6600000| Untracked +| 83|0x00000000a6700000, 0x00000000a6700000, 0x00000000a6800000| 0%| F| |TAMS 0x00000000a6700000, 0x00000000a6700000| Untracked +| 84|0x00000000a6800000, 0x00000000a6800000, 0x00000000a6900000| 0%| F| |TAMS 0x00000000a6800000, 0x00000000a6800000| Untracked +| 85|0x00000000a6900000, 0x00000000a6900000, 0x00000000a6a00000| 0%| F| |TAMS 0x00000000a6900000, 0x00000000a6900000| Untracked +| 86|0x00000000a6a00000, 0x00000000a6a00000, 0x00000000a6b00000| 0%| F| |TAMS 0x00000000a6a00000, 0x00000000a6a00000| Untracked +| 87|0x00000000a6b00000, 0x00000000a6b00000, 0x00000000a6c00000| 0%| F| |TAMS 0x00000000a6b00000, 0x00000000a6b00000| Untracked +| 88|0x00000000a6c00000, 0x00000000a6c00000, 0x00000000a6d00000| 0%| F| |TAMS 0x00000000a6c00000, 0x00000000a6c00000| Untracked +| 89|0x00000000a6d00000, 0x00000000a6d00000, 0x00000000a6e00000| 0%| F| |TAMS 0x00000000a6d00000, 0x00000000a6d00000| Untracked +| 90|0x00000000a6e00000, 0x00000000a6e00000, 0x00000000a6f00000| 0%| F| |TAMS 0x00000000a6e00000, 0x00000000a6e00000| Untracked +| 91|0x00000000a6f00000, 0x00000000a6f00000, 0x00000000a7000000| 0%| F| |TAMS 0x00000000a6f00000, 0x00000000a6f00000| Untracked +| 92|0x00000000a7000000, 0x00000000a7076a70, 0x00000000a7100000| 46%| E| |TAMS 0x00000000a7000000, 0x00000000a7000000| Complete +| 93|0x00000000a7100000, 0x00000000a7200000, 0x00000000a7200000|100%| E|CS|TAMS 0x00000000a7100000, 0x00000000a7100000| Complete +| 94|0x00000000a7200000, 0x00000000a7300000, 0x00000000a7300000|100%| E|CS|TAMS 0x00000000a7200000, 0x00000000a7200000| Complete +| 95|0x00000000a7300000, 0x00000000a7400000, 0x00000000a7400000|100%| E|CS|TAMS 0x00000000a7300000, 0x00000000a7300000| Complete + +Card table byte_map: [0x000002cbfa730000,0x000002cbfaa30000] _byte_map_base: 0x000002cbfa226000 + +Marking Bits (Prev, Next): (CMBitMap*) 0x000002cbfa089fc0, (CMBitMap*) 0x000002cbfa08a000 + Prev Bits: [0x000002cbfad30000, 0x000002cbfc4e0000) + Next Bits: [0x000002cbfc4e0000, 0x000002cbfdc90000) + +Polling page: 0x000002cbf7f70000 + +Metaspace: + +Usage: + Non-class: 662.75 KB used. + Class: 47.21 KB used. + Both: 709.96 KB used. + +Virtual space: + Non-class space: 64.00 MB reserved, 704.00 KB ( 1%) committed, 1 nodes. + Class space: 1.00 GB reserved, 128.00 KB ( <1%) committed, 1 nodes. + Both: 1.06 GB reserved, 832.00 KB ( <1%) committed. + +Chunk freelists: + Non-Class: 3.85 MB + Class: 3.72 MB + Both: 7.56 MB + +MaxMetaspaceSize: unlimited +CompressedClassSpaceSize: 1.00 GB +Initial GC threshold: 21.00 MB +Current GC threshold: 21.00 MB +CDS: on +MetaspaceReclaimPolicy: balanced + - commit_granule_bytes: 65536. + - commit_granule_words: 8192. + - virtual_space_node_default_size: 8388608. + - enlarge_chunks_in_place: 1. + - new_chunks_are_fully_committed: 0. + - uncommit_free_chunks: 1. + - use_allocation_guard: 0. + + +Internal statistics: + +num_allocs_failed_limit: 0. +num_arena_births: 20. +num_arena_deaths: 0. +num_vsnodes_births: 2. +num_vsnodes_deaths: 0. +num_space_committed: 13. +num_space_uncommitted: 0. +num_chunks_returned_to_freelist: 0. +num_chunks_taken_from_freelist: 34. +num_chunk_merges: 0. +num_chunk_splits: 22. +num_chunks_enlarged: 16. +num_inconsistent_stats: 0. + +CodeHeap 'non-profiled nmethods': size=120000Kb used=90Kb max_used=90Kb free=119910Kb + bounds [0x000002cb8f340000, 0x000002cb8f5b0000, 0x000002cb96870000] +CodeHeap 'profiled nmethods': size=120000Kb used=399Kb max_used=399Kb free=119600Kb + bounds [0x000002cb87e10000, 0x000002cb88080000, 0x000002cb8f340000] +CodeHeap 'non-nmethods': size=5760Kb used=1111Kb max_used=1111Kb free=4648Kb + bounds [0x000002cb87870000, 0x000002cb87ae0000, 0x000002cb87e10000] + total_blobs=682 nmethods=307 adapters=288 + compilation: enabled + stopped_count=0, restarted_count=0 + full_count=0 + +Compilation events (20 events): +Event: 1.522 Thread 0x000002cb96f2bd60 nmethod 292 0x000002cb87e70710 code [0x000002cb87e708c0, 0x000002cb87e70b58] +Event: 1.525 Thread 0x000002cb96f2bd60 293 3 jdk.internal.org.objectweb.asm.SymbolTable::put (150 bytes) +Event: 1.526 Thread 0x000002cb96f2bd60 nmethod 293 0x000002cb87e70c10 code [0x000002cb87e70e00, 0x000002cb87e71698] +Event: 1.528 Thread 0x000002cb96f2bd60 294 1 java.lang.invoke.MethodType$ConcurrentWeakInternSet$WeakEntry::hashCode (5 bytes) +Event: 1.528 Thread 0x000002cb96f2bd60 nmethod 294 0x000002cb8f354e90 code [0x000002cb8f355020, 0x000002cb8f3550f8] +Event: 1.528 Thread 0x000002cb96f2bd60 295 3 java.lang.Class::getClassLoader (28 bytes) +Event: 1.529 Thread 0x000002cb96f2bd60 nmethod 295 0x000002cb87e71990 code [0x000002cb87e71b40, 0x000002cb87e71d98] +Event: 1.588 Thread 0x000002cb96f2bd60 300 3 java.lang.invoke.MemberName::testAllFlags (7 bytes) +Event: 1.589 Thread 0x000002cb96f2bd60 nmethod 300 0x000002cb87e71e90 code [0x000002cb87e72020, 0x000002cb87e721f8] +Event: 1.589 Thread 0x000002cb96f2bd60 302 3 java.lang.invoke.LambdaForm$BasicType::basicType (19 bytes) +Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 302 0x000002cb87e72290 code [0x000002cb87e72460, 0x000002cb87e726b8] +Event: 1.590 Thread 0x000002cb96f2bd60 303 3 jdk.internal.org.objectweb.asm.SymbolTable$Entry:: (17 bytes) +Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 303 0x000002cb87e72810 code [0x000002cb87e729c0, 0x000002cb87e72b48] +Event: 1.590 Thread 0x000002cb96f2bd60 304 3 jdk.internal.org.objectweb.asm.ByteVector::putByte (39 bytes) +Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 304 0x000002cb87e72c10 code [0x000002cb87e72dc0, 0x000002cb87e72fa8] +Event: 1.590 Thread 0x000002cb96f2bd60 305 1 java.lang.invoke.MethodTypeForm::parameterSlotCount (5 bytes) +Event: 1.590 Thread 0x000002cb96f2bd60 nmethod 305 0x000002cb8f356210 code [0x000002cb8f3563a0, 0x000002cb8f356478] +Event: 1.590 Thread 0x000002cb96f2bd60 306 3 jdk.internal.org.objectweb.asm.SymbolTable::addConstantUtf8 (98 bytes) +Event: 1.591 Thread 0x000002cb96f2bd60 nmethod 306 0x000002cb87e73110 code [0x000002cb87e73340, 0x000002cb87e73938] +Event: 1.591 Thread 0x000002cb96f2bd60 307 3 jdk.internal.org.objectweb.asm.ByteVector::putShort (52 bytes) + +GC Heap History (0 events): +No events + +Deoptimization events (4 events): +Event: 1.087 Thread 0x000002cbfa035c40 Uncommon trap: trap_request=0xffffff45 fr.pc=0x000002cb8f34af64 relative=0x0000000000000064 +Event: 1.087 Thread 0x000002cbfa035c40 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000002cb8f34af64 method=java.io.WinNTFileSystem.isSlash(C)Z @ 9 c2 +Event: 1.087 Thread 0x000002cbfa035c40 DEOPT PACKING pc=0x000002cb8f34af64 sp=0x000000db19afe380 +Event: 1.087 Thread 0x000002cbfa035c40 DEOPT UNPACKING pc=0x000002cb878c23a3 sp=0x000000db19afe308 mode 2 + +Classes loaded (20 events): +Event: 0.511 Loading class java/net/URLConnection +Event: 0.512 Loading class java/net/URLConnection done +Event: 0.512 Loading class sun/net/www/URLConnection done +Event: 0.512 Loading class sun/net/www/protocol/file/FileURLConnection done +Event: 0.513 Loading class sun/net/www/MessageHeader +Event: 0.513 Loading class sun/net/www/MessageHeader done +Event: 0.516 Loading class java/io/FilePermission$1 +Event: 0.516 Loading class jdk/internal/access/JavaIOFilePermissionAccess +Event: 0.517 Loading class jdk/internal/access/JavaIOFilePermissionAccess done +Event: 0.517 Loading class java/io/FilePermission$1 done +Event: 0.529 Loading class java/io/FilePermissionCollection +Event: 0.530 Loading class java/io/FilePermissionCollection done +Event: 0.530 Loading class java/util/Vector +Event: 0.532 Loading class java/util/Vector done +Event: 0.532 Loading class java/io/FilePermissionCollection$1 +Event: 0.533 Loading class java/io/FilePermissionCollection$1 done +Event: 1.032 Loading class java/lang/IllegalStateException +Event: 1.035 Loading class java/lang/IllegalStateException done +Event: 1.471 Loading class sun/invoke/util/VerifyAccess$1 +Event: 1.479 Loading class sun/invoke/util/VerifyAccess$1 done + +Classes unloaded (0 events): +No events + +Classes redefined (0 events): +No events + +Internal exceptions (0 events): +No events + +VM Operations (4 events): +Event: 0.172 Executing VM operation: HandshakeAllThreads +Event: 0.172 Executing VM operation: HandshakeAllThreads done +Event: 1.184 Executing VM operation: Cleanup +Event: 1.205 Executing VM operation: Cleanup done + +Events (17 events): +Event: 0.015 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\java.dll +Event: 0.031 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll +Event: 0.032 Thread 0x000002cbfa035c40 Thread added: 0x000002cbfa035c40 +Event: 0.042 Thread 0x000002cb96ee2c60 Thread added: 0x000002cb96ee2c60 +Event: 0.043 Thread 0x000002cb96ee6070 Thread added: 0x000002cb96ee6070 +Event: 0.080 Thread 0x000002cb96f00d20 Thread added: 0x000002cb96f00d20 +Event: 0.080 Thread 0x000002cb96f02ad0 Thread added: 0x000002cb96f02ad0 +Event: 0.080 Thread 0x000002cb96f03c10 Thread added: 0x000002cb96f03c10 +Event: 0.080 Thread 0x000002cb96f04e90 Thread added: 0x000002cb96f04e90 +Event: 0.081 Thread 0x000002cb96f09a80 Thread added: 0x000002cb96f09a80 +Event: 0.081 Thread 0x000002cb96f2bd60 Thread added: 0x000002cb96f2bd60 +Event: 0.081 Thread 0x000002cb96f406c0 Thread added: 0x000002cb96f406c0 +Event: 0.133 Thread 0x000002cb9b1ca2c0 Thread added: 0x000002cb9b1ca2c0 +Event: 0.143 Thread 0x000002cb9b1d2850 Thread added: 0x000002cb9b1d2850 +Event: 0.153 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\net.dll +Event: 0.158 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\nio.dll +Event: 0.170 Loaded shared library C:\Program Files\Java\jdk-18.0.1\bin\zip.dll + + +Dynamic libraries: +0x00007ff7a7750000 - 0x00007ff7a7760000 C:\Program Files\Java\jdk-18.0.1\bin\java.exe +0x00007ffbfbb50000 - 0x00007ffbfbd45000 C:\WINDOWS\SYSTEM32\ntdll.dll +0x00007ffbd8b00000 - 0x00007ffbd8b16000 C:\Program Files\Avast Software\Avast\aswhook.dll +0x00007ffbf9ba0000 - 0x00007ffbf9c5d000 C:\WINDOWS\System32\KERNEL32.DLL +0x00007ffbf97d0000 - 0x00007ffbf9a9d000 C:\WINDOWS\System32\KERNELBASE.dll +0x00007ffbf9aa0000 - 0x00007ffbf9ba0000 C:\WINDOWS\System32\ucrtbase.dll +0x00007ffbec2b0000 - 0x00007ffbec2ca000 C:\Program Files\Java\jdk-18.0.1\bin\VCRUNTIME140.dll +0x00007ffbf2cb0000 - 0x00007ffbf2cc8000 C:\Program Files\Java\jdk-18.0.1\bin\jli.dll +0x00007ffbfb5f0000 - 0x00007ffbfb69e000 C:\WINDOWS\System32\ADVAPI32.dll +0x00007ffbf9da0000 - 0x00007ffbf9e3e000 C:\WINDOWS\System32\msvcrt.dll +0x00007ffbfa6b0000 - 0x00007ffbfa74c000 C:\WINDOWS\System32\sechost.dll +0x00007ffbfb460000 - 0x00007ffbfb585000 C:\WINDOWS\System32\RPCRT4.dll +0x00007ffbfb7c0000 - 0x00007ffbfb960000 C:\WINDOWS\System32\USER32.dll +0x00007ffbf9700000 - 0x00007ffbf9722000 C:\WINDOWS\System32\win32u.dll +0x00007ffbdc100000 - 0x00007ffbdc39a000 C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e\COMCTL32.dll +0x00007ffbfa680000 - 0x00007ffbfa6aa000 C:\WINDOWS\System32\GDI32.dll +0x00007ffbf9540000 - 0x00007ffbf964b000 C:\WINDOWS\System32\gdi32full.dll +0x00007ffbf9340000 - 0x00007ffbf93dd000 C:\WINDOWS\System32\msvcp_win.dll +0x00007ffbf2c30000 - 0x00007ffbf2c3a000 C:\WINDOWS\SYSTEM32\VERSION.dll +0x00007ffbfa650000 - 0x00007ffbfa680000 C:\WINDOWS\System32\IMM32.DLL +0x00007ffbf3df0000 - 0x00007ffbf3dfc000 C:\Program Files\Java\jdk-18.0.1\bin\vcruntime140_1.dll +0x00007ffbda4c0000 - 0x00007ffbda54d000 C:\Program Files\Java\jdk-18.0.1\bin\msvcp140.dll +0x00007ffbbf6a0000 - 0x00007ffbc02b0000 C:\Program Files\Java\jdk-18.0.1\bin\server\jvm.dll +0x00007ffbf9c60000 - 0x00007ffbf9c68000 C:\WINDOWS\System32\PSAPI.DLL +0x00007ffbe6a50000 - 0x00007ffbe6a59000 C:\WINDOWS\SYSTEM32\WSOCK32.dll +0x00007ffbfa7b0000 - 0x00007ffbfa81b000 C:\WINDOWS\System32\WS2_32.dll +0x00007ffbedb20000 - 0x00007ffbedb47000 C:\WINDOWS\SYSTEM32\WINMM.dll +0x00007ffbf7120000 - 0x00007ffbf7132000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll +0x00007ffbf07b0000 - 0x00007ffbf07ba000 C:\Program Files\Java\jdk-18.0.1\bin\jimage.dll +0x00007ffbe8240000 - 0x00007ffbe8424000 C:\WINDOWS\SYSTEM32\DBGHELP.DLL +0x00007ffbe8210000 - 0x00007ffbe823c000 C:\WINDOWS\SYSTEM32\dbgcore.DLL +0x00007ffbf92b0000 - 0x00007ffbf9332000 C:\WINDOWS\System32\bcryptPrimitives.dll +0x00007ffbec280000 - 0x00007ffbec2a5000 C:\Program Files\Java\jdk-18.0.1\bin\java.dll +0x00007ffbd4ec0000 - 0x00007ffbd4f96000 C:\Program Files\Java\jdk-18.0.1\bin\jsvml.dll +0x00007ffbfa8d0000 - 0x00007ffbfb014000 C:\WINDOWS\System32\SHELL32.dll +0x00007ffbf7320000 - 0x00007ffbf7ab4000 C:\WINDOWS\SYSTEM32\windows.storage.dll +0x00007ffbfb020000 - 0x00007ffbfb374000 C:\WINDOWS\System32\combase.dll +0x00007ffbf8bf0000 - 0x00007ffbf8c1c000 C:\WINDOWS\SYSTEM32\Wldp.dll +0x00007ffbfa090000 - 0x00007ffbfa13d000 C:\WINDOWS\System32\SHCORE.dll +0x00007ffbfb590000 - 0x00007ffbfb5e5000 C:\WINDOWS\System32\shlwapi.dll +0x00007ffbf91a0000 - 0x00007ffbf91bf000 C:\WINDOWS\SYSTEM32\profapi.dll +0x00007ffbec260000 - 0x00007ffbec273000 C:\Program Files\Java\jdk-18.0.1\bin\net.dll +0x00007ffbf02b0000 - 0x00007ffbf03ba000 C:\WINDOWS\SYSTEM32\WINHTTP.dll +0x00007ffbf8910000 - 0x00007ffbf897a000 C:\WINDOWS\system32\mswsock.dll +0x00007ffbebfa0000 - 0x00007ffbebfb6000 C:\Program Files\Java\jdk-18.0.1\bin\nio.dll +0x00007ffbe4750000 - 0x00007ffbe4768000 C:\Program Files\Java\jdk-18.0.1\bin\zip.dll + +dbghelp: loaded successfully - version: 4.0.5 - missing functions: none +symbol engine: initialized successfully - sym options: 0x614 - pdb path: .;C:\Program Files\Java\jdk-18.0.1\bin;C:\WINDOWS\SYSTEM32;C:\Program Files\Avast Software\Avast;C:\WINDOWS\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.19041.1110_none_60b5254171f9507e;C:\Program Files\Java\jdk-18.0.1\bin\server + +VM Arguments: +jvm_args: -Dmaven.multiModuleProjectDirectory=C:\Users\guill\gitProjects\mmocore -Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3 -Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\bin\m2.conf -Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven-event-listener.jar -Dfile.encoding=UTF-8 +java_command: org.codehaus.classworlds.Launcher -Didea.version=2021.1.2 install --non-recursive +java_class_path (initial): C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license +Launcher Type: SUN_STANDARD + +[Global flags] + intx CICompilerCount = 4 {product} {ergonomic} + uint ConcGCThreads = 2 {product} {ergonomic} + uint G1ConcRefinementThreads = 8 {product} {ergonomic} + size_t G1HeapRegionSize = 1048576 {product} {ergonomic} + uintx GCDrainStackTargetSize = 64 {product} {ergonomic} + size_t InitialHeapSize = 100663296 {product} {ergonomic} + size_t MarkStackSize = 4194304 {product} {ergonomic} + size_t MaxHeapSize = 1589641216 {product} {ergonomic} + size_t MaxNewSize = 953155584 {product} {ergonomic} + size_t MinHeapDeltaBytes = 1048576 {product} {ergonomic} + size_t MinHeapSize = 8388608 {product} {ergonomic} + uintx NonNMethodCodeHeapSize = 5839372 {pd product} {ergonomic} + uintx NonProfiledCodeHeapSize = 122909434 {pd product} {ergonomic} + uintx ProfiledCodeHeapSize = 122909434 {pd product} {ergonomic} + uintx ReservedCodeCacheSize = 251658240 {pd product} {ergonomic} + bool SegmentedCodeCache = true {product} {ergonomic} + size_t SoftMaxHeapSize = 1589641216 {manageable} {ergonomic} + bool UseCompressedClassPointers = true {product lp64_product} {ergonomic} + bool UseCompressedOops = true {product lp64_product} {ergonomic} + bool UseG1GC = true {product} {ergonomic} + bool UseLargePagesIndividualAllocation = false {pd product} {ergonomic} + +Logging: +Log output configuration: + #0: stdout all=warning uptime,level,tags foldmultilines=false + #1: stderr all=off uptime,level,tags foldmultilines=false + +Environment Variables: +PATH=C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files\Java\jdk-16.0.2\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;PATH;C:\Users\guill\AppData\Local\Microsoft\WindowsApps;C:\Windows\System32;;C:\Users\guill\Desktop\Microsoft VS Code\bin;C:\Users\guill\AppData\Roaming\npm +USERNAME=guill +OS=Windows_NT +PROCESSOR_IDENTIFIER=AMD64 Family 23 Model 24 Stepping 1, AuthenticAMD + + + +--------------- S Y S T E M --------------- + +OS: + Windows 10 , 64 bit Build 19041 (10.0.19041.1706) +OS uptime: 11 days 18:11 hours +Hyper-V role detected + +CPU: total 8 (initial active 8) (8 cores per cpu, 2 threads per core) family 23 model 24 stepping 1 microcode 0x0, cx8, cmov, fxsr, ht, mmx, 3dnowpref, sse, sse2, sse3, ssse3, sse4a, sse4.1, sse4.2, popcnt, lzcnt, tsc, tscinvbit, avx, avx2, aes, clmul, bmi1, bmi2, adx, sha, fma, vzeroupper, clflush, clflushopt, hv + +Memory: 4k page, system-wide physical 6061M (441M free) +TotalPageFile size 24493M (AvailPageFile size 0M) +current process WorkingSet (physical memory assigned to process): 34M, peak: 34M +current process commit charge ("private bytes"): 178M, peak: 178M + +vm_info: Java HotSpot(TM) 64-Bit Server VM (18.0.1+10-24) for windows-amd64 JRE (18.0.1+10-24), built on Mar 9 2022 22:41:56 by "mach5one" with MS VC++ 16.8 / 16.9 (VS2019) + +END. diff --git a/replay_pid12252.log b/replay_pid12252.log new file mode 100644 index 00000000..febf38a1 --- /dev/null +++ b/replay_pid12252.log @@ -0,0 +1,1124 @@ +version 2 +JvmtiExport can_access_local_variables 0 +JvmtiExport can_hotswap_or_post_breakpoint 0 +JvmtiExport can_post_on_exceptions 0 +# 128 ciObject found +instanceKlass jdk/internal/loader/ClassLoaders$AppClassLoader +ciInstanceKlass java/lang/Cloneable 1 0 7 100 1 100 1 1 1 +instanceKlass org/codehaus/plexus/util/ReaderFactory +instanceKlass org/apache/maven/project/ExtensionDescriptor +instanceKlass jdk/internal/misc/ScopedMemoryAccess$Scope +instanceKlass org/apache/maven/project/ExtensionDescriptorBuilder +instanceKlass org/apache/maven/extension/internal/CoreExtensionEntry +instanceKlass org/apache/maven/cli/ResolveFile +instanceKlass java/util/StringTokenizer +instanceKlass org/codehaus/plexus/util/StringUtils +instanceKlass org/codehaus/plexus/logging/Logger +instanceKlass org/apache/maven/cli/logging/Slf4jLoggerManager +instanceKlass org/slf4j/impl/MavenSlf4jSimpleFriend +instanceKlass org/slf4j/MavenSlf4jFriend +instanceKlass org/apache/maven/cli/logging/BaseSlf4jConfiguration +instanceKlass org/codehaus/plexus/util/IOUtil +instanceKlass org/codehaus/plexus/util/PropertyUtils +instanceKlass org/apache/maven/cli/logging/Slf4jConfiguration +instanceKlass org/apache/maven/cli/logging/Slf4jConfigurationFactory +instanceKlass org/slf4j/impl/OutputChoice +instanceKlass sun/net/DefaultProgressMeteringPolicy +instanceKlass sun/net/ProgressMeteringPolicy +instanceKlass sun/net/ProgressMonitor +instanceKlass org/slf4j/impl/SimpleLoggerConfiguration$1 +instanceKlass java/text/Format +instanceKlass org/slf4j/impl/SimpleLoggerConfiguration +instanceKlass org/slf4j/helpers/NamedLoggerBase +instanceKlass org/slf4j/impl/SimpleLoggerFactory +instanceKlass org/slf4j/impl/StaticLoggerBinder +instanceKlass org/slf4j/spi/LoggerFactoryBinder +instanceKlass java/util/Collections$3 +instanceKlass java/net/URLClassLoader$3$1 +instanceKlass java/net/URLClassLoader$3 +instanceKlass jdk/internal/loader/URLClassPath$1 +instanceKlass java/lang/CompoundEnumeration +instanceKlass jdk/internal/loader/BuiltinClassLoader$1 +instanceKlass java/util/Collections$EmptyEnumeration +instanceKlass org/slf4j/helpers/Util +instanceKlass org/slf4j/helpers/NOPLoggerFactory +instanceKlass java/util/concurrent/LinkedBlockingQueue$Node +instanceKlass java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject +instanceKlass java/util/concurrent/locks/Condition +instanceKlass java/util/concurrent/BlockingQueue +instanceKlass org/slf4j/helpers/SubstituteLoggerFactory +instanceKlass org/slf4j/ILoggerFactory +instanceKlass org/slf4j/event/LoggingEvent +instanceKlass org/slf4j/LoggerFactory +instanceKlass org/apache/commons/lang3/StringUtils +instanceKlass org/apache/maven/cli/CLIReportingUtils +instanceKlass org/apache/maven/properties/internal/SystemProperties +instanceKlass java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet$UnmodifiableEntry +instanceKlass java/util/Collections$UnmodifiableMap$UnmodifiableEntrySet$1 +instanceKlass org/codehaus/plexus/util/Os +instanceKlass org/apache/maven/properties/internal/EnvironmentUtils +instanceKlass java/util/LinkedList$Node +instanceKlass org/apache/commons/cli/Util +instanceKlass org/apache/commons/cli/CommandLine +instanceKlass org/apache/commons/cli/Parser +instanceKlass org/apache/maven/cli/CleanArgument +instanceKlass org/apache/commons/cli/OptionValidator +instanceKlass org/apache/commons/cli/Option$Builder +instanceKlass org/apache/commons/cli/Option +instanceKlass org/apache/commons/cli/Options +instanceKlass org/apache/commons/cli/CommandLineParser +instanceKlass org/apache/maven/cli/CLIManager +instanceKlass org/apache/maven/cli/logging/Slf4jStdoutLogger +instanceKlass org/eclipse/aether/DefaultRepositoryCache +instanceKlass org/apache/maven/project/ProjectBuildingRequest +instanceKlass org/eclipse/aether/RepositoryCache +instanceKlass org/apache/maven/execution/DefaultMavenExecutionRequest +instanceKlass org/apache/maven/execution/MavenExecutionRequest +instanceKlass java/lang/ApplicationShutdownHooks$1 +instanceKlass java/lang/ApplicationShutdownHooks +instanceKlass org/fusesource/jansi/internal/WindowsSupport +instanceKlass org/fusesource/jansi/internal/Kernel32$SMALL_RECT +instanceKlass org/fusesource/jansi/internal/Kernel32$COORD +instanceKlass org/fusesource/jansi/internal/Kernel32$CONSOLE_SCREEN_BUFFER_INFO +instanceKlass org/fusesource/jansi/internal/Kernel32 +instanceKlass jdk/internal/loader/NativeLibraries$Unloader +instanceKlass java/io/FileOutputStream$1 +instanceKlass java/lang/Shutdown$Lock +instanceKlass java/lang/Shutdown +instanceKlass java/io/DeleteOnExitHook$1 +instanceKlass java/io/DeleteOnExitHook +instanceKlass sun/net/www/protocol/jar/JarFileFactory +instanceKlass sun/net/www/protocol/jar/URLJarFile$URLJarFileCloseController +instanceKlass sun/security/provider/AbstractDrbg$NonceProvider +instanceKlass @bci sun/security/provider/AbstractDrbg$SeederHolder ()V 42 member ; # sun/security/provider/AbstractDrbg$SeederHolder$$Lambda$7+0x0000000800c584d0 +instanceKlass @cpi sun/security/provider/AbstractDrbg$SeederHolder 98 form vmentry ; # java/lang/invoke/LambdaForm$DMH+0x0000000800c10000 +# instanceKlass java/lang/invoke/LambdaForm$DMH+0x0000000800c09c00 +instanceKlass sun/nio/fs/BasicFileAttributesHolder +instanceKlass sun/nio/fs/WindowsDirectoryStream$WindowsDirectoryIterator +instanceKlass sun/nio/fs/WindowsDirectoryStream +instanceKlass java/nio/file/DirectoryStream +instanceKlass java/nio/file/Files$AcceptAllFilter +instanceKlass java/nio/file/DirectoryStream$Filter +instanceKlass java/net/NetworkInterface$1 +instanceKlass java/net/DefaultInterface +instanceKlass java/net/Inet6Address$Inet6AddressHolder +instanceKlass java/net/InetAddress$PlatformResolver +instanceKlass java/net/spi/InetAddressResolver +instanceKlass java/net/spi/InetAddressResolver$LookupPolicy +instanceKlass java/net/Inet4AddressImpl +instanceKlass java/net/Inet6AddressImpl +instanceKlass java/net/InetAddressImpl +instanceKlass java/net/InetAddressImplFactory +instanceKlass java/util/concurrent/ConcurrentSkipListMap$Node +instanceKlass java/util/concurrent/ConcurrentSkipListMap$Index +instanceKlass java/util/concurrent/ConcurrentNavigableMap +instanceKlass java/net/InetAddress$InetAddressHolder +instanceKlass java/net/InetAddress$1 +instanceKlass jdk/internal/access/JavaNetInetAddressAccess +instanceKlass java/net/InetAddress +instanceKlass java/net/InterfaceAddress +instanceKlass java/net/NetworkInterface +instanceKlass java/lang/constant/DynamicConstantDesc +instanceKlass java/lang/constant/DirectMethodHandleDesc$1 +instanceKlass java/lang/constant/DirectMethodHandleDescImpl$1 +instanceKlass java/lang/constant/DirectMethodHandleDescImpl +instanceKlass java/lang/constant/DirectMethodHandleDesc +instanceKlass java/lang/constant/MethodHandleDesc$1 +instanceKlass java/lang/constant/MethodHandleDesc +instanceKlass java/lang/constant/MethodTypeDescImpl +instanceKlass java/lang/constant/MethodTypeDesc +instanceKlass java/lang/constant/ReferenceClassDescImpl +instanceKlass java/lang/constant/ConstantUtils +instanceKlass java/lang/constant/ClassDesc +instanceKlass java/lang/constant/ConstantDescs +instanceKlass java/lang/invoke/VarHandle$1 +instanceKlass java/lang/invoke/VarHandle$TypesAndInvokers +instanceKlass java/lang/invoke/VarHandle$AccessDescriptor +instanceKlass java/lang/invoke/VarForm +instanceKlass java/lang/invoke/VarHandleGuards +instanceKlass java/lang/ClassValue$Version +instanceKlass java/lang/ClassValue$Identity +instanceKlass java/lang/ClassValue +instanceKlass java/lang/invoke/VarHandles +instanceKlass sun/security/provider/ByteArrayAccess$BE +instanceKlass sun/security/provider/ByteArrayAccess +instanceKlass java/util/Collections$UnmodifiableCollection$1 +instanceKlass java/util/concurrent/ConcurrentHashMap$MapEntry +instanceKlass java/util/Collections$SynchronizedCollection +instanceKlass java/util/Properties$EntrySet +instanceKlass sun/security/provider/SeedGenerator$1 +instanceKlass sun/security/util/MessageDigestSpi2 +instanceKlass sun/security/jca/GetInstance$Instance +instanceKlass sun/security/jca/GetInstance +instanceKlass java/security/MessageDigestSpi +instanceKlass sun/security/provider/SeedGenerator +instanceKlass sun/security/provider/AbstractDrbg$SeederHolder +instanceKlass java/security/DrbgParameters$NextBytes +instanceKlass @bci sun/security/provider/AbstractDrbg ()V 12 argL0 ; # sun/security/provider/AbstractDrbg$$Lambda$6+0x0000000800c50b18 +instanceKlass @cpi sun/security/provider/AbstractDrbg 396 form vmentry ; # java/lang/invoke/LambdaForm$DMH+0x0000000800c09800 +# instanceKlass java/lang/invoke/LambdaForm$DMH+0x0000000800c09400 +instanceKlass sun/security/provider/EntropySource +instanceKlass sun/security/provider/AbstractDrbg +instanceKlass java/security/DrbgParameters$Instantiation +instanceKlass java/security/DrbgParameters +instanceKlass sun/security/provider/MoreDrbgParameters +instanceKlass @bci sun/security/provider/DRBG (Ljava/security/SecureRandomParameters;)V 26 argL0 ; # sun/security/provider/DRBG$$Lambda$5+0x0000000800c4f6a8 +instanceKlass jdk/internal/org/objectweb/asm/ClassReader +# instanceKlass java/lang/invoke/LambdaForm$MH+0x0000000800c09000 +instanceKlass java/security/SecureRandomSpi +instanceKlass java/security/SecureRandomParameters +instanceKlass java/util/Collections$EmptyIterator +instanceKlass java/util/LinkedHashMap$LinkedHashIterator +instanceKlass sun/security/util/SecurityProviderConstants +instanceKlass java/security/Provider$UString +instanceKlass java/security/Provider$Service +instanceKlass sun/security/provider/NativePRNG$NonBlocking +instanceKlass sun/security/provider/NativePRNG$Blocking +instanceKlass sun/security/provider/NativePRNG +instanceKlass sun/security/provider/SunEntries$1 +instanceKlass sun/security/provider/SunEntries +instanceKlass sun/security/util/SecurityConstants +instanceKlass java/util/AbstractList$Itr +instanceKlass sun/security/jca/ProviderList$2 +instanceKlass jdk/internal/math/FloatingDecimal$ASCIIToBinaryBuffer +instanceKlass jdk/internal/math/FloatingDecimal$PreparedASCIIToBinaryBuffer +instanceKlass jdk/internal/math/FloatingDecimal$ASCIIToBinaryConverter +instanceKlass jdk/internal/math/FloatingDecimal$BinaryToASCIIBuffer +instanceKlass jdk/internal/math/FloatingDecimal$ExceptionalBinaryToASCIIBuffer +instanceKlass jdk/internal/math/FloatingDecimal$BinaryToASCIIConverter +instanceKlass jdk/internal/math/FloatingDecimal +instanceKlass java/security/Provider$EngineDescription +instanceKlass java/security/Provider$ServiceKey +instanceKlass sun/security/jca/ProviderConfig +instanceKlass sun/security/jca/ProviderList +instanceKlass sun/security/jca/Providers +instanceKlass java/util/Random +instanceKlass java/util/random/RandomGenerator +instanceKlass java/io/File$TempDirectory +instanceKlass java/net/URLClassLoader$2 +instanceKlass jdk/internal/jimage/ImageLocation +instanceKlass jdk/internal/jimage/decompressor/Decompressor +instanceKlass jdk/internal/jimage/ImageStringsReader +instanceKlass jdk/internal/jimage/ImageStrings +instanceKlass jdk/internal/jimage/ImageHeader +instanceKlass jdk/internal/jimage/NativeImageBuffer$1 +instanceKlass jdk/internal/jimage/NativeImageBuffer +instanceKlass jdk/internal/jimage/BasicImageReader$1 +instanceKlass jdk/internal/jimage/BasicImageReader +instanceKlass jdk/internal/jimage/ImageReader +instanceKlass jdk/internal/jimage/ImageReaderFactory$1 +instanceKlass java/nio/file/FileSystems$DefaultFileSystemHolder$1 +instanceKlass java/nio/file/FileSystems$DefaultFileSystemHolder +instanceKlass java/nio/file/FileSystems +instanceKlass java/nio/file/Paths +instanceKlass jdk/internal/jimage/ImageReaderFactory +instanceKlass jdk/internal/module/SystemModuleFinders$SystemImage +instanceKlass jdk/internal/module/SystemModuleFinders$SystemModuleReader +instanceKlass java/lang/module/ModuleReader +instanceKlass jdk/internal/loader/BuiltinClassLoader$5 +instanceKlass jdk/internal/loader/BuiltinClassLoader$2 +instanceKlass jdk/internal/module/Resources +instanceKlass org/fusesource/hawtjni/runtime/Library +instanceKlass org/fusesource/jansi/internal/CLibrary +instanceKlass java/util/TreeMap$Entry +instanceKlass java/lang/ProcessEnvironment$CheckedEntry +instanceKlass java/lang/ProcessEnvironment$CheckedEntrySet$1 +instanceKlass java/lang/ProcessEnvironment$EntryComparator +instanceKlass java/lang/ProcessEnvironment$NameComparator +instanceKlass org/fusesource/jansi/AnsiConsole +instanceKlass org/fusesource/jansi/Ansi$1 +instanceKlass java/util/concurrent/Callable +instanceKlass org/fusesource/jansi/Ansi +instanceKlass org/apache/maven/shared/utils/logging/LoggerLevelRenderer +instanceKlass org/apache/maven/shared/utils/logging/MessageUtils +instanceKlass @bci jdk/internal/reflect/DirectMethodHandleAccessor invokeImpl (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object; 72 ; # java/lang/invoke/LambdaForm$MH+0x0000000800c08c00 +# instanceKlass java/lang/invoke/LambdaForm$MH+0x0000000800c08800 +# instanceKlass java/lang/invoke/LambdaForm$MH+0x0000000800c08400 +# instanceKlass java/lang/invoke/LambdaForm$MH+0x0000000800c08000 +# instanceKlass java/lang/invoke/LambdaForm$MH+0x0000000800c07c00 +instanceKlass sun/invoke/util/ValueConversions$WrapperCache +# instanceKlass java/lang/invoke/LambdaForm$MH+0x0000000800c07800 +# instanceKlass java/lang/invoke/LambdaForm$DMH+0x0000000800c07400 +instanceKlass sun/invoke/util/VerifyAccess$1 +instanceKlass jdk/internal/reflect/MethodHandleAccessorFactory$LazyStaticHolder +instanceKlass java/util/regex/Pattern$TreeInfo +instanceKlass @bci java/util/regex/Pattern negate (Ljava/util/regex/Pattern$CharPredicate;)Ljava/util/regex/Pattern$CharPredicate; 1 member ; # java/util/regex/Pattern$$Lambda$20+0x800000030 +instanceKlass @bci java/util/regex/Pattern Range (II)Ljava/util/regex/Pattern$CharPredicate; 23 member ; # java/util/regex/Pattern$$Lambda$19+0x800000029 +instanceKlass @bci java/util/regex/Pattern union (Ljava/util/regex/Pattern$CharPredicate;Ljava/util/regex/Pattern$CharPredicate;Z)Ljava/util/regex/Pattern$CharPredicate; 6 member ; # java/util/regex/Pattern$$Lambda$21+0x800000031 +instanceKlass @bci sun/security/provider/AbstractDrbg ()V 12 form vmentry ; # java/lang/invoke/LambdaForm$MH+0x0000000800c07000 +instanceKlass java/lang/invoke/MethodHandles$Lookup$ClassDefiner +instanceKlass java/lang/invoke/MethodHandles$Lookup$ClassFile +instanceKlass jdk/internal/org/objectweb/asm/Handler +instanceKlass jdk/internal/org/objectweb/asm/Attribute +instanceKlass jdk/internal/org/objectweb/asm/FieldVisitor +instanceKlass java/lang/invoke/InvokerBytecodeGenerator$ClassData +instanceKlass jdk/internal/org/objectweb/asm/AnnotationVisitor +instanceKlass jdk/internal/org/objectweb/asm/Frame +instanceKlass jdk/internal/org/objectweb/asm/Label +instanceKlass jdk/internal/org/objectweb/asm/MethodVisitor +instanceKlass java/lang/invoke/LambdaFormBuffer +instanceKlass java/lang/invoke/LambdaFormEditor$TransformKey +instanceKlass java/lang/invoke/LambdaFormEditor +instanceKlass sun/invoke/util/Wrapper$1 +instanceKlass java/lang/invoke/DelegatingMethodHandle$Holder +instanceKlass java/lang/invoke/DirectMethodHandle$2 +instanceKlass java/lang/invoke/ClassSpecializer$Factory +instanceKlass java/lang/invoke/ClassSpecializer$SpeciesData +instanceKlass java/lang/invoke/ClassSpecializer$1 +instanceKlass java/lang/invoke/ClassSpecializer +instanceKlass sun/invoke/empty/Empty +instanceKlass sun/invoke/util/VerifyType +instanceKlass @bci java/util/regex/CharPredicates ASCII_DIGIT ()Ljava/util/regex/Pattern$BmpCharPredicate; 0 argL0 ; # java/util/regex/CharPredicates$$Lambda$16+0x800000024 +instanceKlass java/lang/invoke/LambdaProxyClassArchive +instanceKlass jdk/internal/org/objectweb/asm/ByteVector +instanceKlass jdk/internal/org/objectweb/asm/Symbol +instanceKlass jdk/internal/org/objectweb/asm/SymbolTable +instanceKlass jdk/internal/org/objectweb/asm/ClassVisitor +instanceKlass java/lang/invoke/InfoFromMemberName +instanceKlass java/lang/invoke/MethodHandleInfo +instanceKlass jdk/internal/org/objectweb/asm/ConstantDynamic +instanceKlass sun/invoke/util/BytecodeDescriptor +instanceKlass jdk/internal/org/objectweb/asm/Handle +instanceKlass jdk/internal/org/objectweb/asm/Type +instanceKlass java/lang/invoke/AbstractValidatingLambdaMetafactory +instanceKlass java/lang/invoke/MethodHandleImpl$1 +instanceKlass jdk/internal/access/JavaLangInvokeAccess +instanceKlass java/lang/invoke/Invokers$Holder +instanceKlass java/lang/invoke/BootstrapMethodInvoker +instanceKlass java/lang/invoke/InvokerBytecodeGenerator$2 +instanceKlass java/lang/invoke/InvokerBytecodeGenerator +instanceKlass java/lang/invoke/LambdaForm$Holder +instanceKlass java/lang/invoke/LambdaForm$Name +instanceKlass java/lang/invoke/Invokers +instanceKlass java/lang/invoke/MethodHandleImpl +instanceKlass sun/invoke/util/ValueConversions +instanceKlass java/lang/invoke/DirectMethodHandle$Holder +instanceKlass java/lang/invoke/LambdaForm$NamedFunction +instanceKlass sun/invoke/util/Wrapper$Format +instanceKlass java/lang/invoke/MethodTypeForm +instanceKlass java/lang/invoke/MethodType$ConcurrentWeakInternSet +instanceKlass java/lang/invoke/LambdaMetafactory +instanceKlass java/util/regex/CharPredicates +instanceKlass java/util/regex/Pattern$BitClass +instanceKlass java/util/regex/Pattern$BmpCharPredicate +instanceKlass java/util/regex/Pattern$CharPredicate +instanceKlass java/util/regex/Pattern$Node +instanceKlass java/util/regex/Pattern +instanceKlass org/apache/maven/cli/CliRequest +instanceKlass org/apache/maven/toolchain/building/ToolchainsBuildingRequest +instanceKlass org/apache/maven/building/Source +instanceKlass org/apache/maven/execution/ExecutionListener +instanceKlass org/codehaus/plexus/logging/LoggerManager +instanceKlass org/slf4j/Logger +instanceKlass org/eclipse/aether/transfer/TransferListener +instanceKlass org/apache/maven/eventspy/EventSpy$Context +instanceKlass org/codehaus/plexus/PlexusContainer +instanceKlass org/apache/maven/exception/ExceptionHandler +instanceKlass org/apache/maven/cli/MavenCli +instanceKlass java/io/FilePermissionCollection$1 +instanceKlass java/util/Properties$LineReader +instanceKlass java/security/Security$1 +instanceKlass java/security/Security +instanceKlass sun/security/util/SecurityProperties +instanceKlass sun/security/util/FilePermCompat +instanceKlass java/io/FilePermission$1 +instanceKlass jdk/internal/access/JavaIOFilePermissionAccess +instanceKlass sun/net/www/MessageHeader +instanceKlass java/net/URLConnection +instanceKlass java/net/URLClassLoader$1 +instanceKlass java/util/TreeMap$PrivateEntryIterator +instanceKlass java/io/RandomAccessFile$1 +instanceKlass java/util/TimSort +instanceKlass sun/security/action/GetBooleanAction +instanceKlass java/util/Arrays$LegacyMergeSort +instanceKlass org/codehaus/plexus/classworlds/launcher/Configurator$1 +instanceKlass java/io/FileInputStream$1 +instanceKlass org/codehaus/plexus/classworlds/launcher/ConfigurationParser$1 +instanceKlass java/net/URI$Parser +instanceKlass java/util/ArrayList$Itr +instanceKlass org/codehaus/plexus/classworlds/strategy/AbstractStrategy +instanceKlass org/codehaus/plexus/classworlds/strategy/Strategy +instanceKlass org/codehaus/plexus/classworlds/strategy/StrategyFactory +instanceKlass java/util/NavigableMap +instanceKlass java/util/SortedMap +instanceKlass java/util/NavigableSet +instanceKlass java/util/SortedSet +instanceKlass java/io/FilenameFilter +instanceKlass java/io/Reader +instanceKlass org/codehaus/plexus/classworlds/launcher/ConfigurationParser +instanceKlass org/codehaus/plexus/classworlds/ClassWorld +instanceKlass org/codehaus/plexus/classworlds/launcher/Configurator +instanceKlass org/codehaus/plexus/classworlds/launcher/ConfigurationHandler +instanceKlass java/lang/Void +instanceKlass java/lang/PublicMethods$Key +instanceKlass java/lang/PublicMethods$MethodList +instanceKlass org/codehaus/plexus/classworlds/launcher/Launcher +instanceKlass sun/security/util/Debug +instanceKlass java/security/SecureClassLoader$DebugHolder +instanceKlass java/security/Permission +instanceKlass java/security/Guard +instanceKlass java/security/PermissionCollection +instanceKlass java/security/SecureClassLoader$1 +instanceKlass java/security/SecureClassLoader$CodeSourceKey +instanceKlass java/util/zip/Checksum$1 +instanceKlass java/util/zip/CRC32 +instanceKlass java/util/zip/Checksum +instanceKlass sun/nio/ByteBuffered +instanceKlass java/lang/Package$VersionInfo +instanceKlass java/lang/NamedPackage +instanceKlass java/util/jar/Attributes$Name +instanceKlass java/util/jar/Attributes +instanceKlass jdk/internal/loader/Resource +instanceKlass java/util/zip/ZipFile$InflaterCleanupAction +instanceKlass java/util/zip/Inflater$InflaterZStreamRef +instanceKlass java/util/zip/Inflater +instanceKlass java/util/zip/ZipEntry +instanceKlass java/nio/Bits$1 +instanceKlass jdk/internal/misc/VM$BufferPool +instanceKlass java/nio/Bits +instanceKlass sun/nio/ch/DirectBuffer +instanceKlass jdk/internal/perf/PerfCounter$CoreCounters +instanceKlass jdk/internal/perf/Perf +instanceKlass jdk/internal/perf/Perf$GetPerfAction +instanceKlass jdk/internal/perf/PerfCounter +instanceKlass java/nio/file/attribute/FileTime +instanceKlass java/util/zip/ZipUtils +instanceKlass java/util/zip/ZipFile$Source$End +instanceKlass java/io/RandomAccessFile$2 +instanceKlass jdk/internal/access/JavaIORandomAccessFileAccess +instanceKlass java/io/RandomAccessFile +instanceKlass java/io/DataInput +instanceKlass java/io/DataOutput +instanceKlass sun/nio/fs/WindowsNativeDispatcher$CompletionStatus +instanceKlass sun/nio/fs/WindowsNativeDispatcher$AclInformation +instanceKlass sun/nio/fs/WindowsNativeDispatcher$Account +instanceKlass sun/nio/fs/WindowsNativeDispatcher$DiskFreeSpace +instanceKlass sun/nio/fs/WindowsNativeDispatcher$VolumeInformation +instanceKlass sun/nio/fs/WindowsNativeDispatcher$FirstStream +instanceKlass sun/nio/fs/WindowsNativeDispatcher$FirstFile +instanceKlass java/util/Enumeration +instanceKlass java/util/concurrent/ConcurrentHashMap$Traverser +instanceKlass jdk/internal/loader/NativeLibraries$3 +instanceKlass jdk/internal/loader/NativeLibraries$NativeLibraryImpl +instanceKlass jdk/internal/loader/NativeLibrary +instanceKlass java/util/ArrayDeque$DeqIterator +instanceKlass jdk/internal/loader/NativeLibraries$NativeLibraryContext$1 +instanceKlass jdk/internal/loader/NativeLibraries$NativeLibraryContext +instanceKlass jdk/internal/loader/NativeLibraries$2 +instanceKlass jdk/internal/loader/NativeLibraries$1 +instanceKlass jdk/internal/loader/NativeLibraries$LibraryPaths +instanceKlass sun/nio/fs/WindowsNativeDispatcher +instanceKlass sun/nio/fs/NativeBuffer$Deallocator +instanceKlass sun/nio/fs/NativeBuffer +instanceKlass java/lang/ThreadLocal$ThreadLocalMap +instanceKlass sun/nio/fs/NativeBuffers +instanceKlass sun/nio/fs/WindowsFileAttributes +instanceKlass java/nio/file/attribute/DosFileAttributes +instanceKlass sun/nio/fs/AbstractBasicFileAttributeView +instanceKlass sun/nio/fs/DynamicFileAttributeView +instanceKlass sun/nio/fs/WindowsFileAttributeViews +instanceKlass sun/nio/fs/Util +instanceKlass java/nio/file/attribute/BasicFileAttributeView +instanceKlass java/nio/file/attribute/FileAttributeView +instanceKlass java/nio/file/attribute/AttributeView +instanceKlass java/nio/file/Files +instanceKlass java/nio/file/CopyOption +instanceKlass java/nio/file/attribute/BasicFileAttributes +instanceKlass sun/nio/fs/WindowsPath +instanceKlass java/nio/file/Path +instanceKlass java/nio/file/Watchable +instanceKlass java/util/zip/ZipFile$Source$Key +instanceKlass sun/nio/fs/WindowsPathParser$Result +instanceKlass sun/nio/fs/WindowsPathParser +instanceKlass java/util/Collections$UnmodifiableCollection +instanceKlass java/util/Arrays$ArrayItr +instanceKlass java/nio/file/FileSystem +instanceKlass java/nio/file/OpenOption +instanceKlass java/nio/file/spi/FileSystemProvider +instanceKlass sun/nio/fs/DefaultFileSystemProvider +instanceKlass java/util/zip/ZipFile$Source +instanceKlass java/lang/ref/Cleaner$Cleanable +instanceKlass jdk/internal/ref/CleanerImpl +instanceKlass java/lang/ref/Cleaner$1 +instanceKlass java/lang/ref/Cleaner +instanceKlass jdk/internal/ref/CleanerFactory$1 +instanceKlass java/util/concurrent/ThreadFactory +instanceKlass jdk/internal/ref/CleanerFactory +instanceKlass java/util/zip/ZipCoder +instanceKlass java/util/zip/ZipFile$CleanableResource +instanceKlass java/lang/Runtime$Version +instanceKlass java/util/jar/JavaUtilJarAccessImpl +instanceKlass jdk/internal/access/JavaUtilJarAccess +instanceKlass java/nio/charset/CoderResult +instanceKlass java/lang/Readable +instanceKlass jdk/internal/loader/FileURLMapper +instanceKlass jdk/internal/loader/URLClassPath$JarLoader$1 +instanceKlass java/util/zip/ZipFile$1 +instanceKlass jdk/internal/access/JavaUtilZipFileAccess +instanceKlass java/util/zip/ZipFile +instanceKlass java/util/zip/ZipConstants +instanceKlass jdk/internal/loader/URLClassPath$Loader +instanceKlass jdk/internal/loader/URLClassPath$3 +instanceKlass java/security/PrivilegedExceptionAction +instanceKlass sun/net/util/URLUtil +instanceKlass java/lang/StringCoding +instanceKlass sun/nio/cs/ArrayDecoder +instanceKlass java/nio/charset/CharsetDecoder +instanceKlass sun/launcher/LauncherHelper +instanceKlass jdk/internal/vm/PostVMInitHook$1 +instanceKlass jdk/internal/util/EnvUtils +instanceKlass jdk/internal/vm/PostVMInitHook$2 +instanceKlass sun/util/locale/LocaleUtils +instanceKlass sun/util/locale/BaseLocale +instanceKlass java/util/Locale +instanceKlass jdk/internal/vm/PostVMInitHook +instanceKlass java/lang/reflect/Array +instanceKlass java/lang/invoke/StringConcatFactory$3 +instanceKlass java/lang/invoke/StringConcatFactory$2 +instanceKlass java/lang/invoke/StringConcatFactory$1 +instanceKlass java/lang/invoke/StringConcatFactory +instanceKlass java/lang/ModuleLayer$Controller +instanceKlass java/util/concurrent/CopyOnWriteArrayList +instanceKlass jdk/internal/module/ServicesCatalog$ServiceProvider +instanceKlass jdk/internal/loader/AbstractClassLoaderValue$Memoizer +instanceKlass java/util/ImmutableCollections$ListItr +instanceKlass java/util/ListIterator +instanceKlass java/lang/ModuleLayer +instanceKlass jdk/internal/module/ModuleLoaderMap$Modules +instanceKlass jdk/internal/module/ModuleLoaderMap$Mapper +instanceKlass jdk/internal/module/ModuleLoaderMap +instanceKlass java/util/AbstractMap$1$1 +instanceKlass java/lang/module/ResolvedModule +instanceKlass java/lang/module/Configuration +instanceKlass jdk/internal/loader/BuiltinClassLoader$LoadedModule +instanceKlass jdk/internal/loader/AbstractClassLoaderValue +instanceKlass jdk/internal/module/ServicesCatalog +instanceKlass java/util/Deque +instanceKlass java/util/Queue +instanceKlass sun/net/util/IPAddressUtil +instanceKlass java/net/URLStreamHandler +instanceKlass java/util/HexFormat +instanceKlass sun/net/www/ParseUtil +instanceKlass java/net/URL$3 +instanceKlass jdk/internal/access/JavaNetURLAccess +instanceKlass java/net/URL$DefaultFactory +instanceKlass java/net/URLStreamHandlerFactory +instanceKlass jdk/internal/loader/URLClassPath +instanceKlass java/security/Principal +instanceKlass java/security/ProtectionDomain$Key +instanceKlass java/security/ProtectionDomain$JavaSecurityAccessImpl +instanceKlass jdk/internal/access/JavaSecurityAccess +instanceKlass java/lang/ClassLoader$ParallelLoaders +instanceKlass java/security/cert/Certificate +instanceKlass jdk/internal/loader/ArchivedClassLoaders +instanceKlass java/util/concurrent/ConcurrentHashMap$CollectionView +instanceKlass jdk/internal/loader/ClassLoaderHelper +instanceKlass jdk/internal/loader/NativeLibraries +instanceKlass jdk/internal/loader/BootLoader +instanceKlass java/util/Optional +instanceKlass jdk/internal/module/SystemModuleFinders$SystemModuleFinder +instanceKlass java/lang/module/ModuleFinder +instanceKlass jdk/internal/module/SystemModuleFinders$3 +instanceKlass jdk/internal/module/ModuleHashes$HashSupplier +instanceKlass jdk/internal/module/SystemModuleFinders$2 +instanceKlass java/util/function/Supplier +instanceKlass java/lang/module/ModuleReference +instanceKlass jdk/internal/module/ModuleResolution +instanceKlass java/util/Collections$UnmodifiableMap +instanceKlass jdk/internal/module/ModuleHashes$Builder +instanceKlass jdk/internal/module/ModuleHashes +instanceKlass jdk/internal/module/ModuleTarget +instanceKlass java/util/ImmutableCollections$Set12$1 +instanceKlass java/lang/Enum +instanceKlass java/lang/module/ModuleDescriptor$Version +instanceKlass java/lang/module/ModuleDescriptor$Provides +instanceKlass java/lang/module/ModuleDescriptor$Opens +instanceKlass java/util/ImmutableCollections$SetN$SetNIterator +instanceKlass java/lang/module/ModuleDescriptor$Exports +instanceKlass java/lang/module/ModuleDescriptor$Requires +instanceKlass jdk/internal/module/Builder +instanceKlass jdk/internal/module/SystemModules$default +instanceKlass jdk/internal/module/SystemModules +instanceKlass jdk/internal/module/SystemModulesMap +instanceKlass java/net/URI$1 +instanceKlass jdk/internal/access/JavaNetUriAccess +instanceKlass java/net/URI +instanceKlass jdk/internal/module/SystemModuleFinders +instanceKlass jdk/internal/module/ArchivedModuleGraph +instanceKlass jdk/internal/module/ArchivedBootLayer +instanceKlass jdk/internal/module/ModuleBootstrap$Counters +instanceKlass jdk/internal/module/ModulePatcher +instanceKlass java/io/FileSystem +instanceKlass java/io/DefaultFileSystem +instanceKlass java/io/File +instanceKlass java/lang/module/ModuleDescriptor$1 +instanceKlass jdk/internal/access/JavaLangModuleAccess +instanceKlass sun/invoke/util/VerifyAccess +instanceKlass java/util/KeyValueHolder +instanceKlass java/util/ImmutableCollections$MapN$MapNIterator +instanceKlass java/lang/invoke/MethodHandles$Lookup +instanceKlass java/lang/invoke/MemberName$Factory +instanceKlass java/lang/invoke/MethodHandles +instanceKlass java/lang/module/ModuleDescriptor +instanceKlass jdk/internal/module/ModuleBootstrap +instanceKlass sun/security/action/GetPropertyAction +instanceKlass java/lang/invoke/MethodHandleStatics +instanceKlass java/util/Collections +instanceKlass sun/io/Win32ErrorMode +instanceKlass jdk/internal/misc/OSEnvironment +instanceKlass java/lang/Integer$IntegerCache +instanceKlass jdk/internal/misc/Signal$NativeHandler +instanceKlass java/util/Hashtable$Entry +instanceKlass jdk/internal/misc/Signal +instanceKlass java/lang/Terminator$1 +instanceKlass jdk/internal/misc/Signal$Handler +instanceKlass java/lang/Terminator +instanceKlass java/nio/ByteOrder +instanceKlass java/nio/Buffer$1 +instanceKlass jdk/internal/access/JavaNioAccess +instanceKlass jdk/internal/misc/ScopedMemoryAccess +instanceKlass java/nio/charset/CodingErrorAction +instanceKlass sun/nio/cs/SingleByte +instanceKlass java/lang/StringUTF16 +instanceKlass sun/nio/cs/MS1252$Holder +instanceKlass sun/nio/cs/ArrayEncoder +instanceKlass java/nio/charset/CharsetEncoder +instanceKlass java/io/Writer +instanceKlass java/io/OutputStream +instanceKlass java/io/Flushable +instanceKlass java/io/FileDescriptor$1 +instanceKlass jdk/internal/access/JavaIOFileDescriptorAccess +instanceKlass java/io/FileDescriptor +instanceKlass jdk/internal/util/StaticProperty +instanceKlass jdk/internal/reflect/MethodHandleAccessorFactory +instanceKlass java/lang/reflect/Modifier +instanceKlass java/lang/Class$1 +instanceKlass java/lang/Class$Atomic +instanceKlass java/lang/Class$ReflectionData +instanceKlass jdk/internal/util/ArraysSupport +instanceKlass java/nio/charset/StandardCharsets +instanceKlass sun/nio/cs/HistoricallyNamedCharset +instanceKlass java/lang/ThreadLocal +instanceKlass java/nio/charset/spi/CharsetProvider +instanceKlass java/nio/charset/Charset +instanceKlass java/util/HashMap$HashIterator +instanceKlass java/util/concurrent/locks/LockSupport +instanceKlass java/util/concurrent/ConcurrentHashMap$Node +instanceKlass java/util/concurrent/ConcurrentHashMap$CounterCell +instanceKlass java/util/concurrent/locks/ReentrantLock +instanceKlass java/util/concurrent/locks/Lock +instanceKlass java/lang/CharacterData +instanceKlass java/util/Arrays +instanceKlass jdk/internal/util/Preconditions$3 +instanceKlass jdk/internal/util/Preconditions$2 +instanceKlass jdk/internal/util/Preconditions$4 +instanceKlass java/util/function/BiFunction +instanceKlass jdk/internal/util/Preconditions$1 +instanceKlass java/util/function/Function +instanceKlass jdk/internal/util/Preconditions +instanceKlass java/lang/Runtime +instanceKlass java/lang/VersionProps +instanceKlass java/lang/StringConcatHelper +instanceKlass java/util/HashMap$Node +instanceKlass java/util/Map$Entry +instanceKlass jdk/internal/misc/VM +instanceKlass jdk/internal/util/SystemProps$Raw +instanceKlass jdk/internal/util/SystemProps +instanceKlass java/lang/System$2 +instanceKlass jdk/internal/access/JavaLangAccess +instanceKlass java/lang/ref/Reference$1 +instanceKlass jdk/internal/access/JavaLangRefAccess +instanceKlass java/lang/ref/ReferenceQueue$Lock +instanceKlass java/lang/ref/ReferenceQueue +instanceKlass jdk/internal/reflect/ReflectionFactory +instanceKlass java/lang/Math +instanceKlass java/lang/StringLatin1 +instanceKlass jdk/internal/reflect/Reflection +instanceKlass jdk/internal/reflect/ReflectionFactory$GetReflectionFactoryAction +instanceKlass java/security/PrivilegedAction +instanceKlass jdk/internal/access/SharedSecrets +instanceKlass java/lang/reflect/ReflectAccess +instanceKlass jdk/internal/access/JavaLangReflectAccess +instanceKlass java/util/ImmutableCollections +instanceKlass java/util/Objects +instanceKlass java/util/Set +instanceKlass jdk/internal/misc/CDS +instanceKlass java/lang/Module$ArchivedData +instanceKlass java/lang/String$CaseInsensitiveComparator +instanceKlass java/util/Comparator +instanceKlass java/io/ObjectStreamField +instanceKlass jdk/internal/vm/vector/VectorSupport$VectorPayload +instanceKlass jdk/internal/vm/vector/VectorSupport +instanceKlass java/lang/reflect/RecordComponent +instanceKlass java/util/Iterator +instanceKlass java/lang/Number +instanceKlass java/lang/Character +instanceKlass java/lang/Boolean +instanceKlass java/util/concurrent/locks/AbstractOwnableSynchronizer +instanceKlass java/lang/LiveStackFrame +instanceKlass java/lang/StackFrameInfo +instanceKlass java/lang/StackWalker$StackFrame +instanceKlass java/lang/StackStreamFactory$AbstractStackWalker +instanceKlass java/lang/StackWalker +instanceKlass java/nio/Buffer +instanceKlass java/lang/StackTraceElement +instanceKlass java/util/RandomAccess +instanceKlass java/util/List +instanceKlass java/util/AbstractCollection +instanceKlass java/util/Collection +instanceKlass java/lang/Iterable +instanceKlass java/util/concurrent/ConcurrentMap +instanceKlass java/util/AbstractMap +instanceKlass java/security/CodeSource +instanceKlass jdk/internal/loader/ClassLoaders +instanceKlass java/util/jar/Manifest +instanceKlass java/net/URL +instanceKlass java/io/InputStream +instanceKlass java/io/Closeable +instanceKlass java/lang/AutoCloseable +instanceKlass jdk/internal/module/Modules +instanceKlass jdk/internal/misc/Unsafe +instanceKlass jdk/internal/misc/UnsafeConstants +instanceKlass java/lang/AbstractStringBuilder +instanceKlass java/lang/Appendable +instanceKlass java/lang/AssertionStatusDirectives +instanceKlass java/lang/invoke/MethodHandleNatives$CallSiteContext +instanceKlass jdk/internal/invoke/NativeEntryPoint +instanceKlass java/lang/invoke/CallSite +instanceKlass java/lang/invoke/MethodType +instanceKlass java/lang/invoke/TypeDescriptor$OfMethod +instanceKlass java/lang/invoke/LambdaForm +instanceKlass java/lang/invoke/MethodHandleNatives +instanceKlass java/lang/invoke/ResolvedMethodName +instanceKlass java/lang/invoke/MemberName +instanceKlass java/lang/invoke/VarHandle +instanceKlass java/lang/invoke/MethodHandle +instanceKlass jdk/internal/reflect/CallerSensitive +instanceKlass java/lang/annotation/Annotation +instanceKlass jdk/internal/reflect/FieldAccessor +instanceKlass jdk/internal/reflect/ConstantPool +instanceKlass jdk/internal/reflect/ConstructorAccessor +instanceKlass jdk/internal/reflect/MethodAccessor +instanceKlass jdk/internal/reflect/MagicAccessorImpl +instanceKlass java/lang/reflect/Parameter +instanceKlass java/lang/reflect/Member +instanceKlass java/lang/reflect/AccessibleObject +instanceKlass java/lang/Module +instanceKlass java/util/Map +instanceKlass java/util/Dictionary +instanceKlass java/lang/ThreadGroup +instanceKlass java/lang/Thread$UncaughtExceptionHandler +instanceKlass java/lang/Thread +instanceKlass java/lang/Runnable +instanceKlass java/lang/ref/Reference +instanceKlass java/lang/Record +instanceKlass java/security/AccessController +instanceKlass java/security/AccessControlContext +instanceKlass java/security/ProtectionDomain +instanceKlass java/lang/SecurityManager +instanceKlass java/lang/Throwable +instanceKlass java/lang/System +instanceKlass java/lang/ClassLoader +instanceKlass java/lang/Cloneable +instanceKlass java/lang/Class +instanceKlass java/lang/invoke/TypeDescriptor$OfField +instanceKlass java/lang/invoke/TypeDescriptor +instanceKlass java/lang/reflect/Type +instanceKlass java/lang/reflect/GenericDeclaration +instanceKlass java/lang/reflect/AnnotatedElement +instanceKlass java/lang/String +instanceKlass java/lang/constant/ConstantDesc +instanceKlass java/lang/constant/Constable +instanceKlass java/lang/CharSequence +instanceKlass java/lang/Comparable +instanceKlass java/io/Serializable +ciInstanceKlass java/lang/Object 1 1 94 100 1 10 12 1 1 10 7 12 1 1 1 10 100 12 1 1 1 10 12 1 1 8 1 10 12 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 100 1 8 1 10 12 1 3 8 1 100 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 100 1 1 1 1 1 1 1 100 1 1 1 1 1 1 3 1 1 +ciInstanceKlass java/io/Serializable 1 0 7 100 1 100 1 1 1 +ciInstanceKlass java/lang/System 1 1 832 10 100 12 1 1 1 9 7 12 1 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 9 12 1 1 10 7 12 1 1 1 11 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 100 1 8 1 10 12 1 10 100 12 1 1 1 10 100 12 1 1 1 18 12 1 1 10 100 12 1 1 1 100 1 10 12 1 1 10 100 12 1 1 1 10 12 1 10 7 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 11 7 12 1 1 1 10 12 1 1 10 100 12 1 1 1 100 1 10 10 12 1 1 8 1 10 12 1 8 1 10 12 1 9 12 1 1 8 1 10 7 12 1 1 1 10 12 1 1 100 1 8 1 10 9 12 1 1 8 1 10 12 1 1 10 100 12 1 1 1 8 1 10 12 1 100 1 10 12 1 8 1 10 12 1 10 12 1 1 100 1 10 12 10 12 1 9 12 1 1 9 12 1 1 10 7 12 1 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 7 12 1 1 1 10 12 1 100 1 100 1 8 1 10 12 1 10 12 1 1 7 1 10 12 1 100 1 8 1 10 10 12 1 100 1 8 1 10 8 1 10 7 12 1 1 8 1 10 12 100 1 8 1 10 10 12 1 1 10 100 12 1 1 1 100 1 18 12 1 100 1 9 100 12 1 1 1 10 12 1 100 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 7 1 10 12 1 9 7 12 1 1 1 10 7 12 1 1 1 10 12 1 10 12 1 10 7 12 1 1 1 100 1 8 1 10 9 12 1 9 12 1 10 12 1 10 100 12 1 1 10 12 1 10 12 1 1 8 1 10 12 1 1 8 1 11 12 1 10 12 11 12 1 1 11 7 12 1 1 1 11 7 12 1 1 11 12 1 1 7 1 11 12 1 10 12 1 8 1 10 12 1 1 8 1 8 1 8 1 8 1 11 12 1 10 12 1 10 12 1 10 12 1 8 1 10 12 1 1 8 1 9 12 1 8 1 10 7 12 1 1 8 1 7 1 9 7 12 1 1 1 10 12 1 7 1 9 12 10 9 12 7 1 10 12 8 1 10 12 1 10 12 1 1 8 1 10 7 12 1 1 10 12 1 10 7 12 1 1 1 10 12 1 1 10 7 12 1 1 1 10 12 10 7 12 1 1 1 9 12 1 1 100 1 8 1 10 12 1 1 10 7 12 1 1 1 7 1 10 12 1 1 8 1 10 8 1 8 1 8 1 8 1 10 10 7 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 100 12 1 1 1 10 100 1 8 1 10 10 10 12 1 1 10 12 1 1 8 1 10 12 1 8 1 8 1 10 12 1 10 12 1 1 7 1 10 10 12 1 10 12 1 9 12 1 1 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 100 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 15 10 100 12 1 1 1 16 15 10 12 1 1 16 15 10 12 16 1 1 1 1 1 1 1 100 1 100 1 1 +staticfield java/lang/System in Ljava/io/InputStream; java/io/BufferedInputStream +staticfield java/lang/System out Ljava/io/PrintStream; org/fusesource/jansi/AnsiPrintStream +staticfield java/lang/System err Ljava/io/PrintStream; org/fusesource/jansi/AnsiPrintStream +instanceKlass java/security/Provider +ciInstanceKlass java/util/Properties 1 1 690 10 7 12 1 1 1 100 1 10 7 12 1 1 7 1 10 12 1 9 12 1 1 9 12 1 1 9 12 1 1 10 7 12 1 1 1 10 12 1 1 8 1 10 7 12 1 1 1 7 1 10 12 1 10 12 1 1 8 1 10 12 1 7 1 10 12 10 12 1 1 9 12 1 1 10 12 1 1 7 1 10 12 1 10 12 1 10 12 1 1 100 1 8 1 10 12 1 10 12 1 10 12 1 1 10 12 1 100 1 3 10 10 100 12 1 1 1 10 12 1 10 12 1 1 8 1 10 12 1 10 12 1 1 8 1 10 100 12 1 1 10 12 1 1 10 12 1 10 12 1 1 100 1 10 12 1 10 12 1 1 100 1 9 100 12 1 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 100 1 9 12 1 1 7 1 100 1 10 12 1 100 1 11 7 12 1 1 1 11 12 1 1 11 100 12 1 1 1 11 7 12 1 1 1 11 12 1 1 11 12 1 11 12 1 10 12 1 1 8 1 10 12 1 10 100 12 1 1 10 12 1 100 1 10 10 12 1 10 12 1 100 1 10 10 12 1 1 10 100 12 1 1 9 100 12 1 1 10 12 1 1 10 100 12 1 1 1 100 1 100 1 100 1 10 8 1 8 1 10 12 1 10 12 1 10 12 1 1 10 10 12 1 1 10 12 1 1 7 1 10 10 12 1 11 7 12 1 1 10 7 12 1 1 1 8 1 10 100 12 1 1 11 11 7 1 8 1 10 100 1 11 10 12 1 10 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 10 12 1 10 12 1 10 12 1 10 10 12 1 1 10 12 1 1 10 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 10 11 12 1 4 11 10 12 1 1 10 100 12 1 1 11 12 1 10 12 1 1 10 100 12 1 1 10 12 1 100 1 8 1 10 12 1 10 10 100 12 1 1 1 100 1 6 0 10 12 1 1 11 100 12 1 1 1 10 12 1 10 12 1 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 100 1 1 +staticfield java/util/Properties UNSAFE Ljdk/internal/misc/Unsafe; jdk/internal/misc/Unsafe +instanceKlass java/util/Hashtable +ciInstanceKlass java/util/Dictionary 1 1 36 10 7 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/util/Properties +ciInstanceKlass java/util/Hashtable 1 1 512 100 1 10 7 12 1 1 1 9 7 12 1 1 1 100 1 100 1 10 8 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 7 12 1 1 1 8 1 10 12 1 9 12 1 1 7 1 9 12 1 1 4 10 7 12 1 1 1 9 12 1 4 10 12 1 11 100 12 1 1 1 10 12 1 1 10 12 1 1 9 12 1 10 12 1 1 100 1 10 9 12 1 1 10 7 12 1 1 1 9 12 1 1 10 12 1 10 12 1 3 9 12 1 9 12 1 3 10 12 1 10 12 1 10 12 1 1 11 12 1 1 11 100 12 1 1 1 11 100 12 1 1 1 11 12 1 100 1 11 12 1 11 12 1 10 12 1 1 10 12 1 1 10 12 1 9 12 1 1 9 12 9 12 1 1 10 100 1 100 1 10 12 1 10 8 1 10 10 12 1 8 1 10 8 1 10 100 12 1 1 1 100 1 10 12 1 10 12 1 100 1 10 12 1 10 12 1 1 100 1 10 100 1 10 10 12 1 1 11 12 1 1 11 12 1 100 1 10 10 10 100 12 1 1 11 100 12 1 1 1 100 1 10 11 100 12 1 1 11 100 12 1 10 12 1 10 12 1 1 10 100 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 8 10 100 12 1 1 100 1 8 1 10 4 10 12 4 10 12 1 8 1 10 12 10 100 12 1 1 1 100 1 11 100 12 1 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 10 100 1 100 1 1 1 1 1 1 5 0 1 1 1 1 1 3 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 100 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/String 1 1 1399 10 7 12 1 1 1 8 1 9 7 12 1 1 1 9 12 1 1 9 12 1 1 9 12 1 1 10 12 1 10 12 1 1 10 12 1 1 9 12 1 10 7 12 1 1 1 10 7 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 7 12 1 1 1 9 7 12 1 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 9 7 12 1 1 10 12 9 7 12 1 1 3 10 7 12 1 1 1 7 1 11 12 1 1 11 12 1 11 12 1 1 10 100 12 1 1 1 10 12 1 1 9 100 12 1 1 1 10 12 1 1 10 12 1 11 12 1 1 10 12 1 1 10 12 10 12 1 1 10 100 12 1 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 1 100 1 10 12 1 1 100 1 100 1 10 12 1 1 10 12 1 1 10 12 1 100 1 100 1 100 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 100 1 11 10 12 1 10 12 11 12 1 11 12 1 10 12 1 1 10 12 1 1 10 10 100 12 1 1 1 10 100 12 1 1 10 12 1 1 10 100 12 1 1 10 12 1 10 12 1 1 10 12 1 100 1 10 10 12 1 1 10 12 1 10 12 1 10 12 1 1 100 1 10 12 1 1 10 12 10 12 1 10 12 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 3 3 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 100 1 10 8 1 10 12 1 1 10 12 1 8 1 10 12 1 1 10 12 10 12 1 8 1 10 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 10 100 1 10 10 12 1 10 12 1 10 12 1 10 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 100 1 10 10 12 1 1 10 12 1 10 12 1 1 10 10 12 1 1 10 10 12 1 100 1 10 10 12 1 1 10 12 1 1 10 100 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 11 7 1 11 12 10 12 1 10 12 1 1 10 12 1 1 10 10 12 1 10 12 1 9 12 1 1 11 7 12 1 1 1 10 10 12 1 10 12 1 1 10 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 10 12 1 1 10 12 10 10 12 1 10 12 10 10 12 10 10 12 1 10 12 1 10 12 10 10 12 10 12 1 10 12 10 12 10 10 12 1 10 12 1 1 10 12 1 10 10 12 1 10 7 12 1 1 1 10 12 1 1 10 10 100 12 1 1 1 11 10 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 10 10 12 1 10 12 1 10 12 1 10 100 12 1 1 10 12 1 100 1 100 1 8 1 10 10 10 12 1 8 1 10 12 1 3 3 100 1 10 10 12 1 10 12 1 10 12 1 1 10 12 1 1 11 100 12 1 1 1 100 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 8 1 10 12 1 1 10 12 1 11 100 12 1 1 1 11 100 12 1 1 11 12 1 1 10 12 1 10 12 1 1 10 10 7 12 1 1 1 10 12 1 10 12 1 10 10 12 10 12 1 1 10 10 12 1 10 10 12 1 10 10 12 1 10 10 12 1 10 12 1 1 10 10 12 1 8 1 10 12 1 1 18 12 1 1 11 100 12 1 1 1 100 1 3 18 12 1 18 12 1 8 1 10 100 12 1 1 1 11 12 1 1 10 12 10 10 12 1 10 11 12 1 1 10 12 1 1 11 12 1 18 3 11 10 12 1 11 11 10 12 1 10 12 1 1 8 1 10 12 1 10 12 1 10 12 1 1 10 10 12 1 11 100 12 1 100 1 100 1 10 12 1 100 1 10 10 100 12 1 1 1 100 1 10 100 1 10 10 12 1 10 10 12 1 8 1 10 10 12 1 8 1 8 1 10 12 1 10 12 1 10 10 12 10 100 12 1 1 10 100 12 1 1 10 100 12 1 1 8 1 10 12 1 10 12 1 1 10 10 12 9 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 8 1 10 100 12 1 1 1 10 12 10 12 1 1 10 12 10 10 12 10 12 7 1 9 12 1 1 7 1 10 100 1 100 1 100 1 100 1 1 1 1 1 1 5 0 1 1 1 1 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 10 100 12 1 1 1 16 15 10 12 16 15 10 12 15 10 12 15 10 12 1 1 1 1 100 1 100 1 1 1 +staticfield java/lang/String COMPACT_STRINGS Z 1 +staticfield java/lang/String serialPersistentFields [Ljava/io/ObjectStreamField; 0 [Ljava/io/ObjectStreamField; +staticfield java/lang/String CASE_INSENSITIVE_ORDER Ljava/util/Comparator; java/lang/String$CaseInsensitiveComparator +ciInstanceKlass java/util/Iterator 1 1 53 100 1 8 1 10 12 1 1 10 100 12 1 1 1 11 100 12 1 1 1 11 12 1 1 11 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/util/zip/ZipFile$ZipFileInputStream +instanceKlass java/io/FilterInputStream +instanceKlass java/io/FileInputStream +instanceKlass java/io/ByteArrayInputStream +ciInstanceKlass java/io/InputStream 1 1 184 100 1 10 7 12 1 1 1 100 1 10 10 7 12 1 1 1 10 7 12 1 1 1 10 12 1 100 1 3 10 12 1 1 100 1 8 1 10 12 1 10 100 12 1 1 1 3 100 1 8 1 10 10 100 12 1 1 1 100 1 10 11 100 12 1 1 1 10 12 1 1 11 12 1 1 11 100 12 1 1 1 11 12 1 1 100 1 10 100 12 1 1 1 5 0 10 12 1 10 12 1 1 100 1 10 8 1 10 8 1 8 1 10 12 1 1 10 100 12 1 1 1 100 1 1 1 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass org/apache/maven/shared/utils/logging/MessageUtils$1 +instanceKlass jdk/internal/misc/InnocuousThread +instanceKlass java/lang/ref/Finalizer$FinalizerThread +instanceKlass java/lang/ref/Reference$ReferenceHandler +ciInstanceKlass java/lang/Thread 1 1 612 9 7 12 1 1 1 9 12 1 1 10 12 1 1 9 12 1 1 9 12 1 1 100 1 8 1 10 12 1 1 3 8 1 100 1 5 0 10 12 1 1 10 7 12 1 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 100 1 8 1 10 9 12 1 1 10 7 12 1 1 1 10 100 12 1 1 1 10 10 12 1 1 10 12 1 1 10 12 1 1 9 100 12 1 1 1 10 12 1 1 10 7 12 1 1 9 12 1 1 10 12 1 1 10 12 1 1 9 12 1 10 12 1 1 9 12 1 1 10 7 12 1 1 1 9 12 1 1 9 12 1 1 10 12 1 1 10 100 12 1 1 1 9 12 1 10 12 1 1 9 12 1 100 1 10 7 1 10 8 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 9 12 1 100 1 10 10 12 1 1 10 12 1 10 12 1 100 1 11 7 12 1 1 9 100 12 1 1 1 10 12 1 10 12 1 10 12 9 12 1 1 10 12 9 12 1 10 12 1 100 1 10 10 12 1 1 9 12 1 10 12 1 11 100 12 1 1 10 12 1 10 12 1 10 12 1 10 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 100 1 10 10 12 1 10 12 1 10 12 1 9 100 12 1 1 1 10 12 1 1 10 12 1 100 1 8 1 10 10 12 1 10 12 8 1 10 12 1 8 1 10 8 1 8 1 10 100 12 1 1 10 100 12 1 1 1 100 1 8 1 10 9 12 1 9 12 1 1 10 12 1 1 10 10 12 1 1 9 12 1 10 12 1 1 100 1 10 12 11 100 12 1 1 1 9 100 12 1 1 1 9 12 1 1 10 12 1 1 100 1 10 12 1 11 100 12 1 1 1 100 1 10 12 1 10 12 1 1 11 12 1 10 12 1 100 1 10 12 1 10 12 1 1 10 100 12 1 1 1 8 1 9 12 1 10 12 1 1 11 100 12 1 1 1 10 100 12 1 1 1 11 12 1 10 12 1 7 1 1 1 1 1 3 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 100 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 100 1 1 100 1 1 1 1 1 1 +staticfield java/lang/Thread EMPTY_STACK_TRACE [Ljava/lang/StackTraceElement; 0 [Ljava/lang/StackTraceElement; +ciInstanceKlass java/lang/ThreadGroup 1 1 293 10 7 12 1 1 1 9 7 12 1 1 1 8 1 9 12 1 1 7 1 9 12 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 9 12 1 1 10 12 1 1 10 12 1 9 12 1 10 100 12 1 1 1 9 12 1 9 12 1 1 10 7 12 1 1 1 100 10 12 1 1 10 7 12 1 1 1 10 100 12 1 9 12 1 10 12 1 1 10 12 1 1 9 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 10 12 1 10 12 1 10 100 1 10 10 12 1 10 12 1 10 12 1 7 10 12 1 9 12 1 1 10 12 1 1 8 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 11 100 1 100 1 9 12 1 100 1 10 8 1 10 12 1 1 10 12 1 1 8 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 100 1 8 1 10 8 1 10 12 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass jdk/internal/misc/Unsafe 1 1 1287 10 7 12 1 1 1 9 7 12 1 1 1 9 12 1 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 100 1 10 10 12 1 1 10 12 1 1 5 0 10 12 1 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 100 1 100 1 10 8 1 10 12 1 1 10 12 1 8 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 5 0 5 0 5 0 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 100 1 8 1 10 100 1 10 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 9 7 12 1 1 9 12 1 100 1 10 10 12 1 1 8 1 10 8 1 8 1 10 12 1 1 9 7 12 1 1 1 9 100 1 9 100 1 9 100 1 9 9 100 1 9 100 1 9 100 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 5 0 5 0 9 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 8 1 3 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 100 1 10 100 1 10 9 12 1 5 0 10 12 1 1 5 0 10 12 1 5 0 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 5 0 5 0 5 0 10 12 1 1 10 12 1 10 12 1 10 12 10 100 12 1 1 8 1 100 1 11 12 1 1 8 1 11 12 1 1 10 100 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 7 1 10 12 1 9 12 1 7 1 9 12 1 7 1 9 12 1 7 1 9 12 1 7 1 9 12 1 7 1 9 12 1 7 1 9 12 1 7 1 9 12 1 7 1 9 12 1 10 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield jdk/internal/misc/Unsafe theUnsafe Ljdk/internal/misc/Unsafe; jdk/internal/misc/Unsafe +staticfield jdk/internal/misc/Unsafe ARRAY_BOOLEAN_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_BYTE_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_SHORT_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_CHAR_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_INT_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_LONG_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_FLOAT_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_DOUBLE_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_OBJECT_BASE_OFFSET I 16 +staticfield jdk/internal/misc/Unsafe ARRAY_BOOLEAN_INDEX_SCALE I 1 +staticfield jdk/internal/misc/Unsafe ARRAY_BYTE_INDEX_SCALE I 1 +staticfield jdk/internal/misc/Unsafe ARRAY_SHORT_INDEX_SCALE I 2 +staticfield jdk/internal/misc/Unsafe ARRAY_CHAR_INDEX_SCALE I 2 +staticfield jdk/internal/misc/Unsafe ARRAY_INT_INDEX_SCALE I 4 +staticfield jdk/internal/misc/Unsafe ARRAY_LONG_INDEX_SCALE I 8 +staticfield jdk/internal/misc/Unsafe ARRAY_FLOAT_INDEX_SCALE I 4 +staticfield jdk/internal/misc/Unsafe ARRAY_DOUBLE_INDEX_SCALE I 8 +staticfield jdk/internal/misc/Unsafe ARRAY_OBJECT_INDEX_SCALE I 4 +staticfield jdk/internal/misc/Unsafe ADDRESS_SIZE I 8 +instanceKlass jdk/internal/reflect/DelegatingClassLoader +instanceKlass java/security/SecureClassLoader +ciInstanceKlass java/lang/ClassLoader 1 1 1101 9 7 12 1 1 1 10 7 12 1 1 1 9 12 1 1 10 7 12 1 1 1 7 1 10 12 1 1 10 12 1 1 9 12 1 1 10 12 1 1 100 1 10 12 1 10 12 1 1 10 7 12 1 1 1 100 1 8 1 10 12 1 10 7 12 1 1 1 10 100 12 1 10 7 1 10 7 1 7 1 7 1 10 12 1 10 12 1 9 12 1 1 10 10 7 12 1 1 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 1 7 1 10 12 1 9 12 1 1 10 12 1 1 10 7 12 1 1 1 9 12 1 9 12 1 1 9 12 1 10 12 1 1 9 12 10 12 1 1 7 1 10 8 1 10 12 1 1 10 12 1 10 7 1 7 1 10 12 1 1 10 7 12 1 1 1 8 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 7 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 10 12 1 10 12 1 10 100 12 1 1 10 12 1 1 10 12 1 1 10 12 1 100 1 10 12 1 100 1 10 12 1 10 100 12 1 1 1 10 10 12 1 1 10 12 1 1 100 1 8 1 10 8 1 10 12 1 10 12 1 100 1 8 1 10 12 1 1 10 12 1 1 10 10 12 1 1 10 12 1 1 10 12 1 1 10 7 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 8 1 9 12 1 10 12 1 1 8 1 8 1 10 7 12 1 1 100 1 10 10 12 10 12 1 10 12 1 10 12 1 10 12 1 1 10 7 12 1 1 10 12 1 10 7 1 7 1 10 12 1 1 10 12 1 10 7 1 10 12 1 100 1 18 12 1 10 100 12 1 1 1 10 100 12 1 1 1 10 7 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 100 1 10 12 1 10 12 1 1 10 7 12 1 1 10 12 1 8 1 100 1 10 10 12 1 9 12 1 10 7 12 1 1 10 12 1 100 1 8 1 10 12 1 10 8 1 8 1 10 12 1 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 100 1 100 1 10 12 1 1 100 1 100 1 10 100 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 9 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 8 1 10 12 1 7 1 18 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 8 1 10 12 1 10 12 1 18 12 1 11 100 12 1 1 1 100 1 10 12 1 1 10 12 1 10 11 12 1 1 10 18 10 12 1 1 11 100 12 1 18 12 1 11 12 1 1 10 12 10 12 1 1 10 12 1 1 7 1 8 1 10 10 12 1 8 1 8 1 10 7 12 1 1 10 12 1 100 1 10 10 12 1 8 1 8 1 8 1 10 12 1 10 12 1 1 10 12 1 10 100 12 1 1 1 11 100 12 1 1 100 1 10 11 10 12 1 10 12 1 10 12 1 1 9 100 12 1 1 9 12 1 1 9 12 9 12 1 9 12 1 9 12 1 8 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 10 10 12 1 11 12 1 1 10 100 12 1 1 1 100 1 10 12 1 10 12 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 10 100 12 1 1 1 16 1 15 10 12 16 1 16 15 10 12 16 1 16 1 15 10 12 16 15 10 12 16 15 10 12 16 1 1 100 1 100 1 1 +staticfield java/lang/ClassLoader nocerts [Ljava/security/cert/Certificate; 0 [Ljava/security/cert/Certificate; +staticfield java/lang/ClassLoader $assertionsDisabled Z 1 +ciInstanceKlass java/lang/Class 1 1 1626 10 100 12 1 1 1 9 7 12 1 1 1 9 12 1 1 10 12 1 1 8 1 10 12 1 8 1 8 1 10 12 1 1 10 7 12 1 1 1 10 12 1 7 1 10 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 100 12 1 1 10 12 1 10 12 1 10 12 1 8 1 10 12 1 8 1 10 12 1 8 1 8 1 10 12 1 1 10 100 12 1 1 1 18 12 1 1 11 100 12 1 1 1 8 1 8 1 8 1 10 100 12 1 1 1 11 12 1 1 8 1 10 12 1 10 11 100 12 1 1 1 11 100 12 1 1 1 11 8 1 18 8 1 10 12 1 10 7 12 1 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 7 12 1 1 1 10 12 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 10 7 12 1 1 1 10 12 1 1 18 12 1 1 10 7 12 1 1 1 10 7 12 1 1 10 12 1 1 10 100 1 100 1 10 12 1 1 9 12 1 1 100 1 8 1 10 12 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 7 1 10 12 1 100 1 100 1 10 10 12 1 1 10 12 1 1 100 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 9 12 1 1 10 12 1 10 12 1 1 9 12 1 1 9 12 1 1 10 12 1 1 10 100 1 10 12 1 10 12 1 10 12 1 1 10 9 12 1 10 12 1 8 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 9 7 12 1 1 1 10 100 12 1 1 10 12 10 12 1 10 12 1 1 10 100 12 1 1 10 12 1 10 12 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 100 1 10 10 10 12 1 1 10 12 1 1 10 12 10 10 12 1 1 100 1 8 1 10 10 12 1 1 10 12 1 100 1 11 12 1 10 100 12 1 1 10 12 1 10 12 1 10 100 12 1 1 10 10 12 1 1 8 1 10 12 1 10 12 1 1 8 1 9 12 1 10 12 1 10 12 1 10 12 1 10 12 100 1 9 12 1 10 12 1 9 12 1 10 12 1 10 12 1 10 12 1 10 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 100 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 100 1 10 10 12 1 1 10 12 1 1 10 12 1 1 10 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 100 1 10 10 12 11 100 12 1 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 10 12 1 1 100 1 10 10 12 1 1 10 100 12 1 1 1 100 1 100 1 10 12 1 1 10 12 1 10 10 12 1 1 10 12 1 10 12 1 10 12 1 10 100 12 1 1 1 11 100 12 1 1 10 12 1 10 12 1 9 12 1 10 12 1 1 10 12 1 9 12 1 1 100 1 10 9 12 1 1 10 12 100 1 10 12 1 9 12 1 10 100 12 1 1 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 10 12 10 12 1 1 100 1 10 8 1 10 12 1 11 11 12 1 1 11 100 12 1 1 11 12 1 8 1 10 12 1 10 12 1 1 9 12 1 9 12 1 1 10 7 12 1 1 9 12 1 10 12 1 1 10 10 12 1 10 7 12 1 1 1 10 100 12 1 1 10 100 12 1 1 9 12 1 1 10 12 1 9 12 1 10 12 1 10 12 1 1 9 12 1 1 9 12 1 10 12 1 10 12 1 1 9 12 1 100 1 10 10 12 1 1 7 1 10 12 1 1 100 11 100 1 9 12 1 1 9 12 1 100 1 10 12 1 9 12 1 1 9 12 1 10 12 1 10 12 1 1 9 12 1 100 1 10 10 12 1 1 10 10 12 1 1 10 12 10 10 12 1 9 12 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 8 10 100 8 1 18 8 1 8 1 10 12 1 9 12 1 9 12 1 1 10 12 1 100 1 100 1 10 12 1 9 12 1 1 7 1 10 10 12 1 10 100 1 9 12 1 8 1 10 12 1 100 1 10 12 1 10 12 1 1 9 12 1 100 1 8 1 10 100 1 4 10 10 12 11 100 12 1 1 1 10 12 1 100 1 10 12 1 1 10 8 1 8 1 10 12 1 1 9 100 12 1 1 11 12 100 1 11 100 12 1 1 9 12 1 10 100 12 1 1 1 10 100 12 1 1 10 12 1 1 9 12 1 9 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 11 12 1 100 1 11 12 1 10 100 12 1 1 1 10 12 1 100 1 11 12 1 10 100 12 1 1 1 10 12 1 10 11 12 1 11 12 1 1 10 12 1 10 12 1 1 9 12 1 1 9 100 12 1 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 7 12 1 1 1 10 12 1 8 1 10 12 1 10 12 1 10 12 1 10 100 12 1 1 1 11 100 12 1 1 1 10 12 1 1 10 12 1 18 12 1 1 11 12 1 1 18 11 12 1 18 12 1 11 12 1 10 12 1 1 10 12 1 10 12 1 10 12 10 12 1 8 1 10 12 1 7 1 9 12 1 1 100 1 100 1 100 1 100 1 1 1 3 1 3 1 3 1 1 1 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 100 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 10 100 12 1 1 1 16 15 10 12 16 15 11 12 16 1 16 15 16 15 10 12 16 16 15 10 12 16 15 16 1 15 10 12 16 1 1 1 1 1 1 1 1 100 1 1 100 1 100 1 1 100 1 100 1 1 +staticfield java/lang/Class EMPTY_CLASS_ARRAY [Ljava/lang/Class; 0 [Ljava/lang/Class; +staticfield java/lang/Class serialPersistentFields [Ljava/io/ObjectStreamField; 0 [Ljava/io/ObjectStreamField; +ciInstanceKlass java/lang/Module 1 1 960 10 7 12 1 1 1 9 7 12 1 1 1 10 7 12 1 1 1 9 12 1 9 12 1 1 9 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 7 12 1 1 1 7 1 10 7 12 1 1 1 10 12 1 1 11 7 12 1 1 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 100 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 8 1 10 7 12 1 1 1 10 7 12 1 1 1 9 12 1 1 9 12 1 1 10 12 1 9 12 1 1 11 12 1 9 100 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 100 1 100 1 10 10 12 1 1 8 1 10 12 1 10 12 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 9 100 12 1 1 1 10 12 1 1 10 12 1 1 9 12 1 10 12 1 10 12 1 9 12 1 1 11 7 12 1 1 10 12 1 1 9 12 1 9 12 1 10 12 1 10 12 1 100 1 8 1 10 10 12 1 1 10 12 1 8 1 10 12 1 1 8 1 8 1 10 12 1 1 10 12 1 10 12 1 1 18 12 1 1 10 12 1 1 11 12 1 9 12 1 11 12 10 100 12 1 1 100 1 8 1 10 7 1 11 12 1 1 10 12 1 10 12 1 10 12 1 1 11 12 1 1 11 7 12 1 1 11 12 1 1 9 12 1 11 12 1 10 12 1 1 10 12 1 1 9 12 1 10 12 10 7 12 1 1 10 7 12 1 1 10 7 1 18 12 1 1 11 100 12 1 1 1 18 12 1 11 12 1 1 10 100 12 1 1 1 11 12 1 1 10 7 12 1 1 4 7 1 11 12 1 7 1 7 1 10 10 7 12 1 1 1 10 11 7 12 1 8 1 10 10 12 1 1 10 7 12 1 1 10 12 1 10 12 1 7 1 10 12 1 10 11 12 1 1 10 12 10 12 1 1 9 12 1 100 1 10 10 12 1 1 11 100 1 10 12 1 1 11 12 1 10 10 12 1 11 10 12 1 1 10 12 1 1 10 12 1 1 10 7 12 1 1 10 12 1 10 12 1 1 10 10 12 1 1 10 12 1 18 12 1 11 12 1 18 12 1 10 12 1 10 12 1 10 12 7 1 10 12 1 10 12 1 10 12 1 9 12 1 7 1 10 10 10 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 9 12 1 18 12 1 1 10 100 12 1 1 1 100 1 8 1 10 12 1 1 10 12 1 1 10 100 12 1 1 100 1 10 12 1 1 100 1 8 1 100 1 10 100 1 100 1 3 10 12 1 100 1 10 12 1 10 12 1 1 10 12 1 1 100 1 10 12 1 10 12 1 1 100 1 100 1 10 12 8 1 10 12 1 1 10 12 1 1 10 100 12 1 1 10 12 1 1 10 12 1 10 12 10 12 1 1 100 1 10 10 12 1 1 10 100 12 1 1 1 100 1 8 1 10 12 1 1 10 100 12 1 1 8 1 10 12 1 8 1 10 12 1 10 12 10 12 1 8 1 10 10 100 12 1 1 100 1 10 10 12 1 10 7 12 1 1 9 12 1 9 12 1 9 12 1 9 12 1 10 12 11 12 1 10 12 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 10 100 12 1 1 1 16 15 10 12 16 16 15 10 12 16 16 15 10 16 1 15 10 12 16 1 15 10 12 16 1 16 15 10 12 16 1 1 1 1 1 1 1 100 1 100 1 1 +staticfield java/lang/Module ALL_UNNAMED_MODULE Ljava/lang/Module; java/lang/Module +staticfield java/lang/Module ALL_UNNAMED_MODULE_SET Ljava/util/Set; java/util/ImmutableCollections$Set12 +staticfield java/lang/Module EVERYONE_MODULE Ljava/lang/Module; java/lang/Module +staticfield java/lang/Module EVERYONE_SET Ljava/util/Set; java/util/ImmutableCollections$Set12 +staticfield java/lang/Module $assertionsDisabled Z 1 +instanceKlass java/lang/Exception +instanceKlass java/lang/Error +ciInstanceKlass java/lang/Throwable 1 1 394 10 7 12 1 1 1 9 7 12 1 1 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 10 12 1 1 9 12 1 1 10 12 1 1 10 12 1 100 1 100 1 10 8 1 10 12 1 1 8 1 10 100 12 1 1 10 10 12 1 100 1 8 1 10 10 12 1 1 10 7 12 1 1 10 12 1 8 1 9 100 12 1 1 1 10 12 1 1 100 1 10 12 10 12 1 100 1 10 10 7 12 1 1 1 11 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 8 1 10 12 1 10 12 1 1 8 1 8 1 10 12 1 1 10 12 1 8 1 8 1 9 12 1 1 10 100 12 1 1 100 1 10 11 12 1 8 1 8 1 10 7 12 1 1 8 1 10 12 1 8 1 100 1 10 12 1 9 12 1 1 10 12 1 10 100 12 1 9 12 1 1 10 12 1 1 100 1 8 1 10 12 1 10 100 12 1 1 10 12 1 1 100 1 10 100 12 1 1 1 10 12 1 11 100 12 1 1 1 11 100 12 1 1 1 11 12 1 8 1 10 12 1 1 8 1 10 10 9 100 12 1 1 1 8 1 10 12 1 1 11 10 100 1 8 1 10 11 12 1 1 8 1 9 12 1 10 100 12 1 1 11 9 12 1 1 11 12 1 1 100 10 12 1 10 12 1 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/Throwable UNASSIGNED_STACK [Ljava/lang/StackTraceElement; 0 [Ljava/lang/StackTraceElement; +staticfield java/lang/Throwable SUPPRESSED_SENTINEL Ljava/util/List; java/util/Collections$EmptyList +staticfield java/lang/Throwable EMPTY_THROWABLE_ARRAY [Ljava/lang/Throwable; 0 [Ljava/lang/Throwable; +staticfield java/lang/Throwable $assertionsDisabled Z 1 +ciInstanceKlass java/lang/ThreadDeath 0 0 21 10 100 12 1 1 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 +instanceKlass java/lang/AssertionError +instanceKlass org/apache/maven/BuildAbort +instanceKlass java/lang/VirtualMachineError +instanceKlass java/lang/LinkageError +instanceKlass java/lang/ThreadDeath +ciInstanceKlass java/lang/Error 1 1 40 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/Boolean 1 1 151 10 7 12 1 1 1 9 7 12 1 1 1 10 12 1 1 10 12 1 8 1 10 7 12 1 1 9 12 1 1 9 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 100 1 100 1 10 12 1 1 9 100 12 1 1 9 12 10 100 12 1 1 1 10 12 1 1 8 1 10 7 12 1 1 1 9 12 1 1 100 1 100 1 100 1 1 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 +staticfield java/lang/Boolean TRUE Ljava/lang/Boolean; java/lang/Boolean +staticfield java/lang/Boolean FALSE Ljava/lang/Boolean; java/lang/Boolean +staticfield java/lang/Boolean TYPE Ljava/lang/Class; java/lang/Class +ciInstanceKlass java/lang/Character 1 1 585 7 1 100 1 100 1 9 12 1 1 8 1 9 12 1 1 100 1 9 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 9 100 12 1 1 1 10 12 1 10 12 1 1 10 12 1 1 10 7 12 1 1 10 12 1 1 3 3 3 3 3 10 12 1 1 10 12 1 3 11 100 12 1 1 1 11 12 1 1 10 12 1 1 10 12 1 1 100 1 10 10 12 1 3 10 12 1 1 10 12 1 10 12 1 1 100 1 8 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 7 12 1 1 10 10 12 1 10 10 12 1 10 12 1 1 10 12 1 10 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 10 10 12 10 10 12 1 10 10 12 1 10 10 12 1 10 10 12 1 10 10 12 1 10 10 12 1 10 10 12 1 1 10 10 12 1 10 5 0 10 12 1 10 12 1 10 10 12 1 10 10 12 1 1 10 10 12 1 10 10 12 1 9 12 1 1 100 1 10 10 12 1 10 12 1 1 3 10 100 12 1 1 1 10 12 1 10 100 12 1 1 100 1 10 10 12 1 1 10 12 1 1 10 12 1 1 8 1 10 12 1 9 100 12 1 1 1 10 12 1 10 10 12 1 10 12 1 1 10 12 1 10 10 12 1 1 10 10 12 1 1 100 1 8 1 10 12 1 1 10 7 12 1 1 1 8 1 10 12 1 1 9 12 1 1 100 1 100 1 100 1 1 1 1 3 1 3 1 3 1 3 1 1 1 1 1 3 1 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 3 1 1 3 1 1 1 1 1 3 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 +staticfield java/lang/Character TYPE Ljava/lang/Class; java/lang/Class +staticfield java/lang/Character $assertionsDisabled Z 1 +ciInstanceKlass java/lang/Float 1 1 223 7 1 100 1 10 100 12 1 1 1 10 100 12 1 1 1 4 100 1 10 12 1 1 10 12 1 1 8 1 8 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 10 4 4 4 10 7 12 1 1 9 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 3 10 12 1 1 10 12 1 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 8 1 10 7 12 1 1 1 9 12 1 1 100 1 100 1 100 1 1 1 1 1 4 1 1 1 4 1 1 3 1 3 1 3 1 3 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 100 1 100 1 1 +staticfield java/lang/Float TYPE Ljava/lang/Class; java/lang/Class +instanceKlass java/util/concurrent/atomic/Striped64 +instanceKlass java/util/concurrent/atomic/AtomicLong +instanceKlass java/util/concurrent/atomic/AtomicInteger +instanceKlass java/lang/Long +instanceKlass java/lang/Integer +instanceKlass java/lang/Short +instanceKlass java/lang/Byte +instanceKlass java/lang/Double +instanceKlass java/lang/Float +ciInstanceKlass java/lang/Number 1 1 37 10 7 12 1 1 1 10 100 12 1 1 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/Double 1 1 287 7 1 100 1 10 7 12 1 1 1 10 12 1 1 10 12 1 100 1 10 12 1 1 10 100 12 1 1 1 6 0 8 1 10 12 1 1 8 1 10 12 1 1 8 1 6 0 10 12 1 1 100 1 5 0 5 0 8 1 8 1 10 100 12 1 1 1 10 100 12 1 1 1 8 1 10 12 1 1 8 1 8 1 8 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 6 0 6 0 6 0 10 7 12 1 1 9 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 5 0 10 12 1 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 8 1 10 7 12 1 1 1 9 12 1 1 100 1 100 1 100 1 1 1 1 1 6 0 1 1 1 6 0 1 1 3 1 3 1 3 1 3 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 100 1 100 1 1 +staticfield java/lang/Double TYPE Ljava/lang/Class; java/lang/Class +ciInstanceKlass java/lang/Byte 1 1 212 7 1 100 1 10 100 12 1 1 1 9 12 1 1 8 1 9 12 1 1 100 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 9 100 12 1 1 1 10 12 1 1 100 1 100 1 10 12 1 1 8 1 10 12 1 1 8 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 8 1 8 1 10 7 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 5 0 10 12 1 1 8 1 10 7 12 1 1 1 9 12 1 1 100 1 100 1 1 1 3 1 3 1 1 1 1 3 1 3 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/Byte TYPE Ljava/lang/Class; java/lang/Class +ciInstanceKlass java/lang/Short 1 1 221 7 1 100 1 100 1 10 100 12 1 1 1 10 12 1 1 100 1 100 1 10 12 1 1 8 1 10 12 1 1 8 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 9 12 1 1 8 1 9 12 1 1 100 1 10 12 1 1 10 12 1 10 100 12 1 1 1 10 100 12 1 1 1 9 100 12 1 1 1 10 12 1 10 12 1 1 10 8 1 8 1 10 100 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 3 3 5 0 10 12 1 1 8 1 10 7 12 1 1 1 9 12 1 1 100 1 100 1 1 1 3 1 3 1 1 1 1 3 1 3 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/Short TYPE Ljava/lang/Class; java/lang/Class +ciInstanceKlass java/lang/Integer 1 1 444 7 1 100 1 7 1 7 1 10 12 1 1 9 12 1 1 9 12 1 1 10 100 12 1 1 1 10 12 1 1 10 100 12 1 1 1 10 10 12 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 10 12 1 9 12 1 1 9 12 1 100 1 8 1 10 12 1 100 1 10 12 1 8 1 10 12 1 1 10 12 1 8 1 10 12 1 8 1 10 12 1 1 3 10 12 1 1 3 10 12 1 1 10 12 1 1 10 7 12 1 1 1 11 7 1 10 12 1 1 11 10 12 1 1 8 1 10 12 1 1 8 1 100 1 10 12 1 1 10 12 1 1 5 0 8 1 10 12 1 10 12 1 10 12 1 10 12 1 1 7 1 9 12 1 1 9 12 1 1 10 12 1 10 7 1 9 12 1 10 12 1 10 12 1 10 12 1 1 10 100 12 1 1 1 100 1 100 1 10 12 1 1 10 12 1 1 8 1 8 1 10 12 1 1 8 1 8 1 8 1 8 1 8 1 8 1 10 12 1 10 12 1 5 0 3 3 3 3 10 12 1 3 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 8 1 10 7 12 1 1 1 9 12 1 1 3 3 3 3 3 3 9 12 1 1 100 1 100 1 100 1 1 1 1 1 1 1 3 1 3 1 1 5 0 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 100 1 100 1 1 +staticfield java/lang/Integer TYPE Ljava/lang/Class; java/lang/Class +staticfield java/lang/Integer digits [C 36 +staticfield java/lang/Integer DigitTens [B 100 +staticfield java/lang/Integer DigitOnes [B 100 +staticfield java/lang/Integer sizeTable [I 10 +ciInstanceKlass java/lang/Long 1 1 505 7 1 100 1 7 1 100 1 10 12 1 1 9 12 1 1 9 7 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 100 12 1 1 1 10 10 12 10 12 1 10 12 1 10 12 1 5 0 5 0 100 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 100 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 10 12 1 5 0 5 0 9 12 1 1 9 12 1 5 0 100 1 8 1 10 12 1 8 1 10 12 1 8 1 8 1 10 12 1 1 5 0 10 12 1 1 5 0 10 12 1 1 10 12 1 1 10 100 12 1 1 1 11 100 1 10 12 1 1 11 10 12 1 1 8 1 10 12 1 1 8 1 100 1 10 12 1 1 10 12 1 8 1 8 1 11 12 1 1 10 12 1 10 12 1 10 12 1 5 0 5 0 9 100 12 1 1 1 10 12 1 10 12 1 1 8 1 8 1 10 12 1 1 8 1 8 1 8 1 8 1 8 1 8 1 10 12 1 10 100 1 9 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 100 1 100 1 10 12 1 1 10 12 1 1 5 0 10 12 1 10 12 1 5 0 5 0 5 0 10 12 1 1 5 0 5 0 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 8 1 10 7 12 1 1 1 9 12 1 1 100 1 100 1 100 1 1 1 1 5 0 1 1 1 1 3 1 3 1 5 0 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 100 1 100 1 1 +staticfield java/lang/Long TYPE Ljava/lang/Class; java/lang/Class +ciInstanceKlass jdk/internal/vm/vector/VectorSupport 0 0 525 100 1 10 100 12 1 1 1 9 12 1 1 10 12 1 1 100 1 10 12 1 11 100 12 1 1 1 11 100 12 1 1 1 11 100 12 1 1 11 100 12 1 1 1 11 100 12 1 1 11 100 12 1 1 11 100 12 1 1 11 100 12 1 1 11 100 12 1 1 11 100 12 1 1 11 100 12 1 1 1 11 100 12 1 1 11 100 12 1 1 1 11 100 12 1 1 1 11 100 12 1 1 11 100 12 1 1 1 11 100 12 1 1 100 1 10 12 1 1 11 100 12 1 1 11 100 12 1 1 11 100 12 1 1 11 100 12 1 1 11 100 12 1 1 9 12 1 1 10 100 12 1 1 11 100 12 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 10 12 1 1 1 1 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass jdk/internal/vm/vector/VectorSupport$VectorShuffle +instanceKlass jdk/internal/vm/vector/VectorSupport$VectorMask +instanceKlass jdk/internal/vm/vector/VectorSupport$Vector +ciInstanceKlass jdk/internal/vm/vector/VectorSupport$VectorPayload 0 0 32 10 100 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass jdk/internal/vm/vector/VectorSupport$Vector 0 0 28 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 +ciInstanceKlass jdk/internal/vm/vector/VectorSupport$VectorMask 0 0 28 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 +ciInstanceKlass jdk/internal/vm/vector/VectorSupport$VectorShuffle 0 0 28 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 +instanceKlass java/lang/ref/PhantomReference +instanceKlass java/lang/ref/FinalReference +instanceKlass java/lang/ref/WeakReference +instanceKlass java/lang/ref/SoftReference +ciInstanceKlass java/lang/ref/Reference 1 1 195 9 7 12 1 1 1 9 7 12 1 1 10 12 1 1 10 12 1 1 9 12 1 1 10 12 1 1 9 12 1 1 9 12 1 1 100 1 10 12 1 10 7 12 1 1 10 12 1 10 12 1 1 10 12 1 9 12 1 10 12 1 1 10 12 1 10 12 1 9 12 1 100 1 100 1 10 12 1 9 12 1 9 12 1 100 1 10 10 12 1 10 10 7 12 1 1 10 7 12 1 1 1 10 12 1 1 10 7 12 1 1 7 1 8 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 7 1 10 10 7 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/ref/Reference processPendingLock Ljava/lang/Object; java/lang/Object +staticfield java/lang/ref/Reference $assertionsDisabled Z 1 +instanceKlass java/lang/invoke/LambdaFormEditor$Transform +ciInstanceKlass java/lang/ref/SoftReference 1 1 47 10 7 12 1 1 1 9 7 12 1 1 1 9 12 1 10 12 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 +instanceKlass java/lang/ClassValue$Entry +instanceKlass java/lang/invoke/MethodType$ConcurrentWeakInternSet$WeakEntry +instanceKlass java/lang/ThreadLocal$ThreadLocalMap$Entry +instanceKlass java/util/WeakHashMap$Entry +ciInstanceKlass java/lang/ref/WeakReference 1 1 31 10 7 12 1 1 1 10 12 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/lang/ref/Finalizer +ciInstanceKlass java/lang/ref/FinalReference 1 1 47 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 100 1 8 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass jdk/internal/ref/PhantomCleanable +instanceKlass jdk/internal/ref/Cleaner +ciInstanceKlass java/lang/ref/PhantomReference 1 1 39 10 100 12 1 1 1 10 7 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/ref/Finalizer 1 1 168 9 7 12 1 1 1 10 100 12 1 1 1 9 12 1 1 9 12 1 1 9 12 1 9 12 1 9 12 1 1 10 12 1 100 1 8 1 10 12 1 10 12 1 1 9 12 1 100 1 10 12 1 100 1 11 100 12 1 1 10 12 1 100 1 10 12 1 100 1 10 12 1 10 100 12 1 1 1 10 100 12 1 1 1 100 1 10 10 12 1 10 7 12 1 1 1 7 1 10 7 1 10 10 12 1 10 7 12 1 1 1 10 12 1 1 10 7 12 1 1 7 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/ref/Finalizer lock Ljava/lang/Object; java/lang/Object +staticfield java/lang/ref/Finalizer ENABLED Z 1 +staticfield java/lang/ref/Finalizer $assertionsDisabled Z 1 +instanceKlass java/lang/reflect/Executable +instanceKlass java/lang/reflect/Field +ciInstanceKlass java/lang/reflect/AccessibleObject 1 1 398 10 7 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 10 7 12 1 1 10 7 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 9 12 1 1 100 1 10 7 12 1 1 1 11 12 1 100 1 10 12 1 7 1 100 1 10 12 1 10 12 1 1 7 1 10 100 12 1 1 1 10 12 1 1 100 1 10 12 1 1 100 1 10 10 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 8 1 100 1 10 10 12 1 1 8 1 10 12 1 10 12 1 8 1 8 1 8 1 8 1 8 1 8 1 100 1 10 12 1 10 12 1 9 12 1 1 10 12 1 1 10 12 1 10 11 100 1 100 1 8 1 10 10 12 1 10 12 1 1 8 1 10 12 1 8 1 10 12 1 1 10 100 1 8 1 10 11 100 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 9 12 1 1 100 1 10 12 1 7 1 10 12 1 10 12 1 1 10 100 1 10 12 1 10 12 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 9 12 1 10 100 12 1 1 8 1 10 100 12 1 1 1 8 1 10 100 12 1 1 1 9 12 1 100 1 10 7 1 10 10 7 12 1 1 1 7 1 10 10 7 12 1 1 1 7 1 9 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/reflect/AccessibleObject reflectionFactory Ljdk/internal/reflect/ReflectionFactory; jdk/internal/reflect/ReflectionFactory +ciInstanceKlass java/lang/reflect/Method 1 1 477 9 7 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 9 12 1 1 10 12 1 1 10 12 1 1 10 100 12 1 1 10 7 12 1 1 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 9 12 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 9 12 1 9 12 1 1 100 1 8 1 10 12 1 10 12 1 9 12 1 1 8 1 10 100 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 100 1 10 12 1 1 10 12 10 7 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 100 1 10 100 12 1 1 1 10 7 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 100 12 1 1 1 10 12 1 10 8 1 10 12 1 10 12 1 100 1 8 1 8 1 8 1 10 12 1 10 12 1 1 10 12 1 1 10 10 12 1 1 10 12 1 11 100 1 10 12 1 9 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 11 7 12 1 1 1 11 12 1 9 12 1 1 10 12 1 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 9 12 1 1 10 7 12 1 1 1 10 7 12 1 1 10 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 11 100 12 1 1 1 10 100 12 1 1 1 100 1 100 1 100 1 10 12 1 10 12 1 1 10 12 1 100 1 8 1 10 12 1 10 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 8 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/lang/reflect/Constructor +instanceKlass java/lang/reflect/Method +ciInstanceKlass java/lang/reflect/Executable 1 1 548 10 7 12 1 1 1 10 100 12 1 1 1 10 7 12 1 1 1 11 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 8 1 10 10 12 1 1 10 12 1 1 10 100 12 1 1 1 18 12 1 1 11 100 12 1 1 1 8 1 8 1 8 1 10 100 12 1 1 1 11 12 1 1 100 1 8 1 8 1 10 12 1 100 1 8 1 10 12 1 8 1 11 100 12 1 1 1 100 1 11 100 12 1 1 1 11 12 1 8 1 18 8 1 10 12 1 10 12 1 1 18 8 1 10 12 1 100 1 10 12 1 10 12 1 11 12 1 10 12 1 1 8 1 8 1 10 12 1 1 10 12 1 1 10 10 12 1 100 1 10 10 12 1 10 12 1 1 10 100 12 1 1 10 12 1 10 12 1 10 12 1 1 10 100 12 1 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 8 1 10 12 1 10 12 1 3 100 1 8 1 10 12 1 10 12 1 10 10 12 1 10 12 1 1 8 1 8 1 8 1 9 12 1 10 12 1 100 1 8 1 9 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 10 12 1 100 1 10 12 1 10 12 1 1 100 1 10 100 12 1 1 1 100 1 10 100 12 1 1 1 10 12 1 1 11 100 12 1 1 10 100 12 1 1 10 100 12 1 1 1 10 12 1 1 9 12 1 10 12 1 1 10 12 1 10 12 1 1 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 9 12 1 10 10 10 10 100 12 1 1 1 10 12 1 9 12 1 10 12 1 1 9 12 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 15 10 100 12 1 1 1 16 15 16 1 16 1 15 10 12 16 1 100 1 1 100 1 100 1 1 +ciInstanceKlass java/lang/reflect/Constructor 1 1 435 10 100 12 1 1 1 10 100 12 1 1 9 7 12 1 1 1 10 12 1 1 10 12 1 1 10 100 12 1 1 9 12 1 1 10 7 12 1 1 1 9 12 1 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 1 9 12 1 100 1 8 1 10 12 1 10 12 1 9 12 1 1 10 7 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 7 1 100 1 8 1 10 10 12 1 10 12 1 10 12 1 1 10 12 1 1 100 1 10 7 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 100 12 1 1 1 10 100 12 1 1 10 12 1 1 10 12 1 10 100 12 1 1 1 8 1 10 10 12 1 100 1 8 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 11 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 8 1 9 12 1 1 10 7 12 1 1 1 10 7 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 9 100 12 1 1 10 12 1 10 12 1 10 12 1 100 1 8 1 10 10 12 1 1 10 12 1 10 10 12 1 1 10 12 1 1 10 100 12 1 1 1 11 100 12 1 1 1 10 12 1 1 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 +ciInstanceKlass java/lang/reflect/Field 1 1 442 9 7 12 1 1 1 10 12 1 1 10 100 12 1 1 1 10 100 12 1 1 9 12 1 1 10 12 1 1 10 12 1 1 10 100 12 1 1 10 7 12 1 1 1 9 12 1 1 9 12 1 9 12 1 9 12 1 1 9 12 1 1 9 12 1 9 12 1 1 9 12 1 1 100 1 8 1 10 12 1 10 12 1 9 12 1 1 9 12 1 10 12 1 10 100 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 100 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 100 1 10 100 12 1 1 100 1 10 8 1 10 12 1 1 10 12 1 1 8 1 10 12 10 12 1 8 1 8 1 10 11 100 1 9 12 1 10 12 1 1 10 12 1 1 11 100 12 1 1 1 10 12 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 1 10 12 1 10 100 12 1 1 10 12 1 10 12 1 10 12 1 9 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 10 100 12 1 1 10 12 1 1 11 100 1 10 12 1 100 1 10 100 12 1 1 1 10 100 12 1 1 1 9 12 1 10 100 12 1 1 1 11 100 12 1 1 1 10 12 1 1 10 12 1 1 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 100 1 1 +ciInstanceKlass java/lang/reflect/Parameter 0 0 226 10 100 12 1 1 1 9 100 12 1 1 1 9 12 1 1 9 12 1 1 9 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 100 1 10 10 12 1 1 11 100 12 1 1 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 8 1 8 1 10 100 12 1 1 1 10 12 1 10 12 10 12 1 8 1 10 12 1 9 12 1 1 10 12 1 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 10 12 1 10 100 12 1 1 1 10 12 1 1 11 100 12 1 1 10 100 12 1 1 100 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 9 12 1 100 1 10 11 12 1 1 11 12 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 +ciInstanceKlass java/lang/reflect/RecordComponent 0 0 196 10 100 12 1 1 1 9 100 12 1 1 1 9 12 1 1 9 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 100 12 1 1 10 100 12 1 1 9 12 1 1 10 100 12 1 1 1 11 100 12 1 1 1 10 9 100 12 1 1 1 10 100 12 1 1 1 9 12 1 1 10 100 12 1 1 1 10 12 1 1 11 100 12 1 1 10 100 12 1 1 100 1 9 12 1 9 12 1 1 9 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 100 1 10 10 12 1 10 12 1 1 8 1 10 12 1 10 12 1 9 12 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 100 1 1 +ciInstanceKlass java/lang/StringBuffer 0 0 470 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 1 9 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 1 9 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 10 12 1 1 10 12 1 1 9 12 1 1 10 100 12 1 1 1 10 100 1 10 10 100 12 1 1 1 10 10 12 1 10 8 10 100 12 1 1 1 8 10 12 1 8 1 10 12 1 10 12 1 10 100 12 1 1 1 10 100 12 1 1 1 100 1 10 12 100 1 8 1 10 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 10 12 10 12 1 10 12 1 10 12 1 10 12 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 100 1 10 12 1 9 100 12 1 1 1 9 100 1 9 12 1 1 100 1 100 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/lang/StringBuilder +instanceKlass java/lang/StringBuffer +ciInstanceKlass java/lang/AbstractStringBuilder 1 1 551 7 1 10 7 12 1 1 1 9 7 12 1 1 1 9 12 1 9 12 1 1 9 12 1 1 10 7 12 1 1 1 10 12 1 1 7 1 3 3 10 12 1 10 12 1 1 11 7 1 100 1 100 1 10 8 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 9 12 1 1 10 12 1 1 10 7 12 1 1 1 10 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 10 7 12 1 1 1 100 1 8 1 10 10 12 1 1 100 1 10 12 10 12 1 1 10 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 10 7 12 1 1 1 10 12 1 100 1 10 10 100 12 1 1 1 9 12 1 1 9 12 1 10 12 1 1 10 10 12 1 1 10 12 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 8 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 100 12 1 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 10 12 1 1 18 12 1 1 100 1 10 100 12 1 1 1 18 10 12 1 1 10 12 1 10 12 1 1 11 12 1 1 10 12 1 10 12 10 12 1 10 10 10 12 1 10 100 1 10 12 1 100 1 10 100 1 10 100 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 100 1 1 1 1 1 100 1 1 1 1 1 1 15 10 100 12 1 1 1 16 1 15 10 12 16 15 10 12 1 1 1 1 100 1 100 1 1 +staticfield java/lang/AbstractStringBuilder EMPTYVALUE [B 0 +ciInstanceKlass java/lang/StringBuilder 1 1 409 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 1 10 7 12 1 1 1 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 10 12 1 1 10 12 1 1 9 12 1 1 9 12 1 1 10 7 12 1 1 1 10 7 1 10 100 12 1 1 1 10 12 1 10 12 1 1 10 12 1 1 10 10 12 1 1 10 100 12 1 1 10 12 1 10 12 1 1 100 1 100 1 8 1 10 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 10 12 10 12 1 10 12 1 10 12 1 10 12 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 10 12 1 10 12 1 100 1 100 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 100 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/SecurityManager 0 0 576 10 100 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 100 1 8 1 10 12 1 10 12 1 1 10 100 12 1 1 1 10 100 1 10 100 1 10 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 100 12 1 1 100 1 8 1 10 9 12 1 1 9 12 1 8 1 9 12 1 100 1 10 8 1 10 12 1 1 10 12 1 10 12 1 1 100 1 10 10 12 1 1 100 1 8 1 10 12 1 8 1 8 1 8 1 8 1 8 1 8 1 10 12 1 8 1 8 1 8 1 8 1 8 1 10 100 12 1 1 1 10 12 1 1 8 1 100 1 8 1 10 8 1 8 1 8 1 8 1 8 1 10 100 12 1 1 8 1 100 1 8 1 8 1 10 8 1 10 12 1 100 1 8 1 10 10 12 1 1 10 12 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 10 100 12 1 1 11 100 12 1 1 1 18 12 1 1 11 100 12 1 1 1 18 12 1 1 11 12 1 1 18 18 11 12 1 18 12 1 11 12 1 1 9 12 1 1 9 12 1 9 12 1 9 12 1 100 1 10 100 12 1 1 10 12 1 10 12 1 18 12 1 18 10 100 12 1 1 1 18 12 1 10 12 1 18 18 8 1 10 12 1 9 12 1 1 11 100 12 1 1 1 8 1 100 1 10 12 1 10 12 1 1 10 12 1 1 9 12 1 1 10 12 1 10 12 1 1 8 1 100 1 10 9 12 1 8 1 10 12 1 8 1 100 1 10 10 100 12 1 1 10 100 1 9 100 12 1 1 1 11 12 1 1 10 12 1 11 12 1 10 12 1 100 1 10 10 12 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 10 100 12 1 1 1 16 15 10 100 12 1 1 1 16 1 16 15 10 12 16 1 15 10 12 16 15 11 100 1 16 1 16 1 15 10 12 16 15 10 12 16 15 10 12 1 16 1 15 11 12 1 15 10 12 16 15 10 16 1 1 1 1 100 1 100 1 1 +ciInstanceKlass java/security/AccessControlContext 1 1 374 9 7 12 1 1 1 9 12 1 1 10 100 12 1 1 1 8 1 10 100 12 1 1 1 10 7 12 1 1 1 9 12 1 9 12 1 1 9 12 1 1 10 7 12 1 1 100 1 10 12 1 11 100 12 1 1 1 11 12 1 11 12 1 11 12 1 1 7 1 11 12 1 1 10 12 1 10 100 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 11 100 12 1 1 1 10 100 1 100 1 8 1 10 12 1 10 12 1 1 100 1 10 100 12 1 1 1 9 12 1 9 12 1 9 12 1 9 12 1 1 9 12 1 1 9 12 1 9 12 1 10 7 12 1 1 1 9 12 1 10 12 1 1 10 12 1 1 8 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 100 1 10 10 12 1 1 10 100 12 1 1 1 10 8 1 10 100 12 1 1 8 1 10 100 12 1 1 8 1 8 1 10 12 1 8 1 10 12 1 8 1 10 12 1 10 12 1 10 12 1 1 8 1 8 1 100 1 10 12 1 10 12 1 1 100 1 10 12 1 8 1 10 12 1 10 12 1 10 8 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 11 10 12 1 10 12 1 1 10 10 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 1 1 +ciInstanceKlass java/security/AccessController 1 1 295 10 100 12 1 1 1 10 7 12 1 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 100 1 8 1 10 12 1 10 12 1 10 12 1 1 10 12 1 7 1 7 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 10 12 1 9 100 12 1 1 1 10 12 1 10 12 1 1 9 12 1 1 10 100 1 10 11 7 12 1 1 1 10 7 12 1 1 11 7 1 7 1 10 12 1 10 12 1 10 12 1 8 1 10 12 1 1 8 1 10 100 12 1 1 1 8 1 100 1 10 10 12 1 1 10 12 1 10 7 12 1 1 1 10 12 1 8 1 10 100 12 1 1 8 1 8 1 10 12 1 8 1 10 12 1 10 12 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 3 1 1 1 +staticfield java/security/AccessController $assertionsDisabled Z 1 +ciInstanceKlass java/security/CodeSource 1 1 395 10 7 12 1 1 1 9 7 12 1 1 1 9 12 1 1 9 12 1 1 9 12 1 1 10 7 12 1 1 1 9 12 1 1 10 100 12 1 1 10 100 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 100 1 10 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 100 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 10 10 12 1 1 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 8 1 10 12 1 10 12 1 10 12 1 1 10 12 1 8 1 10 12 1 1 10 100 1 10 10 12 1 1 8 1 10 12 1 10 12 1 10 12 1 8 1 8 1 9 12 1 1 100 1 8 1 10 12 1 10 12 1 1 8 1 10 12 1 8 1 8 1 8 1 10 100 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 100 1 100 1 10 12 1 10 12 10 12 1 1 10 100 12 1 1 10 12 1 100 1 10 12 10 8 1 10 12 1 10 12 1 10 12 1 1 100 1 10 12 1 1 100 1 100 1 8 1 8 1 10 10 12 1 1 10 100 12 1 1 1 100 1 10 12 10 12 1 1 11 100 12 1 1 10 10 12 1 11 10 12 1 8 1 100 1 10 12 1 10 12 1 1 10 12 1 11 12 1 1 11 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 +ciInstanceKlass java/security/ProtectionDomain 1 1 325 10 7 12 1 1 1 9 7 12 1 1 1 7 1 10 9 12 1 1 9 12 1 1 9 12 1 1 10 7 12 1 1 7 1 9 12 1 9 12 1 1 7 1 9 12 1 1 9 12 1 10 100 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 9 12 1 9 100 12 1 1 10 12 1 1 10 100 1 10 12 1 1 8 1 100 1 8 1 10 12 1 10 11 10 100 12 1 1 1 10 12 1 1 8 1 11 8 1 10 12 1 8 1 8 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 8 1 10 12 1 8 1 8 1 10 100 12 1 1 1 9 100 12 1 1 1 10 12 1 1 9 100 12 1 1 1 10 100 12 1 1 1 100 1 100 1 10 12 1 10 100 12 1 1 1 10 100 1 10 12 1 10 12 1 1 11 100 12 1 1 11 12 1 100 1 11 100 12 1 1 1 10 12 1 10 11 12 1 1 11 12 1 1 10 12 1 10 7 12 1 1 10 100 12 1 1 11 12 1 10 12 8 1 8 1 10 7 12 1 1 1 7 1 10 10 7 12 1 1 1 1 1 1 1 1 1 1 100 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 100 1 1 1 1 1 +staticfield java/security/ProtectionDomain filePermCompatInPD Z 0 +instanceKlass jdk/internal/loader/BuiltinClassLoader +instanceKlass java/net/URLClassLoader +ciInstanceKlass java/security/SecureClassLoader 1 1 102 10 7 12 1 1 1 7 1 10 12 1 9 7 12 1 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 7 1 10 7 1 10 12 1 7 1 10 12 1 11 7 12 1 1 1 7 1 11 12 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 +ciInstanceKlass java/net/URL 1 1 743 10 7 12 1 1 1 10 12 1 10 7 12 1 1 9 12 1 1 9 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 9 12 1 1 10 7 12 1 1 1 8 1 10 12 1 1 100 1 10 10 12 1 1 8 1 10 12 1 1 9 12 1 100 1 8 1 10 12 1 10 12 1 8 1 9 12 1 10 12 1 1 9 12 1 10 12 1 10 12 1 9 12 1 9 12 1 8 1 9 12 1 10 12 1 1 8 1 9 12 1 1 10 12 1 1 10 7 12 1 1 1 8 1 10 12 1 7 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 8 1 10 12 1 1 10 12 1 8 1 9 12 1 8 1 10 12 1 10 7 12 1 1 1 100 1 10 12 1 10 12 1 1 10 7 12 1 1 1 100 1 8 1 10 10 12 1 8 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 8 1 10 12 1 10 10 7 12 1 1 1 10 12 1 9 100 12 1 1 1 10 100 12 1 1 1 9 12 1 1 10 12 1 10 100 12 1 1 1 100 1 100 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 10 10 10 12 1 100 1 10 12 1 10 12 1 1 8 1 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 9 100 12 1 1 1 10 12 1 1 100 1 10 12 1 10 12 1 10 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 7 12 1 1 1 10 12 1 1 10 12 1 9 12 1 1 9 12 1 1 100 1 8 1 10 10 12 1 9 12 1 1 10 7 12 1 1 8 1 10 7 12 1 1 8 1 10 12 1 1 10 12 1 8 1 8 1 10 7 12 1 1 1 100 1 10 100 12 1 1 1 10 12 1 10 12 1 100 1 10 9 12 1 1 10 7 12 1 1 8 1 10 12 1 1 100 1 10 10 100 12 1 1 1 8 9 100 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 7 12 1 1 11 7 12 1 1 10 12 1 10 12 1 9 12 1 10 12 1 1 10 100 12 1 1 10 100 12 1 1 1 8 10 100 12 1 1 100 1 10 8 8 10 12 1 8 8 8 100 1 10 12 1 9 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 10 12 1 1 10 12 1 1 10 10 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 10 12 1 100 1 8 1 10 10 10 12 1 1 10 12 1 10 12 1 1 8 1 7 1 10 10 10 7 1 10 12 1 9 7 12 1 1 1 9 12 1 1 7 1 10 10 7 12 1 1 1 100 1 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/net/URL defaultFactory Ljava/net/URLStreamHandlerFactory; java/net/URL$DefaultFactory +staticfield java/net/URL streamHandlerLock Ljava/lang/Object; java/lang/Object +staticfield java/net/URL serialPersistentFields [Ljava/io/ObjectStreamField; 7 [Ljava/io/ObjectStreamField; +instanceKlass org/codehaus/plexus/classworlds/realm/ClassRealm +ciInstanceKlass java/net/URLClassLoader 1 1 600 10 7 12 1 1 1 7 1 10 12 1 9 7 12 1 1 1 10 7 12 1 1 1 9 12 1 1 7 1 10 12 1 9 12 1 1 10 12 1 10 10 12 1 10 7 12 1 1 1 10 12 1 1 10 7 12 1 1 1 10 7 12 1 1 1 7 1 10 12 1 1 10 12 1 1 10 12 1 1 7 1 100 1 10 7 12 1 1 1 100 1 8 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 11 100 12 1 1 1 11 100 12 1 1 1 11 12 1 1 100 1 11 12 1 11 100 12 1 1 10 12 1 11 12 1 11 12 1 1 11 10 12 1 1 10 12 1 1 10 12 1 1 7 1 10 12 1 10 12 1 1 7 1 100 1 10 12 1 1 100 1 10 10 12 1 1 10 7 12 1 1 10 12 1 100 1 100 1 10 8 1 10 12 1 1 8 1 10 12 1 1 10 10 12 1 8 1 8 1 10 12 1 1 10 7 12 1 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 100 1 100 1 8 1 10 12 1 10 12 1 1 10 12 1 1 7 1 10 12 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 7 12 1 1 1 10 12 1 1 8 1 10 12 1 1 11 7 12 1 1 1 9 7 12 1 1 1 10 7 12 1 1 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 10 7 12 1 1 1 8 1 10 12 1 1 7 1 10 10 12 1 10 12 1 1 10 12 1 1 7 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 7 1 10 7 12 1 1 9 7 12 1 1 1 10 12 1 8 1 100 1 8 1 10 12 1 10 12 1 8 1 10 12 1 10 12 1 9 12 1 1 10 100 12 1 1 10 12 1 10 12 1 10 100 1 8 1 10 100 1 10 12 1 10 7 12 1 100 1 10 12 1 10 12 1 100 1 10 10 7 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 +ciInstanceKlass java/util/jar/Manifest 1 1 336 10 7 12 1 1 1 7 1 10 9 7 12 1 1 1 7 1 10 9 12 1 1 9 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 11 7 1 11 12 1 1 10 12 1 1 10 100 12 1 1 1 100 1 100 1 10 8 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 11 100 1 10 12 1 10 12 1 1 11 12 1 1 10 12 1 11 12 1 1 11 100 12 1 1 1 11 100 12 1 1 11 12 1 1 100 1 10 12 1 8 1 11 12 1 100 1 10 12 1 1 11 12 1 10 12 1 10 12 1 10 100 12 1 1 1 8 1 10 12 1 1 10 9 100 12 1 1 1 10 12 1 1 10 100 12 1 10 12 1 10 12 1 9 100 12 1 1 1 8 1 10 12 1 8 1 8 1 7 1 10 12 1 10 12 1 10 12 1 1 100 1 8 1 10 12 1 1 8 1 10 10 12 1 1 8 1 10 12 1 1 10 100 12 1 1 1 10 12 1 10 11 12 1 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 11 10 12 1 11 10 12 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/io/ByteArrayInputStream 0 0 96 10 100 12 1 1 1 9 100 12 1 1 1 9 12 1 1 9 12 1 9 12 1 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 100 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/nio/IntBuffer +instanceKlass java/nio/LongBuffer +instanceKlass java/nio/CharBuffer +instanceKlass java/nio/ByteBuffer +ciInstanceKlass java/nio/Buffer 1 1 237 100 1 10 7 12 1 1 1 9 7 12 1 1 1 9 12 1 9 12 1 1 9 12 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 100 1 100 1 10 8 1 10 12 1 1 10 12 1 8 1 8 1 10 12 1 1 10 12 1 8 1 9 12 1 1 100 1 8 1 10 12 1 8 1 8 1 9 12 10 12 1 8 1 8 1 8 1 10 12 1 8 1 8 1 8 1 100 1 10 100 1 10 100 1 10 10 7 12 1 1 1 100 1 10 10 100 12 1 1 1 10 11 100 12 1 1 100 1 100 1 8 1 10 10 7 12 1 1 1 10 7 12 1 1 1 9 12 1 1 10 7 12 1 1 1 9 12 1 1 7 1 10 10 7 12 1 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/nio/Buffer UNSAFE Ljdk/internal/misc/Unsafe; jdk/internal/misc/Unsafe +staticfield java/nio/Buffer SCOPED_MEMORY_ACCESS Ljdk/internal/misc/ScopedMemoryAccess; jdk/internal/misc/ScopedMemoryAccess +staticfield java/nio/Buffer $assertionsDisabled Z 1 +instanceKlass java/util/AbstractSequentialList +instanceKlass sun/security/jca/ProviderList$3 +instanceKlass java/util/Vector +instanceKlass java/util/Arrays$ArrayList +instanceKlass java/util/Collections$EmptyList +instanceKlass java/util/ArrayList +ciInstanceKlass java/util/AbstractList 1 1 218 10 7 12 1 1 1 9 7 12 1 1 1 10 12 1 1 10 12 1 1 100 1 10 10 12 1 1 11 100 12 1 1 1 11 12 1 1 11 12 1 10 100 12 1 1 1 10 12 1 11 12 1 11 12 1 11 12 1 10 12 1 1 10 12 1 1 11 100 12 1 1 1 11 100 1 11 7 1 10 12 1 7 1 10 12 1 10 12 1 1 100 1 100 1 10 12 1 100 1 10 100 1 100 1 10 8 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 8 1 100 1 8 1 8 1 8 1 10 100 1 11 10 10 12 1 11 12 1 10 12 1 1 8 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 +instanceKlass java/util/HashMap$Values +instanceKlass java/util/AbstractQueue +instanceKlass java/util/LinkedHashMap$LinkedValues +instanceKlass java/util/ArrayDeque +instanceKlass java/util/AbstractSet +instanceKlass java/util/ImmutableCollections$AbstractImmutableCollection +instanceKlass java/util/AbstractList +ciInstanceKlass java/util/AbstractCollection 1 1 160 10 7 12 1 1 1 10 7 12 1 1 1 10 12 1 1 11 7 12 1 1 1 11 12 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 10 7 12 1 1 10 7 12 1 1 1 7 1 10 100 12 1 1 1 10 100 12 1 1 1 100 1 10 11 12 1 11 7 1 10 12 1 10 12 1 10 100 12 1 1 1 11 8 1 100 1 10 10 12 1 1 8 1 10 12 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/AssertionStatusDirectives 0 0 24 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/Record 0 0 22 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/util/concurrent/ConcurrentHashMap 1 1 1210 7 1 7 1 3 10 12 1 1 3 100 1 10 7 12 1 1 1 100 1 10 100 12 1 1 1 100 1 11 12 1 1 11 12 1 11 12 1 1 9 12 1 1 9 12 1 1 9 12 1 10 7 12 1 1 1 7 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 4 10 12 1 9 12 1 10 12 1 1 100 1 10 5 0 10 12 1 10 12 1 1 5 0 10 12 1 1 10 12 1 9 12 1 1 10 12 1 1 9 12 1 9 12 1 1 10 12 1 1 9 12 1 10 12 1 1 9 12 1 1 10 12 1 1 100 1 10 100 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 100 1 10 12 1 1 7 1 100 1 8 1 10 12 1 10 12 1 1 10 12 1 1 11 7 12 1 1 10 12 1 1 11 12 1 1 11 7 12 1 1 1 11 7 12 1 1 1 11 12 1 7 1 11 12 1 11 12 1 10 12 1 1 10 12 1 1 9 12 1 1 10 100 12 1 1 1 9 10 12 1 1 9 12 1 10 12 1 1 5 0 9 12 1 1 7 1 10 12 1 9 12 1 1 7 1 10 12 1 9 12 1 7 1 10 100 1 10 10 12 1 1 8 1 10 12 1 10 12 1 1 11 100 1 10 12 1 10 100 12 1 1 1 8 1 10 100 12 1 1 1 8 1 10 12 1 8 1 10 12 1 10 12 1 1 10 100 12 1 1 10 12 1 10 12 1 10 12 1 9 12 1 9 10 12 1 9 12 1 1 11 100 12 1 1 1 11 7 12 1 1 1 100 1 10 12 11 100 12 1 1 10 11 7 12 1 10 12 1 100 1 10 12 1 100 1 10 10 9 7 12 1 1 1 10 12 3 10 100 12 1 1 9 12 1 10 12 1 1 9 12 1 1 9 12 1 10 12 1 1 10 100 12 1 1 9 12 1 9 7 12 1 1 10 12 1 1 10 12 1 3 9 12 1 9 12 1 10 12 1 1 7 1 9 3 9 12 1 100 1 10 12 1 9 12 1 10 12 1 9 12 1 10 12 1 9 12 1 10 100 12 1 1 1 100 10 12 1 100 1 5 0 10 100 12 1 1 100 1 10 12 1 1 10 12 1 10 12 1 100 1 10 12 1 10 100 1 100 1 10 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 1 100 1 10 12 1 10 10 12 1 100 1 10 12 1 10 10 12 1 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 10 100 1 10 10 100 1 10 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 10 100 1 10 10 100 1 10 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 100 1 10 12 1 10 10 12 1 10 7 12 1 1 1 10 12 1 7 1 7 1 10 12 1 9 12 1 1 9 12 1 1 10 12 1 1 8 10 12 1 1 8 8 8 8 7 10 12 1 1 10 12 1 100 1 8 1 10 7 1 100 1 100 1 1 1 5 0 1 1 3 1 3 1 1 1 1 3 1 3 1 3 1 1 1 1 1 3 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/util/concurrent/ConcurrentHashMap NCPU I 8 +staticfield java/util/concurrent/ConcurrentHashMap serialPersistentFields [Ljava/io/ObjectStreamField; 3 [Ljava/io/ObjectStreamField; +staticfield java/util/concurrent/ConcurrentHashMap U Ljdk/internal/misc/Unsafe; jdk/internal/misc/Unsafe +staticfield java/util/concurrent/ConcurrentHashMap SIZECTL J 20 +staticfield java/util/concurrent/ConcurrentHashMap TRANSFERINDEX J 32 +staticfield java/util/concurrent/ConcurrentHashMap BASECOUNT J 24 +staticfield java/util/concurrent/ConcurrentHashMap CELLSBUSY J 36 +staticfield java/util/concurrent/ConcurrentHashMap CELLVALUE J 144 +staticfield java/util/concurrent/ConcurrentHashMap ABASE I 16 +staticfield java/util/concurrent/ConcurrentHashMap ASHIFT I 2 +instanceKlass java/util/concurrent/ConcurrentSkipListMap +instanceKlass java/util/TreeMap +instanceKlass java/util/IdentityHashMap +instanceKlass java/util/WeakHashMap +instanceKlass java/util/Collections$EmptyMap +instanceKlass sun/util/PreHashedMap +instanceKlass java/util/HashMap +instanceKlass java/util/ImmutableCollections$AbstractImmutableMap +instanceKlass java/util/concurrent/ConcurrentHashMap +ciInstanceKlass java/util/AbstractMap 1 1 192 10 7 12 1 1 1 10 7 12 1 1 1 11 7 12 1 1 1 10 11 12 1 1 11 7 12 1 1 1 11 12 1 1 7 1 11 12 1 10 12 1 1 11 12 1 100 1 10 11 12 1 11 7 1 10 12 1 1 11 12 1 9 12 1 1 7 1 10 12 1 9 12 1 1 100 1 10 11 11 12 1 1 11 12 1 100 1 100 1 11 12 1 8 1 100 1 10 10 12 1 1 8 1 10 12 1 10 12 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 100 1 1 1 1 1 +instanceKlass jdk/internal/loader/ClassLoaders$BootClassLoader +instanceKlass jdk/internal/loader/ClassLoaders$PlatformClassLoader +instanceKlass jdk/internal/loader/ClassLoaders$AppClassLoader +ciInstanceKlass jdk/internal/loader/BuiltinClassLoader 1 1 737 9 7 12 1 1 1 10 7 12 1 1 1 10 7 12 1 1 1 9 12 1 1 9 12 1 1 7 1 10 12 1 9 12 1 10 12 1 9 12 1 10 7 12 1 1 1 10 7 12 1 1 1 10 7 12 1 1 1 11 7 12 1 1 1 100 1 100 1 10 10 12 1 1 8 1 10 12 1 10 12 7 1 10 12 1 10 12 1 1 11 7 12 1 1 1 11 7 12 1 1 1 11 12 1 1 7 1 8 1 8 1 10 9 12 1 1 10 7 12 1 1 11 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 10 12 1 10 100 12 1 1 1 10 12 1 1 11 7 12 1 1 1 10 100 12 1 1 100 1 10 7 12 1 1 1 10 12 1 100 1 8 1 10 12 1 1 10 8 1 10 12 1 1 10 12 1 1 10 12 1 1 11 7 12 1 1 11 12 1 7 1 10 11 12 1 1 11 10 12 1 1 7 1 10 12 1 10 7 12 1 10 12 1 7 1 10 12 1 10 7 12 1 1 1 100 1 10 12 1 1 11 12 1 100 1 100 1 10 12 1 10 12 1 1 100 1 100 1 10 12 1 10 12 1 18 12 1 1 10 12 1 10 12 1 1 18 100 1 10 7 12 1 1 1 7 1 10 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 9 12 1 1 100 1 10 10 12 1 1 10 12 1 1 10 12 1 10 12 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 18 12 1 7 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 100 1 10 12 1 100 1 10 12 1 10 7 12 1 1 1 10 12 1 11 12 1 100 1 10 12 1 7 1 100 1 10 12 1 10 12 1 11 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 8 1 10 12 1 1 10 7 12 1 1 10 12 1 100 1 8 1 8 1 10 10 12 1 8 1 8 1 10 7 12 1 1 1 11 7 12 1 1 1 9 7 12 1 1 1 10 7 12 1 1 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 10 7 12 1 1 1 8 1 10 12 1 7 1 10 12 1 1 10 12 1 7 1 10 11 12 1 1 10 12 10 12 1 10 12 1 100 1 10 12 1 10 12 1 10 10 12 1 10 7 12 1 1 8 1 10 7 12 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 15 10 100 12 1 1 1 16 15 10 12 16 15 10 12 16 15 10 12 16 1 1 1 100 1 1 1 1 1 100 1 100 1 1 +staticfield jdk/internal/loader/BuiltinClassLoader packageToModule Ljava/util/Map; java/util/concurrent/ConcurrentHashMap +staticfield jdk/internal/loader/BuiltinClassLoader $assertionsDisabled Z 1 +ciInstanceKlass jdk/internal/loader/ClassLoaders$AppClassLoader 1 1 119 8 1 10 7 12 1 1 1 10 7 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 7 1 8 1 10 12 10 7 12 1 1 1 10 100 12 1 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 100 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 +ciMethod jdk/internal/loader/ClassLoaders$AppClassLoader loadClass (Ljava/lang/String;Z)Ljava/lang/Class; 512 0 256 100 -1 +ciInstanceKlass jdk/internal/loader/ClassLoaders$PlatformClassLoader 1 1 42 8 1 10 7 12 1 1 1 10 7 12 1 1 1 100 1 10 12 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 100 1 1 +ciInstanceKlass java/lang/ArithmeticException 1 1 26 10 100 12 1 1 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 +instanceKlass org/codehaus/plexus/util/xml/pull/XmlPullParserException +instanceKlass java/lang/CloneNotSupportedException +instanceKlass org/apache/commons/cli/ParseException +instanceKlass org/apache/maven/cli/MavenCli$ExitException +instanceKlass java/security/PrivilegedActionException +instanceKlass org/codehaus/plexus/classworlds/launcher/ConfigurationException +instanceKlass org/codehaus/plexus/classworlds/ClassWorldException +instanceKlass java/io/IOException +instanceKlass java/lang/ReflectiveOperationException +instanceKlass java/lang/RuntimeException +ciInstanceKlass java/lang/Exception 1 1 40 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/lang/IndexOutOfBoundsException +instanceKlass java/lang/SecurityException +instanceKlass java/lang/UnsupportedOperationException +instanceKlass java/lang/IllegalStateException +instanceKlass java/lang/IllegalArgumentException +instanceKlass java/lang/ArithmeticException +instanceKlass java/lang/NullPointerException +instanceKlass java/lang/IllegalMonitorStateException +instanceKlass java/lang/ArrayStoreException +instanceKlass java/lang/ClassCastException +ciInstanceKlass java/lang/RuntimeException 1 1 40 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/ArrayStoreException 1 1 26 10 100 12 1 1 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/ClassCastException 1 1 26 10 100 12 1 1 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/ClassNotFoundException 1 1 96 7 1 10 7 12 1 1 1 10 12 1 10 12 1 1 10 100 12 1 1 1 8 1 10 100 12 1 1 1 10 7 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 7 1 10 12 1 9 12 1 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/ClassNotFoundException serialPersistentFields [Ljava/io/ObjectStreamField; 1 [Ljava/io/ObjectStreamField; +instanceKlass java/lang/InstantiationException +instanceKlass java/lang/IllegalAccessException +instanceKlass java/lang/NoSuchFieldException +instanceKlass java/lang/reflect/InvocationTargetException +instanceKlass java/lang/NoSuchMethodException +instanceKlass java/lang/ClassNotFoundException +ciInstanceKlass java/lang/ReflectiveOperationException 1 1 34 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/IllegalMonitorStateException 1 1 26 10 100 12 1 1 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/BootstrapMethodError 0 0 45 10 100 12 1 1 1 10 12 1 10 12 1 10 100 12 1 1 1 10 100 12 1 1 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 +instanceKlass java/lang/UnsatisfiedLinkError +instanceKlass java/lang/IncompatibleClassChangeError +instanceKlass java/lang/BootstrapMethodError +instanceKlass java/lang/NoClassDefFoundError +ciInstanceKlass java/lang/LinkageError 1 1 31 10 7 12 1 1 1 10 12 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/NullPointerException 1 1 52 10 100 12 1 1 1 10 12 1 9 100 12 1 1 1 10 12 1 1 9 12 1 1 10 12 1 1 10 12 1 1 1 1 5 0 1 1 1 1 1 1 1 1 100 1 100 1 100 1 1 1 +ciInstanceKlass java/lang/InternalError 0 0 34 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/lang/StackOverflowError +instanceKlass java/lang/OutOfMemoryError +instanceKlass java/lang/InternalError +ciInstanceKlass java/lang/VirtualMachineError 1 1 34 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/NoClassDefFoundError 0 0 26 10 100 12 1 1 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/OutOfMemoryError 1 1 26 10 100 12 1 1 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/StackOverflowError 1 1 26 10 100 12 1 1 1 10 12 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/StackTraceElement 0 0 224 10 100 12 1 1 1 10 100 12 1 1 9 12 1 1 9 12 1 1 9 12 1 9 12 1 8 1 10 100 12 1 1 1 100 1 9 12 1 8 1 9 12 1 9 12 1 9 12 1 1 8 1 10 12 1 1 10 12 1 100 1 10 10 12 1 1 8 1 10 12 1 1 10 12 1 8 1 8 1 8 1 10 12 1 8 1 8 1 10 12 1 8 1 8 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 9 12 1 1 10 100 12 1 1 1 10 12 1 1 100 1 10 12 1 1 10 100 12 1 1 10 100 12 1 1 1 10 100 12 1 1 10 100 12 1 1 10 10 12 1 1 10 12 1 10 12 1 1 100 1 1 1 1 1 3 1 3 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 +instanceKlass java/util/concurrent/locks/AbstractQueuedSynchronizer +ciInstanceKlass java/util/concurrent/locks/AbstractOwnableSynchronizer 1 1 32 10 7 12 1 1 1 9 7 12 1 1 1 100 1 1 1 1 5 0 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass jdk/internal/misc/UnsafeConstants 1 1 34 10 100 12 1 1 1 9 7 12 1 1 1 9 12 1 9 12 1 1 9 12 1 9 12 1 1 1 1 1 1 1 1 1 +staticfield jdk/internal/misc/UnsafeConstants ADDRESS_SIZE0 I 8 +staticfield jdk/internal/misc/UnsafeConstants PAGE_SIZE I 4096 +staticfield jdk/internal/misc/UnsafeConstants BIG_ENDIAN Z 0 +staticfield jdk/internal/misc/UnsafeConstants UNALIGNED_ACCESS Z 1 +staticfield jdk/internal/misc/UnsafeConstants DATA_CACHE_LINE_FLUSH_SIZE I 0 +instanceKlass java/lang/invoke/DelegatingMethodHandle +instanceKlass java/lang/invoke/BoundMethodHandle +instanceKlass java/lang/invoke/DirectMethodHandle +ciInstanceKlass java/lang/invoke/MethodHandle 1 1 718 100 1 9 7 12 1 1 1 10 7 12 1 1 1 10 7 12 1 1 1 7 1 7 1 10 12 1 1 9 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 11 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 9 12 1 1 9 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 100 1 100 1 10 8 1 10 12 1 1 10 12 1 8 1 10 12 1 1 10 12 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 100 12 1 1 10 100 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 7 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 8 1 10 7 12 1 1 1 8 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 8 1 10 12 1 1 8 1 10 12 1 8 1 10 100 12 1 1 1 9 12 1 1 100 1 10 9 100 12 1 1 1 9 100 1 8 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 8 1 10 12 1 1 8 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 9 100 12 1 1 1 10 12 1 1 11 12 1 10 12 1 10 12 1 1 10 100 12 1 1 100 1 11 12 1 10 100 1 11 12 1 100 1 10 12 1 11 12 1 9 100 12 1 1 1 11 12 1 1 11 100 12 1 1 1 10 12 1 1 9 12 1 11 12 1 9 12 1 9 12 1 9 12 1 11 12 1 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 8 1 10 12 1 10 12 1 8 1 10 12 1 10 12 1 10 10 7 12 1 1 10 12 1 1 100 1 8 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 100 1 10 100 12 1 1 1 10 9 7 12 1 1 1 10 12 1 1 10 12 1 1 8 1 9 12 1 9 12 1 1 9 12 1 1 10 12 1 100 1 10 12 1 10 12 1 1 9 12 1 1 9 12 1 1 10 7 12 1 1 1 11 100 12 1 1 9 12 1 10 12 1 1 10 12 1 9 12 1 10 12 1 8 10 12 1 1 8 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 100 1 1 100 1 1 1 1 +staticfield java/lang/invoke/MethodHandle FORM_OFFSET J 20 +staticfield java/lang/invoke/MethodHandle UPDATE_OFFSET J 13 +staticfield java/lang/invoke/MethodHandle $assertionsDisabled Z 1 +ciInstanceKlass java/lang/invoke/MethodType 1 1 769 7 1 10 7 12 1 1 1 9 12 1 1 9 12 1 1 9 12 1 1 10 7 12 1 1 1 9 7 12 1 1 8 1 10 100 12 1 1 1 9 7 1 9 7 1 10 12 1 1 100 1 10 8 1 10 12 1 1 10 12 1 10 12 1 1 100 1 8 1 10 12 1 100 1 10 10 12 1 10 12 1 1 10 12 1 1 11 7 12 1 1 1 9 12 1 11 12 1 1 7 7 1 10 7 12 1 1 1 10 12 1 9 12 1 1 10 7 12 1 1 10 12 1 1 10 7 12 1 1 1 10 7 12 1 1 1 10 12 1 9 12 1 1 10 12 1 1 100 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 8 1 8 1 10 12 1 1 9 12 1 1 100 1 10 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 8 1 10 12 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 9 12 1 10 12 1 10 10 12 1 1 10 12 1 9 12 1 1 10 12 1 1 11 12 1 1 10 12 1 1 7 1 10 12 10 12 1 10 12 1 100 1 8 1 8 1 8 1 10 12 1 10 12 1 10 12 1 10 10 12 1 11 12 1 1 11 12 1 10 100 12 1 1 1 9 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 9 12 1 1 7 1 10 12 1 10 12 1 1 9 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 1 8 1 10 7 12 1 1 1 11 12 1 1 9 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 100 1 10 12 1 1 11 100 12 1 1 18 12 1 1 11 12 1 1 18 12 1 11 12 1 100 1 11 100 12 1 1 10 12 1 100 1 10 12 1 10 100 12 1 1 10 12 1 1 9 12 1 1 9 100 12 1 1 1 10 100 12 1 1 1 9 12 1 10 100 12 1 1 10 12 1 100 10 12 1 1 10 12 1 10 7 1 7 1 9 12 1 1 100 1 100 1 100 1 1 1 5 0 1 1 1 1 1 1 1 3 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 10 100 12 1 1 1 16 15 10 12 16 16 15 10 12 16 1 1 1 1 100 1 1 100 1 1 100 1 100 1 1 +staticfield java/lang/invoke/MethodType internTable Ljava/lang/invoke/MethodType$ConcurrentWeakInternSet; java/lang/invoke/MethodType$ConcurrentWeakInternSet +staticfield java/lang/invoke/MethodType NO_PTYPES [Ljava/lang/Class; 0 [Ljava/lang/Class; +staticfield java/lang/invoke/MethodType objectOnlyTypes [Ljava/lang/invoke/MethodType; 20 [Ljava/lang/invoke/MethodType; +staticfield java/lang/invoke/MethodType METHOD_HANDLE_ARRAY [Ljava/lang/Class; 1 [Ljava/lang/Class; +staticfield java/lang/invoke/MethodType serialPersistentFields [Ljava/io/ObjectStreamField; 0 [Ljava/io/ObjectStreamField; +staticfield java/lang/invoke/MethodType $assertionsDisabled Z 1 +ciInstanceKlass java/lang/invoke/LambdaForm 1 1 1052 100 1 9 7 12 1 1 1 10 7 12 1 1 1 10 7 12 1 1 9 12 1 1 9 12 1 1 10 12 1 1 100 1 10 9 12 1 10 12 1 1 9 12 1 10 7 12 1 1 1 9 12 1 9 12 1 9 12 1 1 9 12 1 10 12 1 1 7 1 10 12 1 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 10 12 1 1 9 100 12 1 1 1 10 12 1 1 9 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 7 1 10 10 12 1 1 8 1 10 12 1 10 12 1 10 12 1 1 7 1 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 1 9 12 1 1 9 12 1 9 12 1 1 10 12 1 9 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 9 12 1 1 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 8 1 10 12 1 10 12 1 8 1 8 1 9 12 1 9 12 1 9 12 1 1 10 12 1 1 10 12 1 9 12 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 9 12 1 10 12 1 8 1 8 1 8 1 8 1 8 1 8 1 8 1 8 1 10 12 1 9 12 1 7 1 10 12 1 1 9 12 1 10 12 1 10 12 1 1 10 12 10 12 1 10 12 1 1 10 12 1 1 10 10 12 1 1 10 12 1 1 7 1 8 1 10 12 1 1 10 12 1 10 12 1 1 10 8 1 10 12 1 1 8 1 8 1 8 1 10 12 1 9 12 1 1 10 12 1 1 10 12 1 1 100 1 10 12 1 1 10 12 1 10 7 12 1 1 1 10 12 1 1 9 12 1 1 8 1 10 100 12 1 1 1 10 7 12 1 1 10 12 10 10 12 1 1 9 12 1 8 10 12 1 1 100 1 10 12 1 1 10 12 1 9 7 12 1 1 9 12 1 1 8 1 10 100 12 1 1 10 12 1 1 100 1 100 1 10 10 12 1 1 10 12 1 1 8 1 8 1 100 1 8 1 10 12 10 12 1 10 12 1 10 12 1 1 8 1 8 1 9 100 12 1 1 1 10 12 1 10 12 1 1 8 1 8 1 8 1 100 1 8 1 100 1 8 1 100 1 8 1 10 12 1 8 1 9 10 7 12 1 1 1 10 12 1 9 12 1 1 10 12 1 10 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 8 1 100 10 12 1 10 12 1 9 12 1 1 10 7 12 1 1 8 1 8 1 100 1 8 1 8 1 8 1 8 1 8 1 8 1 8 1 8 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 8 1 8 1 8 1 10 12 1 8 1 10 12 1 8 1 8 1 8 1 8 1 8 1 10 12 1 10 12 1 10 12 1 1 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 9 12 1 1 8 1 10 12 1 1 9 12 1 1 10 12 1 1 9 12 1 9 12 1 1 9 12 1 9 12 1 1 7 1 10 7 12 1 1 1 9 12 1 10 12 1 10 12 1 8 1 10 12 1 9 12 1 1 7 1 10 7 12 1 1 1 8 1 100 1 10 12 1 9 12 1 9 12 1 10 12 1 10 12 1 10 7 12 1 1 1 10 12 1 9 7 12 1 1 10 12 1 1 10 12 1 10 12 1 9 12 10 12 1 10 10 12 1 9 9 12 1 7 9 12 1 1 10 12 1 1 9 12 1 10 12 1 10 7 1 9 1 1 1 1 3 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 100 1 1 100 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/invoke/LambdaForm COMPILE_THRESHOLD I 0 +staticfield java/lang/invoke/LambdaForm INTERNED_ARGUMENTS [[Ljava/lang/invoke/LambdaForm$Name; 5 [[Ljava/lang/invoke/LambdaForm$Name; +staticfield java/lang/invoke/LambdaForm IMPL_NAMES Ljava/lang/invoke/MemberName$Factory; java/lang/invoke/MemberName$Factory +staticfield java/lang/invoke/LambdaForm LF_identity [Ljava/lang/invoke/LambdaForm; 6 [Ljava/lang/invoke/LambdaForm; +staticfield java/lang/invoke/LambdaForm LF_zero [Ljava/lang/invoke/LambdaForm; 6 [Ljava/lang/invoke/LambdaForm; +staticfield java/lang/invoke/LambdaForm NF_identity [Ljava/lang/invoke/LambdaForm$NamedFunction; 6 [Ljava/lang/invoke/LambdaForm$NamedFunction; +staticfield java/lang/invoke/LambdaForm NF_zero [Ljava/lang/invoke/LambdaForm$NamedFunction; 6 [Ljava/lang/invoke/LambdaForm$NamedFunction; +staticfield java/lang/invoke/LambdaForm createFormsLock Ljava/lang/Object; java/lang/Object +staticfield java/lang/invoke/LambdaForm DEBUG_NAME_COUNTERS Ljava/util/HashMap; null +staticfield java/lang/invoke/LambdaForm DEBUG_NAMES Ljava/util/HashMap; null +staticfield java/lang/invoke/LambdaForm TRACE_INTERPRETER Z 0 +staticfield java/lang/invoke/LambdaForm $assertionsDisabled Z 1 +instanceKlass jdk/internal/reflect/FieldAccessorImpl +instanceKlass jdk/internal/reflect/ConstructorAccessorImpl +instanceKlass jdk/internal/reflect/MethodAccessorImpl +ciInstanceKlass jdk/internal/reflect/MagicAccessorImpl 1 1 16 10 7 12 1 1 1 100 1 1 1 1 1 1 1 1 +instanceKlass jdk/internal/reflect/DirectMethodHandleAccessor +ciInstanceKlass jdk/internal/reflect/MethodAccessorImpl 1 1 38 10 7 12 1 1 1 10 100 12 1 1 1 100 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass jdk/internal/reflect/DirectConstructorHandleAccessor$NativeAccessor +instanceKlass jdk/internal/reflect/DirectConstructorHandleAccessor +instanceKlass jdk/internal/reflect/NativeConstructorAccessorImpl +ciInstanceKlass jdk/internal/reflect/ConstructorAccessorImpl 1 1 27 10 7 12 1 1 1 100 1 100 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 1 1 +ciInstanceKlass jdk/internal/reflect/DelegatingClassLoader 0 0 18 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass jdk/internal/reflect/CallerSensitive 0 0 17 100 1 100 1 100 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass jdk/internal/reflect/NativeConstructorAccessorImpl 0 0 128 10 100 12 1 1 1 9 100 12 1 1 1 100 1 10 12 1 9 12 1 1 9 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 9 12 1 9 12 1 1 9 12 1 1 10 100 12 1 1 1 100 1 10 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 100 1 10 12 1 1 10 12 1 1 8 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 1 1 1 1 1 1 +ciInstanceKlass jdk/internal/reflect/ConstantPool 0 0 142 10 100 12 1 1 1 9 100 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 100 12 1 1 1 8 11 100 12 1 1 1 10 100 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass jdk/internal/reflect/UnsafeStaticFieldAccessorImpl 0 0 47 10 100 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 9 12 1 1 8 11 100 12 1 1 1 10 100 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass jdk/internal/reflect/UnsafeFieldAccessorImpl +ciInstanceKlass jdk/internal/reflect/FieldAccessorImpl 0 0 269 10 100 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 10 100 12 1 1 1 10 12 1 1 100 1 10 10 12 1 1 10 12 1 1 8 1 10 10 12 1 100 1 8 1 10 12 1 8 1 10 12 1 8 1 10 12 1 100 1 10 12 1 1 10 8 1 10 12 1 1 8 1 10 100 12 1 1 8 1 10 100 12 1 1 8 1 10 100 12 1 1 8 1 10 100 12 1 1 8 1 10 100 12 1 1 8 1 10 100 12 1 1 8 1 10 100 12 1 1 8 1 10 100 12 1 1 10 12 1 1 8 1 10 12 1 1 10 100 12 1 1 1 8 1 10 12 1 8 1 8 1 8 1 8 1 10 100 12 1 1 1 8 1 8 1 8 1 10 12 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass jdk/internal/reflect/UnsafeStaticFieldAccessorImpl +ciInstanceKlass jdk/internal/reflect/UnsafeFieldAccessorImpl 0 0 62 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 9 100 12 1 1 10 12 1 9 12 1 1 10 100 12 1 1 1 9 12 1 1 10 12 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/lang/invoke/VolatileCallSite +instanceKlass java/lang/invoke/MutableCallSite +instanceKlass java/lang/invoke/ConstantCallSite +ciInstanceKlass java/lang/invoke/CallSite 1 1 302 10 7 12 1 1 1 10 7 12 1 1 1 9 7 12 1 1 1 10 12 1 1 9 12 1 1 10 7 12 1 1 1 10 12 1 100 1 10 12 1 1 10 12 1 1 9 100 12 1 1 1 10 100 12 1 1 10 12 1 1 100 1 100 1 10 10 100 12 1 1 1 10 12 1 1 8 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 10 10 100 12 1 1 10 12 1 1 9 12 1 9 100 12 1 1 1 8 1 10 7 12 1 1 1 10 12 1 1 100 1 10 12 1 1 9 12 1 8 1 100 1 10 12 1 10 12 1 100 1 8 1 10 10 12 1 10 12 1 1 100 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 9 12 1 1 8 10 12 1 1 9 12 1 1 100 1 10 10 12 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 10 7 12 1 1 1 100 1 8 1 10 10 12 10 12 1 1 100 1 100 1 100 1 8 1 10 12 1 10 7 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/invoke/CallSite $assertionsDisabled Z 1 +ciInstanceKlass java/lang/invoke/ConstantCallSite 1 1 65 10 7 12 1 1 1 9 7 12 1 1 1 9 12 1 1 10 7 12 1 1 1 10 12 1 100 1 10 12 9 12 1 1 100 1 10 10 12 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 +staticfield java/lang/invoke/ConstantCallSite UNSAFE Ljdk/internal/misc/Unsafe; jdk/internal/misc/Unsafe +instanceKlass java/lang/invoke/DirectMethodHandle$Accessor +instanceKlass java/lang/invoke/DirectMethodHandle$Constructor +ciInstanceKlass java/lang/invoke/DirectMethodHandle 1 1 913 7 1 7 1 100 1 7 1 7 1 10 7 12 1 1 1 10 7 12 1 1 1 100 1 10 12 1 10 12 1 1 10 7 12 1 1 10 12 1 1 10 12 1 10 12 1 7 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 7 12 1 1 1 10 12 1 9 12 1 1 100 1 10 9 12 1 1 9 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 7 12 1 1 1 10 12 1 10 12 1 1 8 1 10 12 1 1 100 1 10 12 1 100 1 10 10 12 1 10 12 1 10 12 1 10 7 12 1 1 1 10 12 1 1 100 1 10 12 1 10 12 1 7 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 8 10 100 12 1 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 9 7 12 1 1 1 7 1 10 12 1 10 7 12 1 1 1 10 12 1 10 12 1 1 9 12 1 1 100 1 10 8 1 10 12 1 1 10 12 1 10 12 1 10 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 10 10 7 12 1 1 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 8 1 9 7 12 1 1 1 8 1 9 12 1 9 12 1 8 1 9 12 1 9 12 1 8 1 9 12 1 9 12 1 8 1 10 12 1 10 12 1 1 9 12 1 1 7 1 10 12 1 1 100 1 10 7 12 1 1 1 10 12 1 1 10 12 1 10 12 1 1 7 1 10 12 1 1 10 12 1 10 12 1 1 7 1 10 12 1 1 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 9 12 1 1 10 7 1 9 12 9 12 1 10 7 12 1 1 1 10 12 1 7 1 7 1 7 1 9 12 1 1 10 7 12 1 1 1 10 12 10 12 1 100 1 10 12 1 10 12 1 1 8 1 9 12 1 9 12 1 10 12 1 1 9 12 1 1 10 100 12 1 1 1 9 12 1 1 9 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 7 12 1 1 9 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 9 12 1 1 10 12 1 1 9 7 12 1 1 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 9 12 1 8 1 9 12 1 1 9 12 1 1 10 12 1 10 12 1 1 9 7 1 10 12 1 9 12 1 1 10 12 10 12 1 10 12 1 10 12 1 10 8 1 8 1 8 1 8 1 10 12 1 1 9 12 1 1 10 12 1 10 100 12 1 1 1 8 9 12 1 1 10 12 1 1 8 1 8 8 9 12 1 8 1 8 8 8 8 8 1 8 10 12 1 10 12 1 8 1 8 1 10 12 1 10 12 1 10 12 1 10 12 1 1 7 1 1 1 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 3 1 1 1 1 1 1 1 1 1 1 3 1 3 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/invoke/DirectMethodHandle IMPL_NAMES Ljava/lang/invoke/MemberName$Factory; java/lang/invoke/MemberName$Factory +staticfield java/lang/invoke/DirectMethodHandle FT_UNCHECKED_REF I 8 +staticfield java/lang/invoke/DirectMethodHandle ACCESSOR_FORMS [Ljava/lang/invoke/LambdaForm; 132 [Ljava/lang/invoke/LambdaForm; +staticfield java/lang/invoke/DirectMethodHandle ALL_WRAPPERS [Lsun/invoke/util/Wrapper; 10 [Lsun/invoke/util/Wrapper; +staticfield java/lang/invoke/DirectMethodHandle NFS [Ljava/lang/invoke/LambdaForm$NamedFunction; 12 [Ljava/lang/invoke/LambdaForm$NamedFunction; +staticfield java/lang/invoke/DirectMethodHandle OBJ_OBJ_TYPE Ljava/lang/invoke/MethodType; java/lang/invoke/MethodType +staticfield java/lang/invoke/DirectMethodHandle LONG_OBJ_TYPE Ljava/lang/invoke/MethodType; java/lang/invoke/MethodType +staticfield java/lang/invoke/DirectMethodHandle $assertionsDisabled Z 1 +ciInstanceKlass java/lang/invoke/MutableCallSite 0 0 63 10 100 12 1 1 1 10 12 1 9 100 12 1 1 1 10 12 1 10 12 1 1 9 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 +ciInstanceKlass java/lang/invoke/VolatileCallSite 0 0 37 10 100 12 1 1 1 10 12 1 10 100 12 1 1 1 10 12 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +instanceKlass java/lang/invoke/VarHandleReferences$FieldInstanceReadOnly +instanceKlass java/lang/invoke/VarHandleByteArrayAsLongs$ByteArrayViewVarHandle +instanceKlass java/lang/invoke/VarHandleByteArrayAsInts$ByteArrayViewVarHandle +ciInstanceKlass java/lang/invoke/VarHandle 1 1 376 10 7 12 1 1 1 10 7 12 1 1 9 12 1 1 9 12 1 1 100 1 10 8 1 10 12 1 1 10 7 12 1 1 1 10 12 1 1 10 100 12 1 1 1 9 100 12 1 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 1 9 12 1 10 12 1 9 12 1 1 10 7 12 1 1 10 12 1 9 7 12 1 1 1 9 12 1 1 10 12 1 1 100 1 100 1 10 8 1 10 12 1 1 10 12 1 8 1 10 12 1 10 12 1 10 12 1 1 9 7 12 1 1 1 10 12 1 10 12 1 1 10 12 1 10 10 100 12 1 1 1 10 12 1 1 10 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 1 9 12 1 1 10 9 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 100 12 1 1 1 9 12 1 1 10 12 1 1 9 12 1 10 12 1 10 12 1 10 100 12 1 1 100 1 10 9 7 12 1 1 1 9 12 1 1 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 8 10 12 1 1 7 1 10 12 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 100 1 1 1 1 1 1 1 100 1 1 1 +staticfield java/lang/invoke/VarHandle VFORM_OFFSET J 16 +staticfield java/lang/invoke/VarHandle $assertionsDisabled Z 1 +ciInstanceKlass java/lang/invoke/MemberName 1 1 757 7 1 7 1 100 1 9 12 1 1 10 7 12 1 1 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 7 12 1 1 1 10 12 1 9 7 12 1 1 10 12 1 100 1 100 1 10 12 1 8 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 9 12 1 1 8 1 10 100 12 1 1 1 7 1 10 10 12 1 1 7 1 7 1 10 12 1 1 9 12 1 1 100 1 8 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 8 1 8 1 8 1 10 100 12 1 1 1 10 12 1 9 12 1 1 3 10 12 1 10 12 1 10 12 1 10 10 7 12 1 1 1 10 12 1 10 12 1 10 12 1 10 12 1 7 1 8 10 12 1 1 10 12 1 1 8 1 9 100 1 8 9 100 1 10 12 1 1 10 12 1 10 12 1 8 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 12 1 1 100 1 10 12 1 1 10 12 1 8 1 10 12 1 10 12 1 8 1 10 12 1 1 10 12 1 1 100 1 10 12 1 1 10 12 8 1 8 1 100 1 10 12 1 10 100 12 1 1 1 100 1 10 12 10 12 1 10 12 1 10 12 1 10 12 1 10 10 12 1 10 12 1 10 12 1 3 10 12 1 3 10 12 1 3 3 3 3 3 3 3 100 1 10 12 1 10 7 12 1 1 1 10 12 1 3 9 12 1 10 12 1 1 3 10 12 1 10 10 7 12 1 1 1 10 12 1 1 10 100 1 10 10 12 1 10 12 1 10 12 1 10 10 12 1 1 10 12 1 10 12 1 10 12 1 100 1 10 10 10 12 100 1 10 10 10 12 1 1 10 12 1 1 10 10 12 1 8 10 7 1 10 12 1 10 100 1 10 12 1 10 12 1 10 12 1 10 10 12 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 12 1 100 1 10 12 1 1 100 1 8 1 10 7 1 10 12 1 10 12 10 12 1 1 10 12 1 10 12 1 8 1 8 1 8 1 8 1 10 12 1 10 12 1 10 12 1 1 8 1 8 1 10 12 1 8 1 10 10 12 1 10 12 1 8 1 8 1 10 10 12 1 8 1 10 100 12 1 1 1 8 1 10 12 1 10 12 1 1 10 12 1 8 1 8 1 8 1 8 1 100 1 10 8 1 8 1 8 1 8 1 10 12 1 100 1 100 1 100 1 10 100 1 10 100 1 10 100 12 1 1 1 9 7 12 1 1 1 100 1 100 1 1 1 1 1 1 1 3 1 3 1 3 1 3 1 3 1 3 1 1 1 1 1 1 1 1 3 1 3 1 1 1 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield java/lang/invoke/MemberName $assertionsDisabled Z 1 +ciInstanceKlass java/lang/invoke/ResolvedMethodName 1 1 16 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/invoke/MethodHandleNatives 1 1 660 100 1 10 7 12 1 1 1 9 7 12 1 1 1 10 12 1 1 100 1 10 10 12 1 1 10 12 1 10 12 1 8 1 8 1 8 1 8 1 8 1 8 1 8 1 8 1 8 1 8 1 10 12 1 1 7 1 10 7 12 1 1 1 10 100 12 1 1 1 7 1 10 10 12 1 1 8 1 10 12 1 8 1 10 12 1 1 8 1 10 12 1 1 9 100 12 1 1 1 8 1 10 100 12 1 1 1 100 1 10 12 100 1 100 1 8 1 7 1 10 10 12 1 7 1 9 7 12 1 1 10 12 1 1 10 12 1 10 7 12 1 1 1 7 1 10 12 1 1 10 7 12 1 1 1 10 12 1 10 12 1 1 10 12 1 1 9 12 1 8 1 10 12 1 8 1 10 12 1 8 1 8 1 8 1 100 1 10 12 1 8 1 10 12 1 1 10 12 1 10 100 12 1 1 1 100 1 8 1 10 100 12 1 1 1 7 1 8 1 10 12 1 8 1 8 1 8 1 8 1 8 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 1 7 1 10 12 1 100 1 100 1 10 12 1 10 12 1 8 1 8 1 10 10 12 1 1 10 12 1 1 8 1 10 100 12 1 1 1 8 1 8 1 10 12 1 1 10 7 12 1 1 1 100 1 10 12 1 1 7 1 9 12 1 1 10 7 12 1 1 1 10 10 12 1 9 12 1 10 12 1 1 9 12 1 9 12 1 10 12 1 1 10 12 1 10 12 1 1 7 1 7 1 10 12 1 1 10 12 1 10 12 1 1 10 7 12 1 1 1 10 12 1 8 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 7 12 1 1 1 10 12 1 1 100 1 8 1 10 9 7 12 1 1 1 10 12 1 1 10 12 1 1 100 1 10 12 1 1 10 12 1 1 100 1 100 1 10 10 100 1 100 1 10 100 1 10 10 12 1 1 10 100 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 10 8 1 100 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 10 12 1 10 10 7 12 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 100 1 1 1 +staticfield java/lang/invoke/MethodHandleNatives $assertionsDisabled Z 1 +ciInstanceKlass java/lang/invoke/MethodHandleNatives$CallSiteContext 1 1 49 10 7 12 1 1 1 7 1 10 10 7 12 1 1 1 10 7 12 1 1 1 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 +ciInstanceKlass jdk/internal/invoke/NativeEntryPoint 0 0 92 10 100 12 1 1 1 9 100 12 1 1 1 10 100 12 1 1 1 100 1 9 12 1 9 12 1 9 12 1 1 9 12 1 1 9 12 1 1 100 1 8 1 10 12 1 11 100 12 1 1 1 10 12 1 1 10 12 1 11 100 12 1 1 11 12 1 10 12 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass java/lang/StackWalker 0 0 235 9 100 12 1 1 1 10 100 12 1 1 1 100 1 10 100 12 1 1 1 10 12 1 1 11 100 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 100 1 8 1 10 12 1 10 12 1 10 12 1 10 100 12 1 1 9 12 1 1 9 12 1 1 9 12 1 1 9 12 1 1 10 12 1 1 9 12 1 1 10 100 12 1 1 1 11 12 1 1 100 1 8 1 10 10 100 12 1 1 9 12 1 1 10 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 18 12 1 1 100 1 8 1 10 10 12 1 1 10 100 12 1 1 1 9 100 12 1 1 11 100 12 1 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 15 10 100 12 1 1 1 16 15 10 12 16 1 1 1 1 1 1 1 100 1 100 1 1 +instanceKlass java/lang/LiveStackFrameInfo +ciInstanceKlass java/lang/StackFrameInfo 0 0 132 10 100 12 1 1 1 9 100 12 1 1 1 9 100 1 9 12 1 1 11 100 12 1 1 1 9 12 1 1 11 12 1 1 10 12 1 1 10 100 12 1 1 1 10 12 1 11 12 1 11 12 1 1 11 12 1 10 12 1 1 9 12 1 1 10 12 1 1 10 100 12 1 1 10 12 1 1 11 12 1 1 10 12 1 9 12 1 1 10 12 1 1 100 1 8 1 10 12 1 10 100 12 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 +ciInstanceKlass java/lang/LiveStackFrameInfo 0 0 97 10 100 12 1 1 1 9 100 12 1 1 1 9 12 1 9 12 1 9 12 1 9 12 1 1 100 1 10 12 1 1 10 12 1 8 1 10 12 1 1 8 1 8 1 8 1 10 100 1 10 12 1 100 1 10 12 1 100 1 100 1 1 1 3 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 +ciInstanceKlass java/lang/StackStreamFactory$AbstractStackWalker 1 0 306 100 1 100 1 3 10 100 12 1 1 1 10 100 12 1 1 10 100 12 1 1 1 9 12 1 1 10 12 1 1 9 12 1 1 9 12 1 1 9 12 1 1 9 12 1 9 100 12 1 1 1 10 100 12 1 1 1 10 12 1 1 9 12 1 1 10 100 12 1 1 1 10 12 1 1 9 12 1 1 9 100 12 1 1 1 100 1 10 8 1 10 12 1 1 10 12 1 8 1 10 12 1 1 10 100 12 1 1 1 100 1 8 1 10 12 1 8 1 10 12 9 100 12 1 1 1 10 100 12 1 1 9 12 1 8 1 5 0 8 1 8 1 9 12 1 1 10 12 1 1 10 12 1 1 10 12 1 9 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 10 12 1 1 8 1 10 12 1 10 12 1 10 12 1 10 12 1 1 8 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 10 100 12 1 1 1 9 12 1 8 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 8 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +ciInstanceKlass jdk/internal/module/Modules 1 1 504 10 100 12 1 1 1 9 7 12 1 1 1 11 7 12 1 1 1 11 12 1 1 11 12 1 1 11 12 1 1 11 12 1 11 12 1 11 12 1 11 12 1 11 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 18 12 1 1 10 100 12 1 1 1 100 1 10 100 12 1 1 1 10 100 12 1 1 1 10 100 12 1 1 10 12 1 1 11 12 1 9 12 1 1 11 100 12 1 1 1 10 12 1 1 10 10 12 1 10 9 12 1 1 10 100 12 1 1 10 12 1 1 10 100 12 1 1 100 1 11 100 12 1 1 1 10 100 12 1 1 1 11 100 12 1 1 10 12 1 1 10 100 12 1 1 10 100 12 1 1 1 10 12 1 1 10 12 1 1 11 12 1 1 18 12 1 1 11 100 12 1 1 10 100 12 1 1 1 11 100 12 1 1 1 100 1 11 12 1 1 11 100 12 1 1 1 11 12 1 1 10 12 1 1 10 100 12 1 1 18 12 1 1 11 12 1 1 18 12 1 1 11 12 1 1 10 12 1 18 18 10 12 1 1 9 12 1 1 11 100 12 1 1 1 100 1 10 11 12 1 11 12 1 1 11 12 1 1 10 100 1 10 12 1 1 10 100 12 1 1 10 12 1 1 11 12 10 12 1 1 100 1 10 18 12 1 10 12 1 1 100 1 8 1 10 12 1 10 100 12 1 1 18 12 1 11 11 12 10 12 1 10 10 100 1 18 12 1 10 10 10 7 12 1 1 10 7 12 1 1 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15 10 100 12 1 1 1 16 15 10 12 1 16 16 15 10 12 1 16 1 16 1 15 10 12 1 16 1 16 1 15 10 12 16 1 15 10 16 1 15 10 12 16 1 15 10 12 16 15 10 12 16 15 10 12 1 1 1 100 1 100 1 1 +staticfield jdk/internal/module/Modules JLA Ljdk/internal/access/JavaLangAccess; java/lang/System$2 +staticfield jdk/internal/module/Modules JLMA Ljdk/internal/access/JavaLangModuleAccess; java/lang/module/ModuleDescriptor$1 +staticfield jdk/internal/module/Modules $assertionsDisabled Z 1 +ciInstanceKlass jdk/internal/loader/ClassLoaders 1 1 183 10 100 12 1 1 1 10 7 12 1 1 1 10 12 1 1 10 100 12 1 1 1 9 7 12 1 1 1 9 12 1 1 9 12 1 1 7 1 11 100 12 1 1 1 100 1 11 12 1 1 11 12 1 1 10 100 12 1 1 1 10 100 12 1 1 1 100 1 100 1 10 7 12 1 1 1 9 12 1 1 10 12 1 1 7 1 10 12 1 1 10 12 1 7 1 8 1 10 7 12 1 1 1 10 12 1 1 7 1 10 12 1 10 12 1 10 12 1 8 1 10 7 12 1 1 8 1 8 1 10 12 1 7 1 10 12 1 10 12 1 10 12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +staticfield jdk/internal/loader/ClassLoaders JLA Ljdk/internal/access/JavaLangAccess; java/lang/System$2 +staticfield jdk/internal/loader/ClassLoaders BOOT_LOADER Ljdk/internal/loader/ClassLoaders$BootClassLoader; jdk/internal/loader/ClassLoaders$BootClassLoader +staticfield jdk/internal/loader/ClassLoaders PLATFORM_LOADER Ljdk/internal/loader/ClassLoaders$PlatformClassLoader; jdk/internal/loader/ClassLoaders$PlatformClassLoader +staticfield jdk/internal/loader/ClassLoaders APP_LOADER Ljdk/internal/loader/ClassLoaders$AppClassLoader; jdk/internal/loader/ClassLoaders$AppClassLoader +ciInstanceKlass java/util/ArrayList 1 1 493 10 7 12 1 1 1 7 1 9 7 12 1 1 1 9 12 1 100 1 100 1 10 8 1 10 12 1 1 10 12 1 10 12 1 1 10 12 1 9 12 1 11 7 12 1 1 1 9 12 1 1 11 12 1 1 7 10 7 12 1 1 1 9 12 1 10 12 1 10 12 1 1 10 7 12 1 1 1 10 7 12 1 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 10 12 1 1 100 1 100 1 10 12 1 10 10 7 12 1 1 1 10 7 12 1 1 10 12 1 10 12 10 12 1 1 10 12 1 1 10 12 1 1 100 1 10 12 1 1 10 12 1 1 10 12 1 100 1 10 11 12 1 1 11 100 12 1 1 1 11 12 1 10 12 1 10 12 1 10 12 1 1 100 1 10 12 1 1 10 10 12 1 1 10 12 1 8 1 8 1 8 1 8 1 10 12 1 1 10 12 1 1 11 12 1 100 1 10 100 12 1 1 10 12 1 10 12 1 1 10 100 12 1 1 10 12 1 10 100 12 1 1 1 11 100 12 1 1 1 10 12 1 100 1 8 1 10 100 1 10 12 1 7 1 10 12 1 10 12 1 1 100 1 10 12 1 10 12 1 1 11 100 12 1 1 100 1 10 12 1 10 12 1 1 11 100 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 10 12 1 1 11 100 12 1 1 10 12 1 1 100 1 100 1 100 1 1 1 1 5 0 1 3 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 100 1 100 1 1 1 1 1 1 +staticfield java/util/ArrayList EMPTY_ELEMENTDATA [Ljava/lang/Object; 0 [Ljava/lang/Object; +staticfield java/util/ArrayList DEFAULTCAPACITY_EMPTY_ELEMENTDATA [Ljava/lang/Object; 0 [Ljava/lang/Object; +compile jdk/internal/loader/ClassLoaders$AppClassLoader loadClass (Ljava/lang/String;Z)Ljava/lang/Class; -1 3 diff --git a/src/main/java/net/Indyuce/mmocore/api/SoundEvent.java b/src/main/java/net/Indyuce/mmocore/api/SoundEvent.java index 47993004..d59c2764 100644 --- a/src/main/java/net/Indyuce/mmocore/api/SoundEvent.java +++ b/src/main/java/net/Indyuce/mmocore/api/SoundEvent.java @@ -16,5 +16,8 @@ public enum SoundEvent { NOT_ENOUGH_POINTS, CANCEL_QUEST, START_QUEST, - CLOSE_LOOT_CHEST; + CLOSE_LOOT_CHEST, + LEVEL_SKILL_TREE_NODE, + RESET_SKILL_TREE, + CHANGE_SKILL_TREE; } \ No newline at end of file diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index d4ec1909..be67bdf3 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -7,9 +7,14 @@ import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.ConfigMessage; import net.Indyuce.mmocore.api.SoundEvent; import net.Indyuce.mmocore.player.Unlockable; +import net.Indyuce.mmocore.tree.IntegerCoordinates; import net.Indyuce.mmocore.tree.NodeState; import net.Indyuce.mmocore.tree.SkillTreeNode; +import net.Indyuce.mmocore.tree.skilltree.AutomaticSkillTree; +import net.Indyuce.mmocore.tree.skilltree.LinkedSkillTree; import net.Indyuce.mmocore.tree.skilltree.SkillTree; +import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo; +import net.Indyuce.mmocore.tree.skilltree.display.Icon; import net.Indyuce.mmocore.waypoint.Waypoint; import net.Indyuce.mmocore.api.event.PlayerExperienceGainEvent; import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent; @@ -40,6 +45,7 @@ import net.Indyuce.mmocore.skill.ClassSkill; import net.Indyuce.mmocore.skill.RegisteredSkill; import net.Indyuce.mmocore.skill.cast.SkillCastingHandler; import net.Indyuce.mmocore.waypoint.WaypointOption; +import net.java.truecommons.shed.Link; import net.md_5.bungee.api.ChatMessageType; import net.md_5.bungee.api.chat.TextComponent; import org.apache.commons.lang.Validate; @@ -50,7 +56,6 @@ import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffectType; import org.bukkit.scheduler.BukkitRunnable; import org.jetbrains.annotations.NotNull; -import org.w3c.dom.Node; import javax.annotation.Nullable; import java.util.*; @@ -73,7 +78,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc */ @Nullable private PlayerClass profess; - private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints;// skillReallocationPoints, + private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints,skillTreeReallocationPoints;// skillReallocationPoints, private double experience; private double mana, stamina, stellium; private Guild guild; @@ -105,8 +110,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc */ private final Map tableItemClaims = new HashMap<>(); - // NON-FINAL player data stuff made public to facilitate field change - public int skillGuiDisplayOffset; public boolean noCooldown; public CombatRunnable combat; @@ -119,7 +122,16 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc //Value of the last skill tree the player was viewing private SkillTree cachedSkillTree = null; - private final HashMap nodeStates= new HashMap<>(); + private final HashMap nodeLevels = new HashMap<>(); + //The states of all the node cached + private HashMap nodeStates = new HashMap<>(); + + /** + * Stores the skill tree points for every tree with the corresponding id. + * The id 'global' corresponds to points you can use for every skill-tree. + */ + private final HashMap skillTreePoints = new HashMap<>(); + /** * If the player data was loaded using temporary data. * See {@link TemporaryPlayerData} for more info @@ -164,7 +176,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } catch (NullPointerException exception) { MMOCore.log(Level.SEVERE, "[Userdata] Could not find class " + getProfess().getId() + " while refreshing player data."); } - int j = 0; while (j < boundSkills.size()) try { @@ -175,12 +186,118 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } } + public void setupNodeState() { + for (SkillTree skillTree : MMOCore.plugin.skillTreeManager.getAll()) + if (skillTree instanceof LinkedSkillTree) { + LinkedSkillTree linkedSkillTree = (LinkedSkillTree) skillTree; + linkedSkillTree.setupNodeState(this); + } else { + skillTree.setupNodeState(this); + } + } + + public void setSkillTreePoints(String treeId, int points) { + skillTreePoints.put(treeId, points); + } + + public void giveSkillTreePoints(String id, int val) { + skillTreePoints.put(id, skillTreePoints.get(id) + val); + } + + public int countSkillTreePoints(SkillTree skillTree) { + return nodeLevels.keySet().stream().filter(node -> node.getTree().equals(skillTree)).mapToInt(nodeLevels::get).sum(); + } + + + public HashMap getSkillTreePoints() { + return skillTreePoints; + } + + public boolean containsSkillPointTreeId(String treeId) { + return skillTreePoints.containsKey(treeId); + } + + public boolean canIncrementNodeLevel(SkillTreeNode node) { + NodeState nodeState = nodeStates.get(node); + //Check the State of the node + if (nodeState != NodeState.UNLOCKED && nodeState != NodeState.UNLOCKABLE) + return false; + return getNodeLevel(node) 0 || skillTreePoints.get("global") > 0); + } + + /** + * Increments the node level by one, change the states of branches of the tree. + * Consumes skill tree points from the tree first and then consumes the global skill-tree points ('all') + */ + public void incrementNodeLevel(SkillTreeNode node) { + setNodeLevel(node, getNodeLevel(node) + 1); + if (nodeStates.get(node) == NodeState.UNLOCKABLE) + setNodeState(node, NodeState.UNLOCKED); + if (skillTreePoints.get(node.getTree().getId()) > 0) + withdrawSkillTreePoints(node.getTree().getId(), 1); + else + withdrawSkillTreePoints("global", 1); + //We unload the nodeStates map and reload it completely + nodeStates= new HashMap<>(); + node.getTree().setupNodeState(this); + + } + + /** + * Returns the icon the node should have. + */ + public Icon getIcon(SkillTreeNode node) { + SkillTree skillTree = node.getTree(); + + DisplayInfo displayInfo = new DisplayInfo(nodeStates.get(node), node.getSize()); + return skillTree.getIcon(displayInfo); + } + + + public Icon getIcon(SkillTree skillTree, IntegerCoordinates coordinates) { + if (skillTree.isNode(coordinates)) { + SkillTreeNode node = skillTree.getNode(coordinates); + DisplayInfo displayInfo = new DisplayInfo(nodeStates.get(node), node.getSize()); + return skillTree.getIcon(displayInfo); + } + if (skillTree.isPath(coordinates)) + return skillTree.getIcon(DisplayInfo.pathInfo); + return null; + } + + + public int getSkillTreePoint(String treeId) { + return skillTreePoints.get(treeId); + } + + public void withdrawSkillTreePoints(String treeId, int withdraw) { + skillTreePoints.put(treeId, skillTreePoints.get(treeId) - withdraw); + } + + public void setNodeState(SkillTreeNode node, NodeState nodeState) { + nodeStates.put(node, nodeState); + } + public NodeState getNodeState(SkillTreeNode node) { return nodeStates.get(node); } - public void setNodeState(SkillTreeNode node,NodeState nodeState) { - nodeStates.put(node,nodeState); + public boolean hasNodeState(SkillTreeNode node) { + return nodeStates.containsKey(node); + } + + public int getNodeLevel(SkillTreeNode node) { + return nodeLevels.get(node); + } + + + public void setNodeLevel(SkillTreeNode node, int nodeLevel) { + + nodeLevels.put(node, nodeLevel); + } + + public void addNodeLevel(SkillTreeNode node) { + nodeLevels.put(node, nodeLevels.get(node) + 1); } @Override @@ -273,6 +390,18 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return skillPoints; } + public int getSkillTreeReallocationPoints() { + return skillTreeReallocationPoints; + } + + public void setSkillTreeReallocationPoints(int skillTreeReallocationPoints) { + this.skillTreeReallocationPoints = skillTreeReallocationPoints; + } + + public void giveSkillTreeReallocationPoints(int amount) { + skillTreeReallocationPoints+=amount; + } + @Override public int getClaims(ExperienceObject object, ExperienceTable table, ExperienceItem item) { String key = object.getKey() + "." + table.getId() + "." + item.getId(); diff --git a/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java b/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java index 8a94b8c8..bc799e79 100644 --- a/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java +++ b/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java @@ -26,10 +26,7 @@ import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.Locale; +import java.util.*; public class MMOCoreUtils { public static boolean pluginItem(ItemStack item) { @@ -59,6 +56,44 @@ public class MMOCoreUtils { return str.replace("-", "_").toUpperCase(); } + /** + * + * @param value an integer you want to convert + * @return the string representing the integer but with roman letters + */ + public static String toRomanNumerals(int value) { + LinkedHashMap roman_numerals = new LinkedHashMap(); + roman_numerals.put("M", 1000); + roman_numerals.put("CM", 900); + roman_numerals.put("D", 500); + roman_numerals.put("CD", 400); + roman_numerals.put("C", 100); + roman_numerals.put("XC", 90); + roman_numerals.put("L", 50); + roman_numerals.put("XL", 40); + roman_numerals.put("X", 10); + roman_numerals.put("IX", 9); + roman_numerals.put("V", 5); + roman_numerals.put("IV", 4); + roman_numerals.put("I", 1); + String res = ""; + for(Map.Entry entry : roman_numerals.entrySet()){ + int matches = value/entry.getValue(); + res += repeat(entry.getKey(), matches); + value = value % entry.getValue(); + } + return res; + } + private static String repeat(String s, int n) { + if(s == null) { + return null; + } + final StringBuilder sb = new StringBuilder(); + for(int i = 0; i < n; i++) { + sb.append(s); + } + return sb.toString(); + } /** * Displays an in game indicator using a hologram. This uses * LumineUtils hologramFactory to summon holograms diff --git a/src/main/java/net/Indyuce/mmocore/command/CommandVerbose.java b/src/main/java/net/Indyuce/mmocore/command/CommandVerbose.java index 82c454d3..e7c6df1d 100644 --- a/src/main/java/net/Indyuce/mmocore/command/CommandVerbose.java +++ b/src/main/java/net/Indyuce/mmocore/command/CommandVerbose.java @@ -1,6 +1,7 @@ package net.Indyuce.mmocore.command; import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.api.util.MMOCoreUtils; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.configuration.ConfigurationSection; @@ -18,7 +19,7 @@ public class CommandVerbose { for (CommandType type : CommandType.values()) try { - values.put(type, VerboseValue.valueOf(config.getString(type.name().toLowerCase(), "TRUE").toUpperCase())); + values.put(type, VerboseValue.valueOf(config.getString(MMOCoreUtils.toEnumName(type.name()), "TRUE").toUpperCase())); } catch (IllegalArgumentException exception) { values.put(type, VerboseValue.TRUE); MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load command verbose action for " + type.name()); @@ -54,6 +55,7 @@ public class CommandVerbose { LEVEL, NOCD, POINTS, + SKILL_TREE_POINTS, RESET, RESOURCE } diff --git a/src/main/java/net/Indyuce/mmocore/command/MMOCoreCommandTreeRoot.java b/src/main/java/net/Indyuce/mmocore/command/MMOCoreCommandTreeRoot.java index dcefd387..f80d57c3 100644 --- a/src/main/java/net/Indyuce/mmocore/command/MMOCoreCommandTreeRoot.java +++ b/src/main/java/net/Indyuce/mmocore/command/MMOCoreCommandTreeRoot.java @@ -33,5 +33,6 @@ public class MMOCoreCommandTreeRoot extends CommandTreeRoot implements CommandEx addChild(new BoosterCommandTreeNode(this)); addChild(new WaypointsCommandTreeNode(this)); addChild(new QuestCommandTreeNode(this)); + addChild(new WaypointsCommandTreeNode(this)); } } diff --git a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/AdminCommandTreeNode.java b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/AdminCommandTreeNode.java index 6065fce1..d7e2e630 100644 --- a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/AdminCommandTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/AdminCommandTreeNode.java @@ -24,7 +24,8 @@ public class AdminCommandTreeNode extends CommandTreeNode { addChild(new PointsCommandTreeNode("class", this, PlayerData::setClassPoints, PlayerData::giveClassPoints, PlayerData::getClassPoints)); addChild(new PointsCommandTreeNode("attribute", this, PlayerData::setAttributePoints, PlayerData::giveAttributePoints, PlayerData::getAttributePoints)); addChild(new PointsCommandTreeNode("attr-realloc", this, PlayerData::setAttributeReallocationPoints, PlayerData::giveAttributeReallocationPoints, PlayerData::getAttributeReallocationPoints)); - + addChild(new PointsCommandTreeNode("skill-tree-realloc",this,PlayerData::setSkillTreeReallocationPoints,PlayerData::giveSkillTreeReallocationPoints,PlayerData::getSkillTreeReallocationPoints)); + addChild(new SkillTreePointsCommandTreeNode(this,(playerData,val,id)->playerData.setSkillTreePoints(id,val),(playerData, val, id)->playerData.giveSkillTreePoints(id,val),(playerData,id)->playerData.getSkillTreePoint(id))); for (PlayerResource res : PlayerResource.values()) addChild(new ResourceCommandTreeNode(res.name().toLowerCase(), this, res)); } diff --git a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/SkillTreePointsCommandTreeNode.java b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/SkillTreePointsCommandTreeNode.java new file mode 100644 index 00000000..40dc9ab0 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/SkillTreePointsCommandTreeNode.java @@ -0,0 +1,88 @@ +package net.Indyuce.mmocore.command.rpg.admin; + +import io.lumine.mythic.lib.command.api.CommandTreeNode; +import io.lumine.mythic.lib.command.api.Parameter; +import io.lumine.mythic.utils.functions.TriConsumer; +import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.api.player.PlayerData; +import net.Indyuce.mmocore.command.CommandVerbose; +import net.Indyuce.mmocore.tree.skilltree.SkillTree; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; +import org.bukkit.command.CommandSender; +import org.bukkit.entity.Player; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.BiFunction; +import java.util.stream.Collectors; + +public class SkillTreePointsCommandTreeNode extends CommandTreeNode { + BiFunction get; + + public SkillTreePointsCommandTreeNode(CommandTreeNode parent, TriConsumer give, + TriConsumer set, BiFunction get) { + super(parent, "skill-tree-points"); + addChild(new ActionCommandTreeNode(this, "give", give)); + addChild(new ActionCommandTreeNode(this, "set", set)); + this.get = get; + } + + @Override + public CommandResult execute(CommandSender commandSender, String[] strings) { + return CommandResult.THROW_USAGE; + } + + public class ActionCommandTreeNode extends CommandTreeNode { + private final TriConsumer action; + + + public ActionCommandTreeNode(CommandTreeNode parent, String id, TriConsumer action) { + super(parent, id); + this.action = action; + addParameter(Parameter.PLAYER); + addParameter(Parameter.AMOUNT); + addParameter(new Parameter("", ((explorer, list) -> { + MMOCore.plugin.skillTreeManager.getAll().forEach(tree -> list.add(tree.getId())); + list.add("global"); + }))); + } + + @Override + public CommandResult execute(CommandSender sender, String[] args) { + if (args.length < 6) + return CommandResult.THROW_USAGE; + Player player = Bukkit.getPlayer(args[3]); + if (player == null) { + sender.sendMessage(ChatColor.RED + "Could not find the player called " + args[3] + "."); + return CommandResult.FAILURE; + } + + int amount; + try { + amount = Integer.parseInt(args[4]); + } catch (Exception e) { + sender.sendMessage(ChatColor.RED + args[4] + " is not a valid number."); + return CommandResult.FAILURE; + } + List list = new ArrayList(); + MMOCore.plugin.skillTreeManager.getAll().forEach(tree -> list.add(tree.getId())); + list.add("global"); + + String id = args[5]; + + if (!list.contains(id)) { + sender.sendMessage("Could not find the type of points " + id + "."); + return CommandResult.FAILURE; + } + + PlayerData data = PlayerData.get(player); + action.accept(data, amount, args[5]); + CommandVerbose.verbose(sender, CommandVerbose.CommandType.SKILL_TREE_POINTS, ChatColor.GOLD + player.getName() + + ChatColor.YELLOW + " now has " + ChatColor.GOLD + get.apply(data, id) + ChatColor.YELLOW + " " + id + " skill tree points."); + + return CommandResult.SUCCESS; + } + } + +} diff --git a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java index 955d7b85..ab0f2bfb 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java +++ b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java @@ -1,7 +1,8 @@ package net.Indyuce.mmocore.gui; -import io.lumine.mythic.lib.player.modifier.PlayerModifier; +import io.lumine.mythic.lib.MythicLib; import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.api.SoundEvent; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.gui.api.EditableInventory; import net.Indyuce.mmocore.gui.api.GeneratedInventory; @@ -12,17 +13,22 @@ import net.Indyuce.mmocore.tree.IntegerCoordinates; import net.Indyuce.mmocore.tree.NodeState; import net.Indyuce.mmocore.tree.skilltree.SkillTree; import net.Indyuce.mmocore.tree.SkillTreeNode; -import org.apache.commons.lang.Validate; +import net.Indyuce.mmocore.tree.skilltree.display.Icon; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.configuration.ConfigurationSection; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; +import org.bukkit.inventory.ItemFlag; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.persistence.PersistentDataContainer; import org.bukkit.persistence.PersistentDataType; +import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; public class SkillTreeViewer extends EditableInventory { @@ -37,6 +43,20 @@ public class SkillTreeViewer extends EditableInventory { if (function.equals("skill-tree")) { return new SkillTreeItem(config); } + if (function.equals("reallocation")) + return new InventoryItem(config) { + + @Override + public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { + Placeholders holders = new Placeholders(); + holders.register("skill-tree-points", inv.getPlayerData().getSkillTreePoint(inv.getSkillTree().getId())); + holders.register("global-points", inv.getPlayerData().getSkillTreePoint("global")); + holders.register("realloc-points", inv.getPlayerData().getSkillTreeReallocationPoints()); + holders.register("total", inv.getPlayerData().countSkillTreePoints(inv.getSkillTree())); + return holders; + } + }; + if (function.equals("skill-tree-node")) return new SkillTreeNodeItem(config); if (function.equals("next-tree-list-page")) { @@ -57,17 +77,31 @@ public class SkillTreeViewer extends EditableInventory { public class SkillTreeItem extends InventoryItem { public SkillTreeItem(ConfigurationSection config) { - super(config); + //We must use this constructor to show that there are not specified material + super(Material.BARRIER, config); } + + @Override + public boolean hasDifferentDisplay() { + return true; + } + @Override public ItemStack display(SkillTreeInventory inv, int n) { - int index = 4 * inv.treeListPage + n; + int index = inv.getEditable().getByFunction("skill-tree").getSlots().size() * inv.treeListPage + n; + if (!MMOCore.plugin.skillTreeManager.has(index)) { + return new ItemStack(Material.AIR); + } SkillTree skillTree = MMOCore.plugin.skillTreeManager.get(index); //We display with the material corresponding to the skillTree - ItemStack item = super.display(inv, n, skillTree.getGuiMaterial()); + ItemStack item = super.display(inv, n, skillTree.getItem()); + ItemMeta meta = item.getItemMeta(); + meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES); + meta.setDisplayName(skillTree.getName()); + meta.setLore(skillTree.getLore()); PersistentDataContainer container = meta.getPersistentDataContainer(); container.set(new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING, skillTree.getId()); item.setItemMeta(meta); @@ -76,7 +110,7 @@ public class SkillTreeViewer extends EditableInventory { @Override public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { - int index = 4 * inv.treeListPage + n; + int index = inv.getEditable().getByFunction("skill-tree").getSlots().size() * inv.treeListPage + n; SkillTree skillTree = MMOCore.plugin.skillTreeManager.get(index); Placeholders holders = new Placeholders(); holders.register("name", skillTree.getName()); @@ -111,146 +145,65 @@ public class SkillTreeViewer extends EditableInventory { public class SkillTreeNodeItem extends InventoryItem { - private final LockedSkillNodeItem lockedSkillNode; - private final UnlockedSkillNodeItem unlockedSkillNode; - private final PathTreeNodeItem pathTreeNode; - - public SkillTreeNodeItem(ConfigurationSection config) { - super(config); - Validate.isTrue(config.contains("locked-skill-node")); - Validate.isTrue(config.contains("unlocked-skill-node")); - Validate.isTrue(config.contains("path-tree-node")); - lockedSkillNode = new LockedSkillNodeItem(config.getConfigurationSection("locked-skill-node")); - unlockedSkillNode = new UnlockedSkillNodeItem(config.getConfigurationSection("unlocked-skill-node")); - pathTreeNode = new PathTreeNodeItem(config.getConfigurationSection("path-tree-node")); + super(Material.AIR, config); } + @Override + public boolean hasDifferentDisplay() { + return true; + } + /** + * Display the node/path with the lore and name filled in the yml of the skill tree node with the right material + * and model-data. + * You don't need to give any name or lore in the gui/skilltree.yml all the information are filled in + * the yml of the skill tree. + */ @Override public ItemStack display(SkillTreeInventory inv, int n) { int slot = getSlots().get(n); int deltaX = (slot - inv.getMinSlot()) % 9; int deltaY = (slot - inv.getMinSlot()) / 9; IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY); - ItemStack item=null; - if (inv.getSkillTree().isNode(coordinates)) { - SkillTreeNode node = inv.getSkillTree().getNode(coordinates); - if (inv.getPlayerData().getNodeState(node).equals(NodeState.UNLOCKED)) - item = unlockedSkillNode.display(inv, n, coordinates); - else if (inv.getPlayerData().getNodeState(node).equals(NodeState.LOCKED)) - item = lockedSkillNode.display(inv, n, coordinates); - - } //We check if is a path only if the skillTree is an automatic Skill Tree - else if (inv.getSkillTree().isPath(coordinates)) - item = pathTreeNode.display(inv, n); - else - //If it is none of the above we just display air - return new ItemStack(Material.AIR); - - //We save the coordinates of the node - ItemMeta meta = item.getItemMeta(); - PersistentDataContainer container = meta.getPersistentDataContainer(); - container.set(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER, coordinates.getX()); - container.set(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER, coordinates.getY()); - item.setItemMeta(meta); - return item; - } - - - @Override - public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { - return new Placeholders(); - } - - } - - public class LockedSkillNodeItem extends InventoryItem { - - public LockedSkillNodeItem(ConfigurationSection config) { - super(config); - } - - public ItemStack display(SkillTreeInventory inv, int n, IntegerCoordinates coordinates) { - return super.display(inv, n); - } - - @Override - public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { - int slot = getSlots().get(n); - int deltaX = (slot - inv.getMinSlot()) % 9; - int deltaY = (slot - inv.getMinSlot()) / 9; - IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY); - SkillTreeNode treeNode = inv.getSkillTree().getNode(coordinates); - Placeholders holders = new Placeholders(); - holders.register("name", treeNode.getName()); - holders.register("node-state", inv.getPlayerData().getNodeState(treeNode)); - //Display what nodes this node unlocks - String str = ""; - for (SkillTreeNode node : treeNode.getChildren()) - str += node.getName() + ","; - //We remove the last comma - str = str.substring(0, str.length() - 1); - holders.register("unlocks", str); - //Display all the modifiers this node gives - str = ""; - for (PlayerModifier playerModifier : treeNode.getModifiers()) { - //TODO - str += "\n" + playerModifier.getKey(); + if (inv.getSkillTree().isNode(coordinates) || inv.getSkillTree().isPath(coordinates)) { + Icon icon = inv.getPlayerData().getIcon(inv.getSkillTree(), coordinates); + ItemStack item = super.display(inv, n, icon.getMaterial(), icon.getCustomModelData()); + ItemMeta meta = item.getItemMeta(); + if (inv.getSkillTree().isNode(coordinates)) { + SkillTreeNode node = inv.getSkillTree().getNode(coordinates); + List lore = new ArrayList<>(node.getLore(inv.getPlayerData())); + lore.add(""); + getLore().forEach(str -> lore.add(MythicLib.plugin.parseColors(getPlaceholders(inv, n).apply(inv.getPlayer(), str)))); + meta.setLore(lore); + meta.setDisplayName(node.getName()); + } + //If it is path we remove the display name and the lore. + else { + meta.setLore(new ArrayList<>()); + meta.setDisplayName(""); + } + meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES); + PersistentDataContainer container = meta.getPersistentDataContainer(); + container.set(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER, coordinates.getX()); + container.set(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER, coordinates.getY()); + item.setItemMeta(meta); + return item; } + return new ItemStack(Material.AIR); + } - holders.register("modifiers", str); + @Override + public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { + Placeholders holders = new Placeholders(); + holders.register("skill-tree", inv.getSkillTree().getName()); + holders.register("skill-tree-points", inv.getPlayerData().getSkillTreePoint(inv.getSkillTree().getId())); + holders.register("global-points", inv.getPlayerData().getSkillTreePoint("global")); return holders; } } - public class UnlockedSkillNodeItem extends InventoryItem { - public UnlockedSkillNodeItem(ConfigurationSection config) { - super(config); - } - - - public ItemStack display(SkillTreeInventory inv, int n, IntegerCoordinates coordinates) { - return super.display(inv, n); - } - - @Override - public Placeholders getPlaceholders(SkillTreeInventory inv, int n) { - int slot = getSlots().get(n); - int deltaX = (slot - inv.getMinSlot()) % 9; - int deltaY = (slot - inv.getMinSlot()) / 9; - IntegerCoordinates coordinates = new IntegerCoordinates(inv.getX() + deltaX, inv.getY() + deltaY); - SkillTreeNode treeNode = inv.getSkillTree().getNode(coordinates); - Placeholders holders = new Placeholders(); - holders.register("name", treeNode.getName()); - holders.register("node-state", inv.getPlayerData().getNodeState(treeNode)); - String str = ""; - for (SkillTreeNode node : treeNode.getChildren()) - str += node.getName() + ","; - //We remove the last comma - str = str.substring(0, str.length() - 1); - holders.register("unlocks", str); - str = ""; - for (PlayerModifier playerModifier : treeNode.getModifiers()) { - //TODO - str += "\n" + playerModifier.getKey(); - } - - holders.register("modifiers", str); - return holders; - } - - - } - - public class PathTreeNodeItem extends SimplePlaceholderItem { - public PathTreeNodeItem(ConfigurationSection config) { - super(config); - } - - } - public class SkillTreeInventory extends GeneratedInventory { private int x, y; @@ -265,11 +218,9 @@ public class SkillTreeViewer extends EditableInventory { public SkillTreeInventory(PlayerData playerData, EditableInventory editable) { super(playerData, editable); skillTree = playerData.getCachedSkillTree(); - - maxTreeListPage = MMOCore.plugin.skillTreeManager.getAll().size() / 4; - + maxTreeListPage = (MMOCore.plugin.skillTreeManager.getAll().size() - 1) / editable.getByFunction("skill-tree").getSlots().size(); //We get the width and height of the GUI(corresponding to the slots given) - List slots = getByFunction("skill-tree-node").getSlots(); + List slots = editable.getByFunction("skill-tree-node").getSlots(); minSlot = 64; maxSlot = 0; for (int slot : slots) { @@ -281,6 +232,8 @@ public class SkillTreeViewer extends EditableInventory { width = (maxSlot - minSlot) % 9; height = (maxSlot - minSlot) / 9; middleSlot = minSlot + width / 2 + 9 * (height / 2); + x -= width / 2; + y -= height / 2; } public int getX() { @@ -314,13 +267,8 @@ public class SkillTreeViewer extends EditableInventory { @Override public void whenClicked(InventoryClickEvent event, InventoryItem item) { - if (event.getAction().equals(InventoryAction.MOVE_TO_OTHER_INVENTORY)) { - int offset = event.getSlot() - middleSlot; - x += offset % 9; - y += offset / 9; - open(); - return; - } + + if (item.getFunction().equals("next-tree-list-page")) { treeListPage++; open(); @@ -330,16 +278,100 @@ public class SkillTreeViewer extends EditableInventory { treeListPage--; open(); } + if (item.getFunction().equals("reallocation")) { + int spent = playerData.countSkillTreePoints(skillTree); + if (spent < 1) { + MMOCore.plugin.configManager.getSimpleMessage("no-skill-tree-points-spent").send(player); + MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer()); + event.setCancelled(true); + return; + } + + if (getPlayerData().getSkillTreeReallocationPoints() <= 0) { + MMOCore.plugin.configManager.getSimpleMessage("not-skill-tree-reallocation-point").send(player); + MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer()); + event.setCancelled(true); + return; + } else { + int reallocated = playerData.countSkillTreePoints(skillTree); + //We remove all the nodeStates progress + playerData.giveSkillTreePoints(skillTree.getId(), reallocated); + playerData.giveSkillTreeReallocationPoints(-1); + for (SkillTreeNode node : skillTree.getNodes()) { + playerData.setNodeLevel(node, 0); + playerData.setNodeState(node, NodeState.LOCKED); + } + skillTree.setupNodeState(playerData); + MMOCore.plugin.configManager.getSimpleMessage("reallocated-points", "points", "" + playerData.getSkillTreePoint(skillTree.getId()), "skill-tree", skillTree.getName()).send(player); + MMOCore.plugin.soundManager.getSound(SoundEvent.RESET_SKILL_TREE).playTo(player); + event.setCancelled(true); + open(); + return; + + } + } + if (item.getFunction().equals("skill-tree")) { String id = event.getCurrentItem().getItemMeta().getPersistentDataContainer().get( new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING); playerData.setCachedSkillTree(MMOCore.plugin.skillTreeManager.get(id)); + MMOCore.plugin.soundManager.getSound(SoundEvent.CHANGE_SKILL_TREE).playTo(player); + newInventory(playerData).open(); + event.setCancelled(true); + return; } + if (item.getFunction().equals("skill-tree-node")) { + if (event.getAction().equals(InventoryAction.PICKUP_HALF)) { + int offset = event.getSlot(); + int xOffset=offset%9-middleSlot%9; + int yOffset=offset/9-middleSlot/9; + x += xOffset; + y += yOffset; + open(); + event.setCancelled(true); + return; + } + + else if (event.getAction() == InventoryAction.PICKUP_ALL) { + PersistentDataContainer container = event.getCurrentItem().getItemMeta().getPersistentDataContainer(); + int x = container.get(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER); + int y = container.get(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER); + SkillTreeNode node = skillTree.getNode(new IntegerCoordinates(x, y)); + if (playerData.canIncrementNodeLevel(node)) { + playerData.incrementNodeLevel(node); + MMOCore.plugin.configManager.getSimpleMessage("upgrade-skill-node", "skill-node", node.getName(), "level", "" + playerData.getNodeLevel(node)).send(player); + MMOCore.plugin.soundManager.getSound(SoundEvent.LEVEL_UP).playTo(getPlayer()); + open(); + event.setCancelled(true); + return; + } else if (playerData.getNodeState(node) == NodeState.LOCKED || playerData.getNodeState(node) == NodeState.FULLY_LOCKED) { + MMOCore.plugin.configManager.getSimpleMessage("locked-node").send(player); + MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer()); + event.setCancelled(true); + return; + + } else if (playerData.getNodeLevel(node) >= node.getMaxLevel()) { + MMOCore.plugin.configManager.getSimpleMessage("skill-node-max-level-hit").send(player); + MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer()); + event.setCancelled(true); + return; + } + + //Else the player doesn't doesn't have the skill tree points + else { + MMOCore.plugin.configManager.getSimpleMessage("not-enough-skill-tree-points").send(player); + MMOCore.plugin.soundManager.getSound(SoundEvent.NOT_ENOUGH_POINTS).playTo(getPlayer()); + event.setCancelled(true); + return; + } + + } } + } } } diff --git a/src/main/java/net/Indyuce/mmocore/gui/api/item/InventoryItem.java b/src/main/java/net/Indyuce/mmocore/gui/api/item/InventoryItem.java index 86b737ca..87a2f0b5 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/api/item/InventoryItem.java +++ b/src/main/java/net/Indyuce/mmocore/gui/api/item/InventoryItem.java @@ -133,16 +133,20 @@ public abstract class InventoryItem { return display(inv, 0); } - public ItemStack display(T inv,int n) { - return display(inv,n,null); + public ItemStack display(T inv, int n) { + return display(inv, n, null); } - public ItemStack display(T inv, int n,Material specificMaterial) { + public ItemStack display(T inv, int n, Material specificMaterial) { + return display(inv, n, specificMaterial, 0); + } + + public ItemStack display(T inv, int n, Material specificMaterial, int modelData) { Placeholders placeholders = getPlaceholders(inv, n); - ItemStack item = new ItemStack(specificMaterial==null?material:specificMaterial); + ItemStack item = new ItemStack(specificMaterial == null ? material : specificMaterial); ItemMeta meta = item.getItemMeta(); - + meta.setCustomModelData(modelData); if (texture != null && meta instanceof SkullMeta) applyTexture(texture, (SkullMeta) meta); @@ -165,6 +169,7 @@ public abstract class InventoryItem { return item; } + private void applyTexture(String value, SkullMeta meta) { try { GameProfile profile = new GameProfile(UUID.randomUUID(), null); diff --git a/src/main/java/net/Indyuce/mmocore/manager/ConfigManager.java b/src/main/java/net/Indyuce/mmocore/manager/ConfigManager.java index 96a41f87..52fd2d55 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/ConfigManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/ConfigManager.java @@ -74,6 +74,9 @@ public class ConfigManager { loadDefaultFile("expcurves", "levels.txt"); loadDefaultFile("expcurves", "mining.txt"); } + if(!new File(MMOCore.plugin.getDataFolder()+"/skilltree").exists()) { + loadDefaultFile("skilltree","combat.yml"); + } loadDefaultFile("attributes.yml"); loadDefaultFile("items.yml"); diff --git a/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java b/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java index 599de4bf..1f51956f 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/InventoryManager.java @@ -32,7 +32,7 @@ public class InventoryManager { public static final QuestViewer QUEST_LIST = new QuestViewer(); public static final AttributeView ATTRIBUTE_VIEW = new AttributeView(); public static final SkillTreeViewer TREE_VIEW = new SkillTreeViewer(); - public static final List list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION); + public static final List list = Arrays.asList(PLAYER_STATS, ATTRIBUTE_VIEW, TREE_VIEW,SKILL_LIST, CLASS_SELECT, SUBCLASS_SELECT, SUBCLASS_CONFIRM, QUEST_LIST, WAYPOINTS, CLASS_CONFIRM, FRIEND_LIST, FRIEND_REMOVAL, PARTY_VIEW, PARTY_CREATION, GUILD_VIEW, GUILD_CREATION); public static void load() { list.forEach(inv -> { diff --git a/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java b/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java index 1d005cf9..7dfe3af5 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java @@ -1,7 +1,6 @@ package net.Indyuce.mmocore.manager; import net.Indyuce.mmocore.MMOCore; -import net.Indyuce.mmocore.gui.SkillTreeViewer; import net.Indyuce.mmocore.manager.registry.MMOCoreRegister; import net.Indyuce.mmocore.tree.SkillTreeNode; import net.Indyuce.mmocore.tree.skilltree.SkillTree; @@ -23,6 +22,18 @@ public class SkillTreeManager extends MMOCoreRegister { tree.getNodes().forEach((node)->skillTreeNodes.add(node)); } + public boolean has(int index) { + return index>=0 &&index getRootNodes() { + return skillTreeNodes.stream().filter(treeNode -> treeNode.getSoftParents().size()==0).collect(Collectors.toList()); + } public ArrayList getAllNodes() { return skillTreeNodes; diff --git a/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java b/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java index df083d7a..9183299a 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java @@ -29,6 +29,7 @@ public class MySQLPlayerDataManager extends PlayerDataManager { this.provider = provider; } + //TODO SkillTree pour SQL @Override public void loadData(PlayerData data) { provider.getResult("SELECT * FROM mmocore_playerdata WHERE uuid = '" + data.getUniqueId() + "';", (result) -> { diff --git a/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java b/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java index fbfd93e5..1a74fb23 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java @@ -10,9 +10,11 @@ import net.Indyuce.mmocore.api.player.stats.StatType; import net.Indyuce.mmocore.guild.provided.Guild; import net.Indyuce.mmocore.manager.data.DataProvider; import net.Indyuce.mmocore.manager.data.PlayerDataManager; -import net.Indyuce.mmocore.tree.NodeState; import net.Indyuce.mmocore.tree.SkillTreeNode; +import net.Indyuce.mmocore.tree.skilltree.SkillTree; import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; +import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.file.FileConfiguration; import org.jetbrains.annotations.NotNull; @@ -72,13 +74,36 @@ public class YAMLPlayerDataManager extends PlayerDataManager { if (config.contains("times-claimed")) for (String key : config.getConfigurationSection("times-claimed").getKeys(true)) data.getItemClaims().put(key, config.getInt("times-claimed." + key)); + //Load skill tree nodes + for (SkillTreeNode node : MMOCore.plugin.skillTreeManager.getAllNodes()) { - String str = config.getString("skill-tree-nodes." + node.getTree().getId() + "." + node.getId()); - if (str == null) - data.setNodeState(node, NodeState.LOCKED); - else - data.setNodeState(node,NodeState.valueOf(str)); + String path = "skill-tree-nodes." + node.getTree().getId() + "." + node.getId(); + + if (config.contains(path)) + data.setNodeLevel(node, config.getInt(path)); + else { + data.setNodeLevel(node, 0); + } } + //Setup the nodeStates + data.setupNodeState(); + //Load skill tree points + ConfigurationSection section = config.getConfigurationSection("skill-tree-points"); + if (section != null) { + for (String key : section.getKeys(false)) + data.setSkillTreePoints(key, section.getInt(key)); + + } + //Put 0 to the rest of the values if nothing has been given + List skillTreeIds = MMOCore.plugin.skillTreeManager.getAll().stream().map(SkillTree::getId).collect(Collectors.toList()); + skillTreeIds.add("global"); + for (String treeId : skillTreeIds) { + if (!data.containsSkillPointTreeId(treeId)) + data.setSkillTreePoints(treeId, 0); + } + + data.setSkillTreeReallocationPoints(config.getInt("skill-tree-reallocation-points",0)); + // Load class slots, use try so the player can log in. if (config.contains("class-info")) for (String key : config.getConfigurationSection("class-info").getKeys(false)) @@ -115,10 +140,17 @@ public class YAMLPlayerDataManager extends PlayerDataManager { data.mapSkillLevels().forEach((key1, value) -> config.set("skill." + key1, value)); data.getItemClaims().forEach((key, times) -> config.set("times-claimed." + key, times)); - //Save the node states for the player + //Save the node levels for the player for (SkillTreeNode node : MMOCore.plugin.skillTreeManager.getAllNodes()) { - config.set("skill-tree-nodes." + node.getTree().getId() + "." + node.getId(),data.getNodeState(node)); + config.set("skill-tree-nodes." + node.getTree().getId() + "." + node.getId(), data.getNodeLevel(node)); } + + //Saves skill tree points + for (String treeId : data.getSkillTreePoints().keySet()) { + config.set("skill-tree-points." + treeId, data.getSkillTreePoint(treeId)); + } + config.set("skill-tree-reallocation-points",data.getSkillTreeReallocationPoints()); + List boundSkills = new ArrayList<>(); data.getBoundSkills().forEach(skill -> boundSkills.add(skill.getSkill().getHandler().getId())); config.set("bound-skills", boundSkills); diff --git a/src/main/java/net/Indyuce/mmocore/manager/registry/MMOCoreRegister.java b/src/main/java/net/Indyuce/mmocore/manager/registry/MMOCoreRegister.java index 5a33ce8c..f4c59ca1 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/registry/MMOCoreRegister.java +++ b/src/main/java/net/Indyuce/mmocore/manager/registry/MMOCoreRegister.java @@ -21,6 +21,9 @@ public abstract class MMOCoreRegister implements MMOCo public T get(String id) { return Objects.requireNonNull(registered.get(id), "Could not find " + getRegisteredObjectName() + " with ID '" + id + "'"); } + public boolean has(String id){ + return registered.containsKey(id); + } public Collection getAll() { return registered.values(); diff --git a/src/main/java/net/Indyuce/mmocore/tree/NodeState.java b/src/main/java/net/Indyuce/mmocore/tree/NodeState.java index 33ff58b0..0492e4ff 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/NodeState.java +++ b/src/main/java/net/Indyuce/mmocore/tree/NodeState.java @@ -1,5 +1,6 @@ package net.Indyuce.mmocore.tree; public enum NodeState { - LOCKED,UNLOCKED; + LOCKED,UNLOCKED,UNLOCKABLE,FULLY_LOCKED; + } diff --git a/src/main/java/net/Indyuce/mmocore/tree/ParentType.java b/src/main/java/net/Indyuce/mmocore/tree/ParentType.java new file mode 100644 index 00000000..a35f2a2d --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/ParentType.java @@ -0,0 +1,5 @@ +package net.Indyuce.mmocore.tree; + +public enum ParentType { + SOFT,STRONG; +} diff --git a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java index cf3d79f8..87721873 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java @@ -1,141 +1,258 @@ package net.Indyuce.mmocore.tree; +import com.gmail.nossr50.mcmmo.acf.annotation.HelpSearchTags; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.player.modifier.PlayerModifier; -import io.lumine.mythic.lib.util.configobject.ConfigSectionObject; import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.api.player.PlayerData; +import net.Indyuce.mmocore.api.quest.trigger.Trigger; import net.Indyuce.mmocore.api.util.MMOCoreUtils; +import net.Indyuce.mmocore.gui.api.item.Placeholders; import net.Indyuce.mmocore.player.Unlockable; import net.Indyuce.mmocore.tree.skilltree.AutomaticSkillTree; import net.Indyuce.mmocore.tree.skilltree.SkillTree; import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; import java.util.*; +//We must use generics to get the type of the corresponding tree public class SkillTreeNode implements Unlockable { private final SkillTree tree; - private final String name,id; + private final String name, id; private IntegerCoordinates coordinates; - private final List lore; - private final Set modifiers = new HashSet<>(); - private final ArrayList children = new ArrayList<>(); - private final ArrayList parents=new ArrayList<>(); + private boolean isRoot; + /** + * The lore corresponding to each level + */ + private final HashMap> lores = new HashMap<>(); + //TODO modifiers depending on level with drop tables + private final HashMap> modifiers = new HashMap<>(); + private final HashMap> triggers = new HashMap<>(); + //The max level the skill tree node can have and the max amount of children it can have. + private final int maxLevel, maxChildren, size; + private final ArrayList children = new ArrayList<>(); + /** + * Associates the required level to each parent + * You only need to have the requirement for one of your softParents but you need to fulfill the requirements + * of all of your strong parents. + **/ + + + private final HashMap softParents = new HashMap<>(); + private final HashMap strongParents = new HashMap<>(); public SkillTreeNode(SkillTree tree, ConfigurationSection config) { Validate.notNull(config, "Config cannot be null"); - this.id=config.getName(); + this.id = config.getName(); this.tree = tree; name = Objects.requireNonNull(config.getString("name"), "Could not find node name"); - lore = config.getStringList("lore"); - Validate.isTrue(config.contains("node-type"),"Could not find the node type"); + size = Objects.requireNonNull(config.getInt("size")); + isRoot = config.contains("is-root") ? config.getBoolean("is-root") ? true : false : false; + //We initialize the value of the lore for each skill tree node. + for (String state : Objects.requireNonNull(config.getConfigurationSection("lores")).getKeys(false)) { + NodeState nodeState = NodeState.valueOf(MMOCoreUtils.toEnumName(state)); + if (nodeState == NodeState.UNLOCKED) { + //TODO: Message could'nt load ... instead of exception + ConfigurationSection section = config.getConfigurationSection("lores." + state); + for (String level : section.getKeys(false)) { + lores.put(new NodeContext(nodeState, Integer.parseInt(level)), section.getStringList(level)); + } + } else { + lores.put(new NodeContext(nodeState, 0), config.getStringList("lores." + state)); + } + } + maxLevel = config.contains("max-level") ? config.getInt("max-level") : 1; + maxChildren = config.contains("max-children") ? config.getInt("max-children") : 1; + //If coordinates are precised adn we are not wiht an automaticTree we set them up + if ((!(tree instanceof AutomaticSkillTree)) && config.contains("coordinates.x") && config.contains("coordinates.y")) { + coordinates = new IntegerCoordinates(config.getInt("coordinates.x"), config.getInt("coordinates.y")); + } + /* + if (config.contains("modifiers")) { + for (String key : config.getConfigurationSection("modifiers").getKeys(false)) { + PlayerModifier mod = MythicLib.plugin.getModifiers().loadPlayerModifier(new ConfigSectionObject(config.getConfigurationSection(key))); + modifiers.put(1, mod); + } + } + */ - //If coordinates are precised adn we are not wiht an automaticTreewe set them up - if((!(tree instanceof AutomaticSkillTree))&&config.contains("coordinates.x")&&config.contains("coordinates.y")) { - coordinates=new IntegerCoordinates(config.getInt("coordinates.x"),config.getInt("coordinates.y")); - } - for (String key : config.getConfigurationSection("modifiers").getKeys(false)) { - PlayerModifier mod = MythicLib.plugin.getModifiers().loadPlayerModifier(new ConfigSectionObject(config.getConfigurationSection(key))); - modifiers.add(mod); - } } - public SkillTreeNode(SkillTree tree, int x, int y, ConfigurationSection config) { - Validate.notNull(config, "Config cannot be null"); - this.id=config.getName(); - this.tree = tree; - name = Objects.requireNonNull(config.getString("name"), "Could not find node name"); - Validate.isTrue(config.contains("node-type"),"Could not find the node type"); - coordinates = new IntegerCoordinates(x, y); - lore = config.getStringList("lore"); - for (String key : config.getConfigurationSection("modifiers").getKeys(false)) { - PlayerModifier mod = MythicLib.plugin.getModifiers().loadPlayerModifier(new ConfigSectionObject(config.getConfigurationSection(key))); - modifiers.add(mod); - } - } - - - /** - * - */ - protected void whenPostLoaded(@NotNull ConfigurationSection config) { - - } public SkillTree getTree() { return tree; } - //Used when postLoaded - public void addParent(SkillTreeNode parent) { - parents.add(parent); + public boolean isRoot() { + return isRoot; } - public void addChild(SkillTreeNode child) {children.add(child);} + //Used when postLoaded + public void addParent(SkillTreeNode parent, int requiredLevel, ParentType parentType) { + if (parentType == ParentType.SOFT) + softParents.put(parent, requiredLevel); + else + strongParents.put(parent, requiredLevel); + } + + public void addChild(SkillTreeNode child) { + children.add(child); + } public void setCoordinates(IntegerCoordinates coordinates) { this.coordinates = coordinates; } + public int getParentNeededLevel(SkillTreeNode parent) { + return softParents.containsKey(parent) ? softParents.get(parent) : strongParents.containsKey(parent) ? strongParents.get(parent) : 0; + } - public ArrayList getParents() { - return parents; + public boolean hasParent(SkillTreeNode parent) { + return softParents.containsKey(parent) || strongParents.containsKey(parent); + } + + public int getMaxLevel() { + return maxLevel; + } + + + public int getMaxChildren() { + return maxChildren; + } + + public Set getSoftParents() { + return softParents.keySet(); + } + + public Set getStrongParents() { + return strongParents.keySet(); } public ArrayList getChildren() { return children; } - + public int getSize() { + return size; + } public String getId() { return id; } public String getName() { - return name; + return MythicLib.plugin.parseColors( name); } public IntegerCoordinates getCoordinates() { return coordinates; } - public Set getModifiers() { - return modifiers; + public Set getModifiers(int level) { + return modifiers.get(level); } - /** - * @return Uncolored lore with no placeholders - */ - public List getLore() { - return lore; + + public Set getTriggers(int level) { + return triggers.get(level); } + @Override public String getUnlockNamespacedKey() { return "skill_tree:" + tree.getId() + "_" + coordinates.getX() + "_" + coordinates.getY(); } - @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SkillTreeNode that = (SkillTreeNode) o; - return tree.equals(that.tree) && coordinates.equals(that.coordinates); + return tree.equals(that.tree) && (id.equals(that.id)); } @Override public int hashCode() { - return Objects.hash(tree, coordinates); + return Objects.hash(tree, id); } + public Placeholders getPlaceholders(PlayerData playerData) { + Placeholders holders = new Placeholders(); + holders.register("name", getName()); + holders.register("node-state", playerData.getNodeState(this)); + holders.register("size", getSize()); + holders.register("level", playerData.getNodeLevel(this)); + holders.register("max-level", getMaxLevel()); + holders.register("max-children", getMaxChildren()); + + //List of all the children of the node + String str = ""; + for (SkillTreeNode node : getChildren()) + str += node.getName() + ","; + //We remove the last comma + if (str.length() != 0) + str = str.substring(0, str.length() - 1); + holders.register("children", str); + + //list of parents with the level needed for each of them + str = ""; + for (SkillTreeNode node : getSoftParents()) + str += node.getName() + " " + MMOCoreUtils.toRomanNumerals(getParentNeededLevel(node)) + ","; + //We remove the last comma + if (str.length() != 0) + str = str.substring(0, str.length() - 1); + holders.register("soft-parents-level", str); + + //list of parents + str = ""; + for (SkillTreeNode node : getSoftParents()) + str += node.getName() + ","; + //We remove the last comma + if (str.length() != 0) + str = str.substring(0, str.length() - 1); + holders.register("soft-parents", str); + + //list of parents with the level needed for each of them + str = ""; + for (SkillTreeNode node : getStrongParents()) + str += node.getName() + " " + MMOCoreUtils.toRomanNumerals(getParentNeededLevel(node)) + ","; + //We remove the last comma + if (str.length() != 0) + str = str.substring(0, str.length() - 1); + holders.register("strong-parents-level", str); + + //list of parents + str = ""; + for (SkillTreeNode node : getStrongParents()) + str += node.getName() + ","; + //We remove the last comma + if (str.length() != 0) + str = str.substring(0, str.length() - 1); + holders.register("strong-parents", str); + + return holders; + } + + public List getLore(PlayerData playerData) { + Placeholders holders = getPlaceholders(playerData); + List parsedLore = new ArrayList<>(); + NodeContext context= new NodeContext(playerData.getNodeState(this),playerData.getNodeLevel(this)); + lores.get(context).forEach(string -> parsedLore.add( + MythicLib.plugin.parseColors( holders.apply(playerData.getPlayer(), string)))); + return parsedLore; + + } + + + /** * @param namespacedKey Something like "skill_tree:tree_name_1_5" * @return The corresponding skill tree node @@ -158,4 +275,46 @@ public class SkillTreeNode implements Unlockable { return MMOCore.plugin.skillTreeManager.get(treeId).getNode(coords); } + public class NodeContext { + private final NodeState nodeState; + private final int nodeLevel; + + public NodeContext(NodeState nodeState, int nodeLevel) { + this.nodeState = nodeState; + this.nodeLevel = nodeLevel; + } + + public NodeState getNodeState() { + return nodeState; + } + + public int getNodeLevel() { + return nodeLevel; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + NodeContext that = (NodeContext) o; + return nodeLevel == that.nodeLevel && nodeState == that.nodeState; + } + + @Override + public String toString() { + return "NodeContext{" + + "nodeState=" + nodeState + + ", nodeLevel=" + nodeLevel + + '}'; + } + + @Override + public int hashCode() { + return Objects.hash(nodeState, nodeLevel); + } + } + + + + } diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java index a8336f09..a90b5cce 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java @@ -1,19 +1,25 @@ package net.Indyuce.mmocore.tree.skilltree; +import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.ParentType; import net.Indyuce.mmocore.tree.SkillTreeNode; import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; -import java.util.ArrayList; +import javax.swing.text.html.HTMLDocument; import java.util.HashMap; +import java.util.Objects; +import java.util.logging.Level; +/** + * Skill Trees where you only need to fill the strong and soft + */ public class AutomaticSkillTree extends SkillTree { private SkillTreeNode root; - //Represents all the coordinates that will be displayed as a path (between 2 nodes of the tree) - private final ArrayList pathToParents = new ArrayList<>(); - //Hash map to store the left and right branches of each node + //Hash map to store the number of left and right branches of each node private final HashMap nodeBranches = new HashMap<>(); public AutomaticSkillTree(ConfigurationSection config) { @@ -25,20 +31,31 @@ public class AutomaticSkillTree extends SkillTree { //We setup the children and parents for each node. - for (SkillTreeNode node : nodes.values()) { - ConfigurationSection section = config.getConfigurationSection(node.getId()); - for (String child : section.getStringList("children")) { - node.addChild(getNode(child)); - getNode(child).addParent(node); + for(SkillTreeNode node:nodes.values()) { + ConfigurationSection section = config.getConfigurationSection("nodes."+node.getId() + ".children.soft"); + if(section!=null) { + for (String child : section.getKeys(false)) { + node.addChild(getNode(child)); + getNode(child).addParent(node, section.getInt(child), ParentType.SOFT); + } } + section = config.getConfigurationSection("nodes."+node.getId() + ".children.strong"); + + if(section!=null) { + for (String child : section.getKeys(false)) { + node.addChild(getNode(child)); + getNode(child).addParent(node, section.getInt(child), ParentType.STRONG); + } + } + } - - //We find the root of the tree wich is for (SkillTreeNode node : nodes.values()) { - if (node.getParents().size() == 0) { - Validate.isTrue(root == null, "Their can't be more than 1 root in the skillTree!"); - root = node; + if (node.getSoftParents().size() == 0&&node.getStrongParents().size()==0) { + Validate.isTrue(root == null, "You can't have 2 roots on one automatic skill tree. You have "+(root!=null?root.getName():"")+" and "+node.getName()+"."); + root = node; + + } } //We setup the width of all the nodes recursively @@ -57,8 +74,8 @@ public class AutomaticSkillTree extends SkillTree { maxY = node.getCoordinates().getY(); } - //Eventually we setup the coordinateNodesMap - super.setupCoordinatesNodesMap(); + //Eventually we setup the skill tree info related to coordinates + super.coordinatesSetup(); } @@ -85,6 +102,7 @@ public class AutomaticSkillTree extends SkillTree { rightOffset += 2 + nodeBranches.get(child).getRightBranches(); } else if (i % 2 == 0) { child.setCoordinates(new IntegerCoordinates(x - leftOffset - 2 - nodeBranches.get(child).getWidth(), y + 2)); + for(SkillTreeNode skillTree : nodeBranches.keySet()) leftOffset += 2 + nodeBranches.get(child).getWidth(); } else { child.setCoordinates(new IntegerCoordinates(x + rightOffset + 2 + nodeBranches.get(child).getWidth(), y + 2)); @@ -95,11 +113,11 @@ public class AutomaticSkillTree extends SkillTree { int childX = child.getCoordinates().getX(); int childY = child.getCoordinates().getY(); - int parentX = node.getParents().get(0).getCoordinates().getX(); - pathToParents.add(new IntegerCoordinates(childX, childY - 1)); + int parentX = node.getSoftParents().size()!=0?((SkillTreeNode)node.getSoftParents().toArray()[0]).getCoordinates().getX():((SkillTreeNode)node.getStrongParents().toArray()[0]).getCoordinates().getX(); + paths.add(new IntegerCoordinates(childX, childY - 1)); int offset = childX > parentX ? -1 : 1; while (childX != parentX) { - pathToParents.add(new IntegerCoordinates(childX, childY - 2)); + paths.add(new IntegerCoordinates(childX, childY - 2)); childX += offset; } @@ -118,13 +136,15 @@ public class AutomaticSkillTree extends SkillTree { * Recursively sed to setup all the right and left branches of the node to later determine its coordinates for GUI display */ public void setupTreeWidth(SkillTreeNode node) { + int childrenSize = node.getChildren().size(); int leftBranches = 0; int rightBranches = 0; for (int i = 0; i < childrenSize; i++) { SkillTreeNode child = node.getChildren().get(i); setupTreeWidth(child); - if (childrenSize % 2 == 0 && i == 0) { + //If there is an odd number ob branches the first one will be at the center so we add to the left and to the right + if (childrenSize % 2 == 1 && i == 0) { leftBranches += nodeBranches.get(child).getLeftBranches(); rightBranches += nodeBranches.get(child).getRightBranches(); @@ -133,16 +153,11 @@ public class AutomaticSkillTree extends SkillTree { } else { rightBranches += nodeBranches.get(child).getWidth() + 2; } - } - } - @Override - public boolean isPath(IntegerCoordinates coordinates) { - return pathToParents.contains(coordinates); + nodeBranches.put(node,new Branches(leftBranches,rightBranches)); } - private class Branches { private final int leftBranches, rightBranches; @@ -162,6 +177,28 @@ public class AutomaticSkillTree extends SkillTree { public int getWidth() { return leftBranches + rightBranches; } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Branches branches = (Branches) o; + return leftBranches == branches.leftBranches && rightBranches == branches.rightBranches; + } + + + @Override + public String toString() { + return "Branches{" + + "leftBranches=" + leftBranches + + ", rightBranches=" + rightBranches + + '}'; + } + + @Override + public int hashCode() { + return Objects.hash(leftBranches, rightBranches); + } } } diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/CustomSkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/CustomSkillTree.java index 25beed35..b18b8c40 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/CustomSkillTree.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/CustomSkillTree.java @@ -1,21 +1,41 @@ package net.Indyuce.mmocore.tree.skilltree; -import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.ParentType; +import net.Indyuce.mmocore.tree.SkillTreeNode; import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; public class CustomSkillTree extends SkillTree{ public CustomSkillTree(ConfigurationSection config) { super(config); - } - @Override - protected void whenPostLoaded(@NotNull ConfigurationSection configurationSection) { + //We setup the coordinate map because coordinates are given in the yml for linked skill tree + super.coordinatesSetup(); + + } @Override - public boolean isPath(IntegerCoordinates coordinates) { - return false; + protected void whenPostLoaded(@NotNull ConfigurationSection config) { + + //We setup the children and parents for each node. + for (SkillTreeNode node : nodes.values()) { + ConfigurationSection section = config.getConfigurationSection(node.getId() + ".children.soft"); + if(section!=null) { + for (String child : section.getKeys(false)) { + node.addChild(getNode(child)); + getNode(child).addParent(node, section.getInt(child), ParentType.SOFT); + } + } + section = config.getConfigurationSection(node.getId() + ".children.strong"); + if(section!=null) { + for (String child : section.getKeys(false)) { + node.addChild(getNode(child)); + getNode(child).addParent(node, section.getInt(child), ParentType.STRONG); + } + } + } } + } diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/LinkedSkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/LinkedSkillTree.java index a6221fa7..f902efe4 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/LinkedSkillTree.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/LinkedSkillTree.java @@ -1,64 +1,154 @@ package net.Indyuce.mmocore.tree.skilltree; -import io.netty.handler.codec.http.cookie.CookieDecoder; +import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.NodeState; +import net.Indyuce.mmocore.tree.ParentType; import net.Indyuce.mmocore.tree.SkillTreeNode; import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.scheduler.BukkitTask; import org.jetbrains.annotations.NotNull; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; -public class LinkedSkillTree extends SkillTree{ +/** + * For linked skillTrees there is no notion of children and parents you must have some neighbours unlocked in order to + * be unlockable. All the relationships in the tree are defined by the coordinates you nodes have. + */ +public class LinkedSkillTree extends SkillTree { public LinkedSkillTree(ConfigurationSection config) { super(config); - //We setup the coordinate map because coordinates are given in the yml for linked skill tree - setupCoordinatesNodesMap(); + coordinatesSetup(); } - @Override - protected void whenPostLoaded(@NotNull ConfigurationSection configurationSection) { + protected void whenPostLoaded(@NotNull ConfigurationSection config) { + //We setup the children and parents if a node precise a required level for upgrade. + //If it is not filled the algorithm will put the required level to 1 + for (SkillTreeNode node : nodes.values()) { + if (config.contains(node.getId() + ".children")) { + ConfigurationSection section = config.getConfigurationSection(node.getId() + ".children.soft"); + if (section != null) { + for (String child : section.getKeys(false)) { + node.addChild(getNode(child)); + getNode(child).addParent(node, section.getInt(child), ParentType.SOFT); + } + } + section = config.getConfigurationSection(node.getId() + ".children.strong"); + if (section != null) { + for (String child : section.getKeys(false)) { + node.addChild(getNode(child)); + getNode(child).addParent(node, section.getInt(child), ParentType.STRONG); + } + } - SkillTreeNode root=getNode(new IntegerCoordinates(0,0)); - Validate.notNull(root,"Their must be a node(the root of the tree) at the coordinates (0,0) "); - //We setup all the children and parent relations between the nodes - setupChildren(root); + } + } + + SkillTreeNode root = getNode(new IntegerCoordinates(0, 0)); + Validate.notNull(root, "Their must be a node(the root of the tree) at the coordinates (0,0) "); } - /** - * There is no paths on a linked skill tree - */ + @Override - public boolean isPath(IntegerCoordinates coordinates) { - return false; - } + public void setupNodeStateFrom(SkillTreeNode node, PlayerData playerData) { - /** - * Recursive algorithm to setup the parents and children of each skillTreeNode - */ - public void setupChildren(SkillTreeNode node) { - int x=node.getCoordinates().getX(); - int y=node.getCoordinates().getY(); - List checkCoordinates= Arrays.asList(new IntegerCoordinates(x+1,y), - new IntegerCoordinates(x-1,y),new IntegerCoordinates(x,y+1),new IntegerCoordinates(x,y-1)); - for(IntegerCoordinates coor:checkCoordinates) { - //We add Parent and child only if the node exists and doesn't have a parent already + int x = node.getCoordinates().getX(); + int y = node.getCoordinates().getY(); + List checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y), + new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1)); + if (playerData.getNodeLevel(node) > 0) { + playerData.setNodeState(node, NodeState.UNLOCKED); + } else if (playerData.getNodeLevel(node) == 0 && node.isRoot()) { + playerData.setNodeState(node, NodeState.UNLOCKABLE); + } else { + boolean isUnlockable = false; + for (IntegerCoordinates coordinates : checkCoordinates) { + if (isNode(coordinates)) + if (isNode(coordinates) && playerData.getNodeState(getNode(coordinates)) == NodeState.UNLOCKED && numberNeighbours(coordinates, playerData) <= getNode(coordinates).getMaxChildren()) + isUnlockable = true; + } + if (isUnlockable) + playerData.setNodeState(node, NodeState.UNLOCKABLE); + else { + List parents = new ArrayList<>(); + parents.add(node); + boolean isFullyLocked = isFullyLockedFrom(node, parents, playerData); - if(isNode(coor)) { - SkillTreeNode child=getNode(coor); - if(child.getParents().size()==0) { - child.addParent(node); - node.addChild(child); - //We call recursively the algorithm - setupChildren(child); - }} + if (isFullyLocked) + playerData.setNodeState(node, NodeState.FULLY_LOCKED); + else + playerData.setNodeState(node, NodeState.LOCKED); + } } + + //We call the recursive algorithm on the rest of the points. Doesn't call the algorithm if already loaded. + for (IntegerCoordinates coordinates : checkCoordinates) { + if (isNode(coordinates) && !playerData.hasNodeState(getNode(coordinates))) + setupNodeStateFrom(getNode(coordinates), playerData); + } + } + + + //Counts the number of Unlocked Nieghbourgs of a node for a certain playerData + private int numberNeighbours(IntegerCoordinates coor, PlayerData playerData) { + int number = 0; + int x = coor.getX(); + int y = coor.getY(); + List checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y), + new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1)); + for (IntegerCoordinates coordinates : checkCoordinates) { + if (isNode(coordinates) && playerData.getNodeLevel(getNode(coordinates)) > 0) + number++; + } + return number; + } + + + /** + * A recursive algorithm to see if a node is fully locked or not in a linked skill tree + */ + public boolean isFullyLockedFrom(SkillTreeNode current, List parents, PlayerData playerData) { + if (!parents.contains(current) && (playerData.getNodeState(current) == NodeState.UNLOCKABLE || playerData.getNodeState(current) == NodeState.UNLOCKED)) { + //If the node is unlocked either we say it is not fully locked if a path can be found either wer return true is not path can be found down this way + if (numberNeighbours(current.getCoordinates(), playerData) <= getNode(current.getCoordinates()).getMaxChildren()) { + return false; + } else + return true; + } + //We verify that the node is unlocked or unlockable and can have links the first node + + int x = current.getCoordinates().getX(); + int y = current.getCoordinates().getY(); + List checkCoordinates = Arrays.asList(new IntegerCoordinates(x + 1, y), + new IntegerCoordinates(x - 1, y), new IntegerCoordinates(x, y + 1), new IntegerCoordinates(x, y - 1)); + //We filter coordinates with only nodes that are not parents and not fully locked + //We also need to have the number of neighbour <=max-child(max-child=1 -> can have 1 neighbour but if it has 2 it will make the other branches fully blocked + checkCoordinates = checkCoordinates.stream().filter(coor -> isNode(coor) + && playerData.getNodeState(getNode(coor)) != NodeState.FULLY_LOCKED + && !parents.contains(getNode(coor)) + ).collect(Collectors.toList()); + + boolean isFullyLocked = true; + + parents.add(current); + for (IntegerCoordinates coordinates : checkCoordinates) { + if (!isFullyLockedFrom(getNode(coordinates), parents, playerData)) { + isFullyLocked = false; + //Very important to break to stop the recursion algorithm once one unlockable point has been found + break; + } + } + return isFullyLocked; } } diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java index 1b15c8d8..62f6f75b 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java @@ -1,18 +1,25 @@ package net.Indyuce.mmocore.tree.skilltree; +import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.util.PostLoadObject; +import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.manager.registry.RegisterObject; -import net.Indyuce.mmocore.tree.IntegerCoordinates; import net.Indyuce.mmocore.tree.NodeState; +import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo; +import net.Indyuce.mmocore.tree.skilltree.display.Icon; +import net.Indyuce.mmocore.tree.IntegerCoordinates; import net.Indyuce.mmocore.tree.SkillTreeNode; import org.apache.commons.lang.Validate; +import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; +import java.util.logging.Level; /** * A passive skill tree that features nodes, or passive skills. @@ -32,33 +39,92 @@ import java.util.*; */ public abstract class SkillTree extends PostLoadObject implements RegisterObject { private final String id, name; - private final Material guiMaterial; + private final List lore=new ArrayList<>(); + private final Material item; //2 different maps to get the nodes + + //Represents all the coordinates that will be displayed as a path (between 2 nodes of the tree) + protected final ArrayList paths = new ArrayList<>(); + //Represents all the nodes protected final Map coordinatesNodes = new HashMap<>(); protected final Map nodes = new HashMap<>(); //Caches the height of the skill tree protected int minX, minY, maxX, maxY; + protected final HashMap icons = new HashMap<>(); + protected final HashSet roots = new HashSet<>(); public SkillTree(ConfigurationSection config) { super(config); this.id = Objects.requireNonNull(config.getString("id"), "Could not find skill tree id"); - this.name = Objects.requireNonNull(config.getString("name"), "Could not find skill tree name"); - this.guiMaterial = Material.valueOf(MMOCoreUtils.toEnumName(Objects.requireNonNull(config.getString("material")))); + this.name = MythicLib.plugin.parseColors(Objects.requireNonNull(config.getString("name"), "Could not find skill tree name")); + Objects.requireNonNull(config.getStringList("lore"),"Could not find skill tree lore").forEach(str->lore.add(MythicLib.plugin.parseColors(str ))); + this.item = Material.valueOf(MMOCoreUtils.toEnumName(Objects.requireNonNull(config.getString("item")))); Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find any nodes in the tree"); for (String key : config.getConfigurationSection("nodes").getKeys(false)) { SkillTreeNode node = new SkillTreeNode(this, config.getConfigurationSection("nodes." + key)); + nodes.put(node.getId(), node); + } + try { + if (config.contains("paths")) { + ConfigurationSection section = config.getConfigurationSection("paths"); + for (String key : section.getKeys(false)) { + if (section.contains(key + ".x") && section.contains(key + ".y")) { + paths.add(new IntegerCoordinates(section.getInt(key + ".x"), section.getInt(key + ".y"))); + } + + } + } + } catch (Exception e) { + Bukkit.getLogger().log(Level.WARNING, "Couldn't load paths for skill tree: " + id); + } + + + try { + //Load the icons of the skill tree. + for (String key : config.getConfigurationSection("icons").getKeys(false)) { + if (key.equalsIgnoreCase("path")) { + icons.put(DisplayInfo.pathInfo, new Icon(config.getConfigurationSection("icons." + key))); + } + for (String size : config.getConfigurationSection("icons." + key).getKeys(false)) { + if(key.equalsIgnoreCase("path")) { + DisplayInfo displayInfo = DisplayInfo.pathInfo; + Icon icon = new Icon(config.getConfigurationSection("icons." + key)); + icons.put(displayInfo, icon); + + } + else { + DisplayInfo displayInfo = new DisplayInfo(NodeState.valueOf(MMOCoreUtils.toEnumName(key)), Integer.parseInt(size)); + Icon icon = new Icon(config.getConfigurationSection("icons." + key + "." + size)); + icons.put(displayInfo, icon); + }} + } + } catch (Exception e) { + Bukkit.getLogger().log(Level.WARNING, "Couldn't load icons for the skill tree " + id); + e.printStackTrace(); } } - public void setupCoordinatesNodesMap() { + /** + * Used to setup everything related to coordinates when each node has its coordinates loaded. + */ + public void coordinatesSetup() { for (SkillTreeNode node : nodes.values()) { coordinatesNodes.put(node.getCoordinates(), node); + if (node.isRoot()) + roots.add(node); } } + @Override protected abstract void whenPostLoaded(@NotNull ConfigurationSection configurationSection); + public Icon getIcon(DisplayInfo info) { + Validate.isTrue(icons.containsKey(info),"The icon corresponding to "+(info.getNodeState()==null? "path": "node-state: "+info.getNodeState() + +" ,size: "+info.getSize())+" doesn't exist in the icons of the skill-tree yml." ); + return icons.get(info); + } + public int getMaxX() { return maxX; } @@ -75,6 +141,9 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject return maxY; } + public List getLore() { + return lore; + } public static SkillTree loadSkillTree(ConfigurationSection config) { String string = config.getString("type"); @@ -98,6 +167,75 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject return skillTree; } + public void addRoot(SkillTreeNode node) { + roots.add(node); + } + + + /** + * Recursively go through the skill trees to update the the node states + */ + public void setupNodeState(PlayerData playerData) { + for (SkillTreeNode root : roots) + root.getTree().setupNodeStateFrom(root, playerData); + } + + + /** + * Update recursively the state of all the nodes that are children of this node (Used when we change the state of a node) + */ + public void setupNodeStateFrom(SkillTreeNode node, PlayerData playerData) { + if (playerData.getNodeLevel(node) > 0) { + playerData.setNodeState(node, NodeState.UNLOCKED); + } else if (playerData.getNodeLevel(node) == 0 && node.isRoot()) { + playerData.setNodeState(node, NodeState.UNLOCKABLE); + } else { + boolean isUnlockableFromStrongParent = true; + boolean isUnlockableFromSoftParent = false; + boolean isFullyLockedFromStrongParent = false; + boolean isFullyLockedFromSoftParent = true; + + for (SkillTreeNode strongParent : node.getStrongParents()) { + if (playerData.getNodeLevel(strongParent) < node.getParentNeededLevel(strongParent)) { + isUnlockableFromStrongParent = false; + } + //We count the number of children the parent + int numberChildren = 0; + for (SkillTreeNode child : strongParent.getChildren()) + if (playerData.getNodeLevel(child) > 0) + numberChildren++; + + //We must check if the parent is Fully Locked or not and if it can unlock a new node(with its max children constraint) + if (numberChildren >= strongParent.getMaxChildren() || playerData.getNodeState(strongParent) == NodeState.FULLY_LOCKED) + isFullyLockedFromStrongParent = true; + } + for (SkillTreeNode softParent : node.getSoftParents()) { + if (playerData.getNodeLevel(softParent) > node.getParentNeededLevel(softParent)) { + isUnlockableFromSoftParent = true; + } + //We count the number of children the parent + int numberChildren = 0; + for (SkillTreeNode child : softParent.getChildren()) + if (playerData.getNodeLevel(child) > 0) + numberChildren++; + if (numberChildren < softParent.getMaxChildren() && playerData.getNodeState(softParent) != NodeState.FULLY_LOCKED) + isFullyLockedFromStrongParent = false; + } + boolean isFullyLocked = isFullyLockedFromSoftParent || isFullyLockedFromStrongParent; + boolean isUnlockable = isUnlockableFromSoftParent && isUnlockableFromStrongParent; + if (isFullyLocked) + playerData.setNodeState(node, NodeState.FULLY_LOCKED); + else if (isUnlockable) + playerData.setNodeState(node, NodeState.UNLOCKABLE); + else + playerData.setNodeState(node, NodeState.LOCKED); + } + //We recursively call the algorithm for all the children of the current node + for (SkillTreeNode child : node.getChildren()) + setupNodeStateFrom(child, playerData); + + } + @Nullable /** * Returns null if it is not a node and returns the node type if it a node @@ -110,10 +248,12 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject return false; } - public abstract boolean isPath(IntegerCoordinates coordinates); + public boolean isPath(IntegerCoordinates coordinates) { + return paths.contains(coordinates); + } - public Material getGuiMaterial() { - return guiMaterial; + public Material getItem() { + return item; } @Override @@ -131,7 +271,7 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject @NotNull public SkillTreeNode getNode(IntegerCoordinates coords) { - return Objects.requireNonNull(nodes.get(coords), "Could not find node in tree '" + id + "' with coordinates '" + coords.toString() + "'"); + return Objects.requireNonNull(coordinatesNodes.get(coords), "Could not find node in tree '" + id + "' with coordinates '" + coords.toString() + "'"); } @NotNull diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/DisplayInfo.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/DisplayInfo.java new file mode 100644 index 00000000..b5431885 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/DisplayInfo.java @@ -0,0 +1,55 @@ +package net.Indyuce.mmocore.tree.skilltree.display; + +import net.Indyuce.mmocore.tree.NodeState; + +import java.util.Objects; + +/** + * The information needed to determine the display type of a node + */ +public class DisplayInfo { + private NodeState nodeState; + private int size; + + //this NodeDisplayInfo represent a path + public static DisplayInfo pathInfo= new DisplayInfo(); + + + public DisplayInfo() { + } + + public DisplayInfo(NodeState nodeState, int size) { + this.nodeState = nodeState; + this.size = size; + } + + public NodeState getNodeState() { + return nodeState; + } + + public int getSize() { + return size; + } + + + @Override + public int hashCode() { + return Objects.hash(nodeState, size); + } + + @Override + public boolean equals(Object obj) { + if(!(obj instanceof DisplayInfo)) + return false; + DisplayInfo displayInfo= (DisplayInfo) obj; + return nodeState==displayInfo.getNodeState()&&size==displayInfo.getSize(); + } + + @Override + public String toString() { + return "DisplayInfo{" + + "nodeState=" + nodeState + + ", size=" + size + + '}'; + } +} diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/Icon.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/Icon.java new file mode 100644 index 00000000..63836f2b --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/Icon.java @@ -0,0 +1,54 @@ +package net.Indyuce.mmocore.tree.skilltree.display; + +import net.Indyuce.mmocore.api.util.MMOCoreUtils; +import org.bukkit.Material; +import org.bukkit.configuration.ConfigurationSection; + +import java.util.Objects; + +/** + * The material and custom model-data of a node + */ +public class Icon { + private final Material material; + private final int customModelData; + + public Material getMaterial() { + return material; + } + + public int getCustomModelData() { + return customModelData; + } + public Icon(ConfigurationSection config) { + this(Material.valueOf(Objects.requireNonNull(MMOCoreUtils.toEnumName( + config.getString("item")))),config.contains("model-data")?config.getInt("model-data"):0); + } + + public Icon(Material material, int customModelData) { + this.material = material; + this.customModelData = customModelData; + } + + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + Icon icon = (Icon) o; + return customModelData == icon.customModelData && material == icon.material; + } + + @Override + public int hashCode() { + return Objects.hash(material, customModelData); + } + + @Override + public String toString() { + return "Icon{" + + "material=" + material + + ", customModelData=" + customModelData + + '}'; + } +} diff --git a/src/main/java/net/Indyuce/mmocore/waypoint/Waypoint.java b/src/main/java/net/Indyuce/mmocore/waypoint/Waypoint.java index 6395ea81..07dbf8f6 100644 --- a/src/main/java/net/Indyuce/mmocore/waypoint/Waypoint.java +++ b/src/main/java/net/Indyuce/mmocore/waypoint/Waypoint.java @@ -140,6 +140,11 @@ public class Waypoint implements Unlockable { while (pointsToCheck.size() != 0) { PathInfo checked = pointsToCheck.get(0); pointsToCheck.remove(0); + //If the point has already been checked we just pass. + if(checkedPoints.contains(checked.getFinalWaypoint())) + continue; + Bukkit.broadcastMessage(checked.getFinalWaypoint().id+" cost: "+checked.cost); + paths.add(checked); checkedPoints.add(checked.getFinalWaypoint()); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 682afb46..58f7f222 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -210,6 +210,7 @@ command-verbose: experience: true level: true nocd: true + skill-tree-points: true points: true reset: true resource: true \ No newline at end of file diff --git a/src/main/resources/default/expcurves/skill -tree-node.txt b/src/main/resources/default/expcurves/skill -tree-node.txt new file mode 100644 index 00000000..d82f05d1 --- /dev/null +++ b/src/main/resources/default/expcurves/skill -tree-node.txt @@ -0,0 +1,25 @@ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 \ No newline at end of file diff --git a/src/main/resources/default/gui/skill-tree.yml b/src/main/resources/default/gui/skill-tree.yml index 25c3af73..71c0ca66 100644 --- a/src/main/resources/default/gui/skill-tree.yml +++ b/src/main/resources/default/gui/skill-tree.yml @@ -1,5 +1,5 @@ # GUI display name -name: 'Current Skill Tree: &6{skill-tree-name}' +name: '&eCurrent Skill Tree: &6{skill-tree-name}' # Number of slots in your inventory. Must be # between 9 and 54 and must be a multiple of 9. @@ -8,18 +8,26 @@ slots: 54 items: skill-tree: name: '{skill-tree-node}' - function: 'skill-tree' + function: skill-tree slots: [9,18,27,36] + lore: 'Description: {skill-tree-description}' next-tree-list-page: function: 'next-tree-list-page' - material: 'ARROW' + item: ARROW slots: [ 45 ] previous-tree-list-page: function: 'previous-tree-list-page' - material: "ARROW" + item: 'ARROW' slots: [ 0 ] skill-tree-node: + function: 'skill-tree-node' + slots: [2,3,4,5,6,7,8,11,12,13,14,15,16,17,20,21,22,23,24,25,26,29,30,31,32,33,34,35,38,39,40,41,42,43,44] + #The lore that will be displayed after the lore of the node + lore: + - '&eCurrent {skill-tree} &epoints: &6{skill-tree-points}' + - '&eCurrent global points: &6{global-points}' + diff --git a/src/main/resources/default/messages.yml b/src/main/resources/default/messages.yml index 697ebaa9..bddf5739 100644 --- a/src/main/resources/default/messages.yml +++ b/src/main/resources/default/messages.yml @@ -153,7 +153,7 @@ cant-choose-new-class: # Attributes no-attribute-points-spent: '&cYou have not spent any attribute points.' -not-attribute-reallocation-point: '&cYou do not have 1 reallocation point.' +not-attribute-reallocation-point: '&cYou do not have 1 attribute reallocation point.' not-attribute-point: '&cYou do not have 1 attribute point.' attribute-points-reallocated: '&eYou successfully reset your attributes. You now have &6{points} &eattribute points.' attribute-max-points-hit: '&cYou cannot level up this attribute anymore.' @@ -168,3 +168,12 @@ no-skill-bound: '&cYou don''t have any skill bound to this slot.' not-active-skill: '&cThis is not an active skill.' skill-max-level-hit: '&cYou already hit the max level for that skill.' no-skill-placeholder: 'No Skill Bound' + +#Skill Tree +no-skill-tree-points-spent: '&cYou have not spent any skill tree points.' +locked-node: '&cThis skill is locked!' +upgrade-skill-node: '&eYour skill node &6{skill-node} &eis now Level &6{level}&e!' +skill-node-max-level-hit: '&cYou already hit the max level for that skill node.' +not-enough-skill-tree-points: '&cYou need one skill tree point.' +reallocated-points: '&eYou successfully reset the skill tree {skill-tree}. &eYou now have &6{points} &eskill tree points.' +not-skill-tree-reallocation-point: '&cYou do not have 1 skill tree reallocation point.' \ No newline at end of file diff --git a/src/main/resources/default/skilltree/combat.yml b/src/main/resources/default/skilltree/combat.yml index 19cceeb5..fc591627 100644 --- a/src/main/resources/default/skilltree/combat.yml +++ b/src/main/resources/default/skilltree/combat.yml @@ -11,8 +11,8 @@ name: 'Combat Skill Tree' type: 'linked' -#The material that will represent the skill tree in the GUI -material: 'DIAMOND_SWORD' +#The item that will represent the skill tree in the GUI +item: 'DIAMOND_SWORD' nodes: strength: @@ -27,3 +27,8 @@ nodes: x: 1 y: 0 +paths: + coordinates: + x: 2 + y: 2 + diff --git a/src/main/resources/default/sounds.yml b/src/main/resources/default/sounds.yml index d7497c58..118b50a6 100644 --- a/src/main/resources/default/sounds.yml +++ b/src/main/resources/default/sounds.yml @@ -20,6 +20,10 @@ select-class: UI_TOAST_CHALLENGE_COMPLETE level-attribute: ENTITY_PLAYER_LEVELUP reset-attributes: ENTITY_PLAYER_LEVELUP +level-skill-tree-node: ENTITY_PLAYER_LEVELUP +reset-skill-tree: ENTITY_PLAYER_LEVELUP +change-skill-tree: ITEM_ARMOR_EQUIP_LEATHER + not-enough-points: ENTITY_VILLAGER_NO cancel-quest: ENTITY_VILLAGER_NO From a5ab2c926929d3ae0bd24c1fa2db3916123c67a3 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Mon, 13 Jun 2022 20:38:34 +0200 Subject: [PATCH 03/11] Debug Automatic WayPoints --- .../mmocore/api/player/PlayerData.java | 54 ++++++- .../admin/SkillTreePointsCommandTreeNode.java | 4 +- .../Indyuce/mmocore/gui/SkillTreeViewer.java | 4 +- .../mmocore/tree/IntegerCoordinates.java | 1 - .../Indyuce/mmocore/tree/SkillTreeNode.java | 69 ++++++-- .../tree/skilltree/AutomaticSkillTree.java | 63 ++++---- .../mmocore/tree/skilltree/SkillTree.java | 45 +++--- .../tree/skilltree/display/DisplayInfo.java | 2 + .../default/skilltree/autocombat.yml | 143 ++++++++++++++++ .../resources/default/skilltree/combat.yml | 152 ++++++++++++++++-- 10 files changed, 449 insertions(+), 88 deletions(-) create mode 100644 src/main/resources/default/skilltree/autocombat.yml diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index be67bdf3..f5cfb9a9 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -3,9 +3,11 @@ package net.Indyuce.mmocore.api.player; import io.lumine.mythic.lib.api.player.MMOPlayerData; import io.lumine.mythic.lib.player.TemporaryPlayerData; import io.lumine.mythic.lib.player.cooldown.CooldownMap; +import io.lumine.mythic.lib.player.modifier.PlayerModifier; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.ConfigMessage; import net.Indyuce.mmocore.api.SoundEvent; +import net.Indyuce.mmocore.api.quest.trigger.Trigger; import net.Indyuce.mmocore.player.Unlockable; import net.Indyuce.mmocore.tree.IntegerCoordinates; import net.Indyuce.mmocore.tree.NodeState; @@ -78,7 +80,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc */ @Nullable private PlayerClass profess; - private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints,skillTreeReallocationPoints;// skillReallocationPoints, + private int level, classPoints, skillPoints, attributePoints, attributeReallocationPoints, skillTreeReallocationPoints;// skillReallocationPoints, private double experience; private double mana, stamina, stellium; private Guild guild; @@ -217,12 +219,26 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return skillTreePoints.containsKey(treeId); } + + public void removeModifiersFrom(SkillTree skillTree) { + for (SkillTreeNode node : skillTree.getNodes()) { + for (int i = 0; i < node.getMaxLevel(); i++) { + List modifiers = node.getModifiers(i); + if (modifiers != null) { + for (PlayerModifier modifier : modifiers) { + modifier.unregister(getMMOPlayerData()); + } + } + } + } + } + public boolean canIncrementNodeLevel(SkillTreeNode node) { NodeState nodeState = nodeStates.get(node); //Check the State of the node if (nodeState != NodeState.UNLOCKED && nodeState != NodeState.UNLOCKABLE) return false; - return getNodeLevel(node) 0 || skillTreePoints.get("global") > 0); + return getNodeLevel(node) < node.getMaxLevel() && (skillTreePoints.get(node.getTree().getId()) > 0 || skillTreePoints.get("global") > 0); } /** @@ -231,14 +247,37 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc */ public void incrementNodeLevel(SkillTreeNode node) { setNodeLevel(node, getNodeLevel(node) + 1); + //Triggers the triggers of the node + List triggers = node.getTriggers(getNodeLevel(node)); + if (triggers != null) { + for (Trigger trigger : triggers) { + trigger.apply(this); + } + + } + + //Applies player modifiers + List modifiers = node.getModifiers(getNodeLevel(node)); + + if (modifiers != null) { + Bukkit.broadcastMessage("Modifier: "+modifiers.size()); + for (PlayerModifier modifier : modifiers) { + modifier.register(getMMOPlayerData()); + } + } + + Bukkit.broadcastMessage(playerStats.getStat(StatType.HEALTH_REGENERATION)+""); + if (nodeStates.get(node) == NodeState.UNLOCKABLE) setNodeState(node, NodeState.UNLOCKED); if (skillTreePoints.get(node.getTree().getId()) > 0) withdrawSkillTreePoints(node.getTree().getId(), 1); else withdrawSkillTreePoints("global", 1); - //We unload the nodeStates map and reload it completely - nodeStates= new HashMap<>(); + //We unload the nodeStates map (for the skill tree) and reload it completely + for (SkillTreeNode node1 : node.getTree().getNodes()) { + nodeStates.remove(node1); + } node.getTree().setupNodeState(this); } @@ -250,13 +289,18 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc SkillTree skillTree = node.getTree(); DisplayInfo displayInfo = new DisplayInfo(nodeStates.get(node), node.getSize()); + return skillTree.getIcon(displayInfo); } public Icon getIcon(SkillTree skillTree, IntegerCoordinates coordinates) { + if (skillTree.isNode(coordinates)) { SkillTreeNode node = skillTree.getNode(coordinates); + if (nodeStates.get(node) == null) { + skillTree.getNodes().forEach(nodee -> Bukkit.broadcastMessage(nodee.getId() + " " + nodeStates.get(nodee))); + } DisplayInfo displayInfo = new DisplayInfo(nodeStates.get(node), node.getSize()); return skillTree.getIcon(displayInfo); } @@ -399,7 +443,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } public void giveSkillTreeReallocationPoints(int amount) { - skillTreeReallocationPoints+=amount; + skillTreeReallocationPoints += amount; } @Override diff --git a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/SkillTreePointsCommandTreeNode.java b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/SkillTreePointsCommandTreeNode.java index 40dc9ab0..a75511be 100644 --- a/src/main/java/net/Indyuce/mmocore/command/rpg/admin/SkillTreePointsCommandTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/command/rpg/admin/SkillTreePointsCommandTreeNode.java @@ -20,8 +20,8 @@ import java.util.stream.Collectors; public class SkillTreePointsCommandTreeNode extends CommandTreeNode { BiFunction get; - public SkillTreePointsCommandTreeNode(CommandTreeNode parent, TriConsumer give, - TriConsumer set, BiFunction get) { + public SkillTreePointsCommandTreeNode(CommandTreeNode parent, TriConsumer set, + TriConsumer give, BiFunction get) { super(parent, "skill-tree-points"); addChild(new ActionCommandTreeNode(this, "give", give)); addChild(new ActionCommandTreeNode(this, "set", set)); diff --git a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java index ab0f2bfb..ebcaa83e 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java +++ b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java @@ -181,7 +181,7 @@ public class SkillTreeViewer extends EditableInventory { //If it is path we remove the display name and the lore. else { meta.setLore(new ArrayList<>()); - meta.setDisplayName(""); + meta.setDisplayName(" "); } meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES); PersistentDataContainer container = meta.getPersistentDataContainer(); @@ -297,6 +297,8 @@ public class SkillTreeViewer extends EditableInventory { //We remove all the nodeStates progress playerData.giveSkillTreePoints(skillTree.getId(), reallocated); playerData.giveSkillTreeReallocationPoints(-1); + //We unregister all the modifiers or the player + playerData.removeModifiersFrom(skillTree); for (SkillTreeNode node : skillTree.getNodes()) { playerData.setNodeLevel(node, 0); playerData.setNodeState(node, NodeState.LOCKED); diff --git a/src/main/java/net/Indyuce/mmocore/tree/IntegerCoordinates.java b/src/main/java/net/Indyuce/mmocore/tree/IntegerCoordinates.java index f5bb5427..544c8e6f 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/IntegerCoordinates.java +++ b/src/main/java/net/Indyuce/mmocore/tree/IntegerCoordinates.java @@ -23,7 +23,6 @@ public class IntegerCoordinates { public int getX() { return x; } - public int getY() { return y; } diff --git a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java index 87721873..6e9a386e 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java @@ -2,7 +2,10 @@ package net.Indyuce.mmocore.tree; import com.gmail.nossr50.mcmmo.acf.annotation.HelpSearchTags; import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.api.MMOLineConfig; import io.lumine.mythic.lib.player.modifier.PlayerModifier; +import io.lumine.mythic.lib.util.configobject.ConfigObject; +import io.lumine.mythic.lib.util.configobject.LineConfigObject; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.quest.trigger.Trigger; @@ -17,6 +20,7 @@ import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; import java.util.*; +import java.util.logging.Level; //We must use generics to get the type of the corresponding tree public class SkillTreeNode implements Unlockable { @@ -30,8 +34,8 @@ public class SkillTreeNode implements Unlockable { private final HashMap> lores = new HashMap<>(); //TODO modifiers depending on level with drop tables - private final HashMap> modifiers = new HashMap<>(); - private final HashMap> triggers = new HashMap<>(); + private final HashMap> modifiers = new HashMap<>(); + private final HashMap> triggers = new HashMap<>(); //The max level the skill tree node can have and the max amount of children it can have. private final int maxLevel, maxChildren, size; private final ArrayList children = new ArrayList<>(); @@ -43,7 +47,7 @@ public class SkillTreeNode implements Unlockable { private final HashMap softParents = new HashMap<>(); - private final HashMap strongParents = new HashMap<>(); + private final HashMap strongParents = new HashMap<>(); public SkillTreeNode(SkillTree tree, ConfigurationSection config) { @@ -59,7 +63,7 @@ public class SkillTreeNode implements Unlockable { for (String state : Objects.requireNonNull(config.getConfigurationSection("lores")).getKeys(false)) { NodeState nodeState = NodeState.valueOf(MMOCoreUtils.toEnumName(state)); if (nodeState == NodeState.UNLOCKED) { - //TODO: Message could'nt load ... instead of exception + //TODO: Message could'nt load ... instead of exce/*99+*-*99**9+-ption ConfigurationSection section = config.getConfigurationSection("lores." + state); for (String level : section.getKeys(false)) { lores.put(new NodeContext(nodeState, Integer.parseInt(level)), section.getStringList(level)); @@ -68,6 +72,45 @@ public class SkillTreeNode implements Unlockable { lores.put(new NodeContext(nodeState, 0), config.getStringList("lores." + state)); } } + //We load the triggers + if (config.contains("triggers")) { + try { + ConfigurationSection section = config.getConfigurationSection("triggers"); + for (String level : section.getKeys(false)) { + int value = Integer.parseInt(level); + for (String str : section.getStringList(level)) { + Trigger trigger = MMOCore.plugin.loadManager.loadTrigger(new MMOLineConfig(str)); + if (!triggers.containsKey(value)) { + triggers.put(value, new ArrayList<>()); + } + triggers.get(value).add(trigger); + } + } + } catch (NumberFormatException e) { + MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't load triggers for the skill node " + tree.getId() + "." + id + " :Problem with the Number Format."); + } + } + //We load the player Modifiers + if (config.contains("modifiers")) { + try { + ConfigurationSection section = config.getConfigurationSection("modifiers"); + for (String level : section.getKeys(false)) { + int value = Integer.parseInt(level); + for (String str : section.getStringList(level)) { + PlayerModifier modifier = MythicLib.plugin.getModifiers().loadPlayerModifier(new LineConfigObject(new MMOLineConfig(str))); + if (!modifiers.containsKey(value)) { + modifiers.put(value, new ArrayList<>()); + } + modifiers.get(value).add(modifier); + } + } + + } catch (NumberFormatException e) { + MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't load modifiers for the skill node " + tree.getId() + "." + id+ " :Problem with the Number Format."); + } + } + + maxLevel = config.contains("max-level") ? config.getInt("max-level") : 1; maxChildren = config.contains("max-children") ? config.getInt("max-children") : 1; //If coordinates are precised adn we are not wiht an automaticTree we set them up @@ -90,6 +133,11 @@ public class SkillTreeNode implements Unlockable { return tree; } + + public void setIsRoot() { + isRoot = true; + } + public boolean isRoot() { return isRoot; } @@ -148,19 +196,19 @@ public class SkillTreeNode implements Unlockable { } public String getName() { - return MythicLib.plugin.parseColors( name); + return MythicLib.plugin.parseColors(name); } public IntegerCoordinates getCoordinates() { return coordinates; } - public Set getModifiers(int level) { + public List getModifiers(int level) { return modifiers.get(level); } - public Set getTriggers(int level) { + public List getTriggers(int level) { return triggers.get(level); } @@ -244,15 +292,14 @@ public class SkillTreeNode implements Unlockable { public List getLore(PlayerData playerData) { Placeholders holders = getPlaceholders(playerData); List parsedLore = new ArrayList<>(); - NodeContext context= new NodeContext(playerData.getNodeState(this),playerData.getNodeLevel(this)); + NodeContext context = new NodeContext(playerData.getNodeState(this), playerData.getNodeLevel(this)); lores.get(context).forEach(string -> parsedLore.add( - MythicLib.plugin.parseColors( holders.apply(playerData.getPlayer(), string)))); + MythicLib.plugin.parseColors(holders.apply(playerData.getPlayer(), string)))); return parsedLore; } - /** * @param namespacedKey Something like "skill_tree:tree_name_1_5" * @return The corresponding skill tree node @@ -315,6 +362,4 @@ public class SkillTreeNode implements Unlockable { } - - } diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java index a90b5cce..0e6cd986 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/AutomaticSkillTree.java @@ -1,5 +1,6 @@ package net.Indyuce.mmocore.tree.skilltree; +import com.guillaumevdn.questcreator.integration.mythicmobs.v4.element.ElementMythicMobsObjective; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.tree.IntegerCoordinates; import net.Indyuce.mmocore.tree.ParentType; @@ -16,8 +17,7 @@ import java.util.logging.Level; /** * Skill Trees where you only need to fill the strong and soft */ -public class AutomaticSkillTree extends SkillTree { - private SkillTreeNode root; +public class AutomaticSkillTree extends SkillTree { //Hash map to store the number of left and right branches of each node private final HashMap nodeBranches = new HashMap<>(); @@ -31,17 +31,17 @@ public class AutomaticSkillTree extends SkillTree { //We setup the children and parents for each node. - for(SkillTreeNode node:nodes.values()) { - ConfigurationSection section = config.getConfigurationSection("nodes."+node.getId() + ".children.soft"); - if(section!=null) { + for (SkillTreeNode node : nodes.values()) { + ConfigurationSection section = config.getConfigurationSection("nodes." + node.getId() + ".children.soft"); + if (section != null) { for (String child : section.getKeys(false)) { node.addChild(getNode(child)); getNode(child).addParent(node, section.getInt(child), ParentType.SOFT); } } - section = config.getConfigurationSection("nodes."+node.getId() + ".children.strong"); + section = config.getConfigurationSection("nodes." + node.getId() + ".children.strong"); - if(section!=null) { + if (section != null) { for (String child : section.getKeys(false)) { node.addChild(getNode(child)); getNode(child).addParent(node, section.getInt(child), ParentType.STRONG); @@ -51,23 +51,24 @@ public class AutomaticSkillTree extends SkillTree { } //We find the root of the tree wich is for (SkillTreeNode node : nodes.values()) { - if (node.getSoftParents().size() == 0&&node.getStrongParents().size()==0) { - Validate.isTrue(root == null, "You can't have 2 roots on one automatic skill tree. You have "+(root!=null?root.getName():"")+" and "+node.getName()+"."); - root = node; - - + if (node.getSoftParents().size() == 0 && node.getStrongParents().size() == 0) { + Validate.isTrue(roots.size() == 0, "You can't have 2 roots on one automatic skill tree. You have " + (roots.size() != 0 ? roots.get(0).getName() : "") + " and " + node.getName() + "."); + //We mark the node as a root also + roots.add(node); + node.setIsRoot(); } } + //We setup the width of all the nodes recursively - setupTreeWidth(root); + setupTreeWidth(roots.get(0)); //We recursively setup all the coordinates of the tree nodes - root.setCoordinates(new IntegerCoordinates(0, 0)); - setupCoordinates(root); + roots.get(0).setCoordinates(new IntegerCoordinates(0, 0)); + setupCoordinates(roots.get(0)); //We get and cache the values of minX,minY,maxX and maxY - minX = nodeBranches.get(root).getLeftBranches(); + minX = nodeBranches.get(roots.get(0)).getLeftBranches(); minY = 0; - maxX = nodeBranches.get(root).getRightBranches(); + maxX = nodeBranches.get(roots.get(0)).getRightBranches(); for (SkillTreeNode node : nodes.values()) { if (node.getCoordinates().getY() > maxY) @@ -86,26 +87,29 @@ public class AutomaticSkillTree extends SkillTree { * @param node the root */ private void setupCoordinates(SkillTreeNode node) { + if (node.isRoot()) { + node.setCoordinates(new IntegerCoordinates(0, 2)); + } int childrenSize = node.getChildren().size(); + int x = node.getCoordinates().getX(); - ; int y = node.getCoordinates().getY(); - ; + int leftOffset = 0; int rightOffset = 0; for (int i = 0; i < childrenSize; i++) { SkillTreeNode child = node.getChildren().get(i); - if (childrenSize % 2 == 0 && i == 0) { - child.setCoordinates(new IntegerCoordinates(x, y + 2)); + if (childrenSize % 2 == 1 && i == 0) { + child.setCoordinates(new IntegerCoordinates(x, y - 2)); leftOffset += 2 + nodeBranches.get(child).getLeftBranches(); rightOffset += 2 + nodeBranches.get(child).getRightBranches(); } else if (i % 2 == 0) { - child.setCoordinates(new IntegerCoordinates(x - leftOffset - 2 - nodeBranches.get(child).getWidth(), y + 2)); - for(SkillTreeNode skillTree : nodeBranches.keySet()) - leftOffset += 2 + nodeBranches.get(child).getWidth(); + child.setCoordinates(new IntegerCoordinates(x - leftOffset - 2 - nodeBranches.get(child).getWidth(), y - 2)); + for (SkillTreeNode skillTree : nodeBranches.keySet()) + leftOffset += 2 + nodeBranches.get(child).getWidth(); } else { - child.setCoordinates(new IntegerCoordinates(x + rightOffset + 2 + nodeBranches.get(child).getWidth(), y + 2)); + child.setCoordinates(new IntegerCoordinates(x + rightOffset + 2 + nodeBranches.get(child).getWidth(), y - 2)); rightOffset += 2 + nodeBranches.get(child).getWidth(); } @@ -113,11 +117,12 @@ public class AutomaticSkillTree extends SkillTree { int childX = child.getCoordinates().getX(); int childY = child.getCoordinates().getY(); - int parentX = node.getSoftParents().size()!=0?((SkillTreeNode)node.getSoftParents().toArray()[0]).getCoordinates().getX():((SkillTreeNode)node.getStrongParents().toArray()[0]).getCoordinates().getX(); - paths.add(new IntegerCoordinates(childX, childY - 1)); + int parentX=node.getCoordinates().getX(); + + paths.add(new IntegerCoordinates(childX, childY + 1)); int offset = childX > parentX ? -1 : 1; while (childX != parentX) { - paths.add(new IntegerCoordinates(childX, childY - 2)); + paths.add(new IntegerCoordinates(childX, childY + 2)); childX += offset; } @@ -155,7 +160,7 @@ public class AutomaticSkillTree extends SkillTree { } } - nodeBranches.put(node,new Branches(leftBranches,rightBranches)); + nodeBranches.put(node, new Branches(leftBranches, rightBranches)); } private class Branches { diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java index 62f6f75b..01a6a013 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java @@ -2,6 +2,7 @@ package net.Indyuce.mmocore.tree.skilltree; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.util.PostLoadObject; +import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.manager.registry.RegisterObject; @@ -39,7 +40,7 @@ import java.util.logging.Level; */ public abstract class SkillTree extends PostLoadObject implements RegisterObject { private final String id, name; - private final List lore=new ArrayList<>(); + private final List lore = new ArrayList<>(); private final Material item; //2 different maps to get the nodes @@ -51,13 +52,13 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject //Caches the height of the skill tree protected int minX, minY, maxX, maxY; protected final HashMap icons = new HashMap<>(); - protected final HashSet roots = new HashSet<>(); + protected final List roots = new ArrayList<>(); public SkillTree(ConfigurationSection config) { super(config); this.id = Objects.requireNonNull(config.getString("id"), "Could not find skill tree id"); this.name = MythicLib.plugin.parseColors(Objects.requireNonNull(config.getString("name"), "Could not find skill tree name")); - Objects.requireNonNull(config.getStringList("lore"),"Could not find skill tree lore").forEach(str->lore.add(MythicLib.plugin.parseColors(str ))); + Objects.requireNonNull(config.getStringList("lore"), "Could not find skill tree lore").forEach(str -> lore.add(MythicLib.plugin.parseColors(str))); this.item = Material.valueOf(MMOCoreUtils.toEnumName(Objects.requireNonNull(config.getString("item")))); Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find any nodes in the tree"); for (String key : config.getConfigurationSection("nodes").getKeys(false)) { @@ -84,19 +85,14 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject for (String key : config.getConfigurationSection("icons").getKeys(false)) { if (key.equalsIgnoreCase("path")) { icons.put(DisplayInfo.pathInfo, new Icon(config.getConfigurationSection("icons." + key))); + continue; } for (String size : config.getConfigurationSection("icons." + key).getKeys(false)) { - if(key.equalsIgnoreCase("path")) { - DisplayInfo displayInfo = DisplayInfo.pathInfo; - Icon icon = new Icon(config.getConfigurationSection("icons." + key)); - icons.put(displayInfo, icon); + DisplayInfo displayInfo = new DisplayInfo(NodeState.valueOf(MMOCoreUtils.toEnumName(key)), Integer.parseInt(size)); + Icon icon = new Icon(config.getConfigurationSection("icons." + key + "." + size)); + icons.put(displayInfo, icon); - } - else { - DisplayInfo displayInfo = new DisplayInfo(NodeState.valueOf(MMOCoreUtils.toEnumName(key)), Integer.parseInt(size)); - Icon icon = new Icon(config.getConfigurationSection("icons." + key + "." + size)); - icons.put(displayInfo, icon); - }} + } } } catch (Exception e) { Bukkit.getLogger().log(Level.WARNING, "Couldn't load icons for the skill tree " + id); @@ -120,8 +116,7 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject protected abstract void whenPostLoaded(@NotNull ConfigurationSection configurationSection); public Icon getIcon(DisplayInfo info) { - Validate.isTrue(icons.containsKey(info),"The icon corresponding to "+(info.getNodeState()==null? "path": "node-state: "+info.getNodeState() - +" ,size: "+info.getSize())+" doesn't exist in the icons of the skill-tree yml." ); + Validate.isTrue(icons.containsKey(info), "The icon corresponding to " + info + " doesn't exist for the skill tree " + id + "."); return icons.get(info); } @@ -181,19 +176,23 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject } + public List getRoots() { + return roots; + } + /** * Update recursively the state of all the nodes that are children of this node (Used when we change the state of a node) */ public void setupNodeStateFrom(SkillTreeNode node, PlayerData playerData) { - if (playerData.getNodeLevel(node) > 0) { + if (playerData.getNodeLevel(node) > 0) { playerData.setNodeState(node, NodeState.UNLOCKED); } else if (playerData.getNodeLevel(node) == 0 && node.isRoot()) { playerData.setNodeState(node, NodeState.UNLOCKABLE); } else { - boolean isUnlockableFromStrongParent = true; - boolean isUnlockableFromSoftParent = false; - boolean isFullyLockedFromStrongParent = false; - boolean isFullyLockedFromSoftParent = true; + boolean isUnlockableFromStrongParent = node.getStrongParents().size()==0?true:true; + boolean isUnlockableFromSoftParent = node.getSoftParents().size()==0?true:false; + boolean isFullyLockedFromStrongParent = node.getStrongParents().size()==0?false:false; + boolean isFullyLockedFromSoftParent = node.getSoftParents().size()==0?false:true; for (SkillTreeNode strongParent : node.getStrongParents()) { if (playerData.getNodeLevel(strongParent) < node.getParentNeededLevel(strongParent)) { @@ -209,6 +208,9 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject if (numberChildren >= strongParent.getMaxChildren() || playerData.getNodeState(strongParent) == NodeState.FULLY_LOCKED) isFullyLockedFromStrongParent = true; } + + + for (SkillTreeNode softParent : node.getSoftParents()) { if (playerData.getNodeLevel(softParent) > node.getParentNeededLevel(softParent)) { isUnlockableFromSoftParent = true; @@ -219,8 +221,9 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject if (playerData.getNodeLevel(child) > 0) numberChildren++; if (numberChildren < softParent.getMaxChildren() && playerData.getNodeState(softParent) != NodeState.FULLY_LOCKED) - isFullyLockedFromStrongParent = false; + isFullyLockedFromSoftParent = false; } + boolean isFullyLocked = isFullyLockedFromSoftParent || isFullyLockedFromStrongParent; boolean isUnlockable = isUnlockableFromSoftParent && isUnlockableFromStrongParent; if (isFullyLocked) diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/DisplayInfo.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/DisplayInfo.java index b5431885..2c991640 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/DisplayInfo.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/DisplayInfo.java @@ -42,6 +42,8 @@ public class DisplayInfo { if(!(obj instanceof DisplayInfo)) return false; DisplayInfo displayInfo= (DisplayInfo) obj; + if(nodeState==null) + return displayInfo.getNodeState()==null; return nodeState==displayInfo.getNodeState()&&size==displayInfo.getSize(); } diff --git a/src/main/resources/default/skilltree/autocombat.yml b/src/main/resources/default/skilltree/autocombat.yml new file mode 100644 index 00000000..9fb30c62 --- /dev/null +++ b/src/main/resources/default/skilltree/autocombat.yml @@ -0,0 +1,143 @@ +id: autocombat +name: AutoCombat +type: automatic +item: GOLDEN_AXE +lore: +- '&6This autoskill tree is used for combat abilities!' + +nodes: + strength: + name: 'Combat strength' + children: + strong: + force: 2 + + max-level: 2 + size: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + #modifers + + force: + name: 'Force' + size: 1 + max-children: 1 + children: + strong: + weaponry: 1 + archery: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + + weaponry: + name: 'Weaponry' + max-level: 2 + size: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + + archery: + name: 'Archery' + + max-level: 2 + size: 1 + children: + strong: + archery2: 2 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + archery2: + name: 'Archery2' + + max-level: 2 + size: 1 + children: + strong: + archery3: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + archery3: + name: 'Archery3' + + max-level: 2 + size: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + + + +icons: + unlocked: + 1: + item: 'GREEN_DYE' + locked: + 1: + item: "BROWN_DYE" + unlockable: + 1: + item: "BLUE_DYE" + fully-locked: + 1: + item: "BLACK_DYE" + path: + item: "WHITE_DYE" diff --git a/src/main/resources/default/skilltree/combat.yml b/src/main/resources/default/skilltree/combat.yml index fc591627..d04474ff 100644 --- a/src/main/resources/default/skilltree/combat.yml +++ b/src/main/resources/default/skilltree/combat.yml @@ -1,34 +1,152 @@ id: 'combat' -name: 'Combat Skill Tree' - - -#The type of the Skill tree, can be : -#'linked'->You must only precise nodes coordinates. 2 adjacent nodes will be affiliated. The root is at coordinates 0,0. -#'automatic'-> You must only precise the children(there can more than 1) of each node. Each node can only have one parent and the root has none. -# The display coordinates will be automatically calculated to have a good render. -#'custom'-> You must precise coordinates and children for each node, each node can have multiple parents and children. -# The coordinates are only used for display on the GUI but will not have any impact on the affiliation between nodes. - +name: '&4Combat' +lore: +- '&6This skill tree is used for combat abilities!' type: 'linked' - -#The item that will represent the skill tree in the GUI -item: 'DIAMOND_SWORD' - +item: 'DIAMOND_AXE' nodes: strength: name: 'Combat strength' - #Coordinates of the node coordinates: x: 0 y: 0 - strength2: - name: 'Combat strength 2' + + max-level: 2 + is-root: true + size: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + #modifers + + force: + name: 'Force' + size: 1 + max-children: 1 coordinates: x: 1 y: 0 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + + weaponry: + name: 'Weaponry' + coordinates: + x: 2 + y: 0 + + max-level: 2 + size: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + + archery: + name: 'Archery' + coordinates: + x: 1 + y: 1 + + max-level: 2 + size: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + archery2: + name: 'Archery2' + coordinates: + x: 1 + y: 2 + + max-level: 2 + size: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' + archery3: + name: 'Archery3' + coordinates: + x: 1 + y: 3 + + max-level: 2 + size: 1 + lores: + unlocked: + 1 : + - "&eYou are level 1" + 2: + - "&eYou are level 2" + locked: + - "&4This skill is locked" + unlockable: + - "&aThis skill is unlockable" + fully-locked: + - '&aThis is skill is fully locked' paths: coordinates: x: 2 y: 2 +icons: + unlocked: + 1: + item: 'GREEN_DYE' + locked: + 1: + item: "BROWN_DYE" + unlockable: + 1: + item: "BLUE_DYE" + fully-locked: + 1: + item: "BLACK_DYE" + path: + item: "WHITE_DYE" From d1bb2406de345ea07dce553aef58f33f80a54653 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Sun, 19 Jun 2022 12:02:06 +0200 Subject: [PATCH 04/11] SkillTree debug and support for SQL --- .../mmocore/api/player/PlayerData.java | 12 + .../Indyuce/mmocore/gui/SkillTreeViewer.java | 2 +- .../mmocore/manager/SkillTreeManager.java | 19 +- .../manager/data/mysql/MySQLDataProvider.java | 3 +- .../data/mysql/MySQLPlayerDataManager.java | 408 +++++++++--------- .../data/yaml/YAMLPlayerDataManager.java | 8 +- .../Indyuce/mmocore/tree/SkillTreeNode.java | 15 +- .../mmocore/tree/skilltree/SkillTree.java | 58 ++- 8 files changed, 287 insertions(+), 238 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index f5cfb9a9..c10a803a 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -62,6 +62,7 @@ import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import java.util.*; import java.util.logging.Level; +import java.util.logging.Logger; import java.util.stream.Collectors; @@ -220,6 +221,15 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } + + public Set> getNodeLevelsEntrySet() { + HashMap nodeLevelsString=new HashMap<>(); + for(SkillTreeNode node:nodeLevels.keySet()) { + nodeLevelsString.put(node.getFullId(),nodeLevels.get(node)); + } + return nodeLevelsString.entrySet(); + } + public void removeModifiersFrom(SkillTree skillTree) { for (SkillTreeNode node : skillTree.getNodes()) { for (int i = 0; i < node.getMaxLevel(); i++) { @@ -331,6 +341,8 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } public int getNodeLevel(SkillTreeNode node) { + + return nodeLevels.get(node); } diff --git a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java index ebcaa83e..1df83887 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java +++ b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java @@ -332,7 +332,7 @@ public class SkillTreeViewer extends EditableInventory { int xOffset=offset%9-middleSlot%9; int yOffset=offset/9-middleSlot/9; x += xOffset; - y += yOffset; + y += yOffset-1; open(); event.setCancelled(true); return; diff --git a/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java b/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java index 7dfe3af5..c69c3008 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/SkillTreeManager.java @@ -7,36 +7,39 @@ import net.Indyuce.mmocore.tree.skilltree.SkillTree; import org.bukkit.configuration.file.YamlConfiguration; import java.io.File; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; +import java.util.*; import java.util.stream.Collectors; public class SkillTreeManager extends MMOCoreRegister { - private final ArrayList skillTreeNodes = new ArrayList<>(); + private final HashMap skillTreeNodes = new HashMap<>(); @Override public void register(SkillTree tree){ super.register(tree); - tree.getNodes().forEach((node)->skillTreeNodes.add(node)); + tree.getNodes().forEach((node)->skillTreeNodes.put(node.getFullId(),node)); } public boolean has(int index) { return index>=0 &&index getRootNodes() { - return skillTreeNodes.stream().filter(treeNode -> treeNode.getSoftParents().size()==0).collect(Collectors.toList()); + return skillTreeNodes.values().stream().filter(treeNode -> treeNode.getSoftParents().size()==0).collect(Collectors.toList()); } - public ArrayList getAllNodes() { - return skillTreeNodes; + public Collection getAllNodes() { + return skillTreeNodes.values(); } public SkillTree get(int index) { diff --git a/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLDataProvider.java b/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLDataProvider.java index e720ab8f..72e4364a 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLDataProvider.java +++ b/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLDataProvider.java @@ -42,7 +42,8 @@ getResultAsync("SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '" + "experience INT(11) DEFAULT 0,class VARCHAR(20),guild VARCHAR(20),last_login LONG," + "attributes LONGTEXT,professions LONGTEXT,times_claimed LONGTEXT,quests LONGTEXT," + "waypoints LONGTEXT,friends LONGTEXT,skills LONGTEXT,bound_skills LONGTEXT," - + "class_info LONGTEXT,PRIMARY KEY (uuid));"); + + "class_info LONGTEXT,skill_tree_reallocation_points INT(11) DEFAULT 0,skill_tree_points" + + " LONGTEXT,skill_tree_nodes_level LONGTEXT,PRIMARY KEY (uuid));"); } @Override diff --git a/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java b/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java index 9183299a..33c41266 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/data/mysql/MySQLPlayerDataManager.java @@ -23,231 +23,247 @@ import java.util.logging.Level; import java.util.stream.Collectors; public class MySQLPlayerDataManager extends PlayerDataManager { - private final MySQLDataProvider provider; + private final MySQLDataProvider provider; - public MySQLPlayerDataManager(MySQLDataProvider provider) { - this.provider = provider; - } + public MySQLPlayerDataManager(MySQLDataProvider provider) { + this.provider = provider; + } - //TODO SkillTree pour SQL - @Override - public void loadData(PlayerData data) { - provider.getResult("SELECT * FROM mmocore_playerdata WHERE uuid = '" + data.getUniqueId() + "';", (result) -> { - try { - MMOCore.sqlDebug("Loading data for: '" + data.getUniqueId() + "'..."); + @Override + public void loadData(PlayerData data) { + provider.getResult("SELECT * FROM mmocore_playerdata WHERE uuid = '" + data.getUniqueId() + "';", (result) -> { + try { + MMOCore.sqlDebug("Loading data for: '" + data.getUniqueId() + "'..."); - if (!result.next()) { - data.setLevel(getDefaultData().getLevel()); - data.setClassPoints(getDefaultData().getClassPoints()); - data.setSkillPoints(getDefaultData().getSkillPoints()); - data.setAttributePoints(getDefaultData().getAttributePoints()); - data.setAttributeReallocationPoints(getDefaultData().getAttrReallocPoints()); - data.setExperience(0); - data.getQuestData().updateBossBar(); + if (!result.next()) { + data.setLevel(getDefaultData().getLevel()); + data.setClassPoints(getDefaultData().getClassPoints()); + data.setSkillPoints(getDefaultData().getSkillPoints()); + data.setAttributePoints(getDefaultData().getAttributePoints()); + data.setAttributeReallocationPoints(getDefaultData().getAttrReallocPoints()); + data.setExperience(0); + data.getQuestData().updateBossBar(); - if (!data.hasUsedTemporaryData()) { - data.setMana(data.getStats().getStat(StatType.MAX_MANA)); - data.setStamina(data.getStats().getStat(StatType.MAX_STAMINA)); - data.setStellium(data.getStats().getStat(StatType.MAX_STELLIUM)); - } + if (!data.hasUsedTemporaryData()) { + data.setMana(data.getStats().getStat(StatType.MAX_MANA)); + data.setStamina(data.getStats().getStat(StatType.MAX_STAMINA)); + data.setStellium(data.getStats().getStat(StatType.MAX_STELLIUM)); + } - data.setFullyLoaded(); - MMOCore.sqlDebug("Loaded DEFAULT data for: '" + data.getUniqueId() + "' as no saved data was found."); - return; - } + data.setFullyLoaded(); + MMOCore.sqlDebug("Loaded DEFAULT data for: '" + data.getUniqueId() + "' as no saved data was found."); + return; + } - data.setClassPoints(result.getInt("class_points")); - data.setSkillPoints(result.getInt("skill_points")); - data.setAttributePoints(result.getInt("attribute_points")); - data.setAttributeReallocationPoints(result.getInt("attribute_realloc_points")); - data.setLevel(result.getInt("level")); - data.setExperience(result.getInt("experience")); - if (!isEmpty(result.getString("class"))) - data.setClass(MMOCore.plugin.classManager.get(result.getString("class"))); + data.setClassPoints(result.getInt("class_points")); + data.setSkillPoints(result.getInt("skill_points")); + data.setAttributePoints(result.getInt("attribute_points")); + data.setAttributeReallocationPoints(result.getInt("attribute_realloc_points")); + data.setLevel(result.getInt("level")); + data.setExperience(result.getInt("experience")); + if (!isEmpty(result.getString("class"))) + data.setClass(MMOCore.plugin.classManager.get(result.getString("class"))); - if (!isEmpty(result.getString("times_claimed"))) { - JsonObject json = new JsonParser().parse(result.getString("times_claimed")).getAsJsonObject(); - json.entrySet().forEach(entry -> data.getItemClaims().put(entry.getKey(), entry.getValue().getAsInt())); - } + if (!isEmpty(result.getString("times_claimed"))) { + JsonObject json = new JsonParser().parse(result.getString("times_claimed")).getAsJsonObject(); + json.entrySet().forEach(entry -> data.getItemClaims().put(entry.getKey(), entry.getValue().getAsInt())); + } - if (!data.hasUsedTemporaryData()) { - data.setMana(data.getStats().getStat(StatType.MAX_MANA)); - data.setStamina(data.getStats().getStat(StatType.MAX_STAMINA)); - data.setStellium(data.getStats().getStat(StatType.MAX_STELLIUM)); - } + if (!data.hasUsedTemporaryData()) { + data.setMana(data.getStats().getStat(StatType.MAX_MANA)); + data.setStamina(data.getStats().getStat(StatType.MAX_STAMINA)); + data.setStellium(data.getStats().getStat(StatType.MAX_STELLIUM)); + } - if (!isEmpty(result.getString("guild"))) { - Guild guild = provider.getGuildManager().getGuild(result.getString("guild")); - data.setGuild(guild.getMembers().has(data.getUniqueId()) ? guild : null); - } - if (!isEmpty(result.getString("attributes"))) data.getAttributes().load(result.getString("attributes")); - if (!isEmpty(result.getString("professions"))) - data.getCollectionSkills().load(result.getString("professions")); - if (!isEmpty(result.getString("quests"))) data.getQuestData().load(result.getString("quests")); - data.getQuestData().updateBossBar(); - if (!isEmpty(result.getString("waypoints"))) - data.getWaypoints().addAll(getJSONArray(result.getString("waypoints"))); - if (!isEmpty(result.getString("friends"))) - getJSONArray(result.getString("friends")).forEach(str -> data.getFriends().add(UUID.fromString(str))); - if (!isEmpty(result.getString("skills"))) { - JsonObject object = MythicLib.plugin.getJson().parse(result.getString("skills"), JsonObject.class); - for (Entry entry : object.entrySet()) - data.setSkillLevel(entry.getKey(), entry.getValue().getAsInt()); - } - if (!isEmpty(result.getString("bound_skills"))) - for (String skill : getJSONArray(result.getString("bound_skills"))) - if (data.getProfess().hasSkill(skill)) - data.getBoundSkills().add(data.getProfess().getSkill(skill)); - if (!isEmpty(result.getString("class_info"))) { - JsonObject object = MythicLib.plugin.getJson().parse(result.getString("class_info"), JsonObject.class); - for (Entry entry : object.entrySet()) { - try { - PlayerClass profess = MMOCore.plugin.classManager.get(entry.getKey()); - Validate.notNull(profess, "Could not find class '" + entry.getKey() + "'"); - data.applyClassInfo(profess, new SavedClassInformation(entry.getValue().getAsJsonObject())); - } catch (IllegalArgumentException exception) { - MMOCore.log(Level.WARNING, "Could not load class info '" + entry.getKey() + "': " + exception.getMessage()); - } - } - } + if (!isEmpty(result.getString("guild"))) { + Guild guild = provider.getGuildManager().getGuild(result.getString("guild")); + data.setGuild(guild.getMembers().has(data.getUniqueId()) ? guild : null); + } + if (!isEmpty(result.getString("attributes"))) data.getAttributes().load(result.getString("attributes")); + if (!isEmpty(result.getString("professions"))) + data.getCollectionSkills().load(result.getString("professions")); + if (!isEmpty(result.getString("quests"))) data.getQuestData().load(result.getString("quests")); + data.getQuestData().updateBossBar(); + if (!isEmpty(result.getString("waypoints"))) + data.getWaypoints().addAll(getJSONArray(result.getString("waypoints"))); + if (!isEmpty(result.getString("friends"))) + getJSONArray(result.getString("friends")).forEach(str -> data.getFriends().add(UUID.fromString(str))); + if (!isEmpty(result.getString("skills"))) { + JsonObject object = MythicLib.plugin.getJson().parse(result.getString("skills"), JsonObject.class); + for (Entry entry : object.entrySet()) + data.setSkillLevel(entry.getKey(), entry.getValue().getAsInt()); + } + if (!isEmpty(result.getString("bound_skills"))) + for (String skill : getJSONArray(result.getString("bound_skills"))) + if (data.getProfess().hasSkill(skill)) + data.getBoundSkills().add(data.getProfess().getSkill(skill)); + if (!isEmpty(result.getString("class_info"))) { + JsonObject object = MythicLib.plugin.getJson().parse(result.getString("class_info"), JsonObject.class); + for (Entry entry : object.entrySet()) { + try { + PlayerClass profess = MMOCore.plugin.classManager.get(entry.getKey()); + Validate.notNull(profess, "Could not find class '" + entry.getKey() + "'"); + data.applyClassInfo(profess, new SavedClassInformation(entry.getValue().getAsJsonObject())); + } catch (IllegalArgumentException exception) { + MMOCore.log(Level.WARNING, "Could not load class info '" + entry.getKey() + "': " + exception.getMessage()); + } + } + } + //We load the skill trees + data.setSkillTreeReallocationPoints(result.getInt("skill_tree_reallocation_points")); - data.setFullyLoaded(); - MMOCore.sqlDebug("Loaded saved data for: '" + data.getUniqueId() + "'!"); - MMOCore.sqlDebug(String.format("{ class: %s, level: %d }", data.getProfess().getId(), data.getLevel())); - } catch (SQLException e) { - e.printStackTrace(); - } - }); - } + JsonObject object = MythicLib.plugin.getJson().parse(result.getString("skill_tree_points"), JsonObject.class); + for (Entry entry : object.entrySet()) { + data.setSkillTreePoints(entry.getKey(), entry.getValue().getAsInt()); + } + object = MythicLib.plugin.getJson().parse(result.getString("skill_tree_nodes_level"), JsonObject.class); + for (Entry entry : object.entrySet()) { + data.setNodeLevel(MMOCore.plugin.skillTreeManager.getNode(entry.getKey()),entry.getValue().getAsInt()); + } - private boolean isEmpty(String s) { - return s == null || s.equalsIgnoreCase("null") || s.equalsIgnoreCase("{}") || s.equalsIgnoreCase("[]") || s.equalsIgnoreCase(""); - } + data.setFullyLoaded(); + MMOCore.sqlDebug("Loaded saved data for: '" + data.getUniqueId() + "'!"); + MMOCore.sqlDebug(String.format("{ class: %s, level: %d }", data.getProfess().getId(), data.getLevel())); + } catch (SQLException e) { + e.printStackTrace(); + } + }); + } - @Override - public void saveData(PlayerData data) { - MySQLTableEditor sql = new MySQLTableEditor(Table.PLAYERDATA, data.getUniqueId()); - MMOCore.sqlDebug("Saving data for: '" + data.getUniqueId() + "'..."); + private boolean isEmpty(String s) { + return s == null || s.equalsIgnoreCase("null") || s.equalsIgnoreCase("{}") || s.equalsIgnoreCase("[]") || s.equalsIgnoreCase(""); + } - sql.updateData("class_points", data.getClassPoints()); - sql.updateData("skill_points", data.getSkillPoints()); - sql.updateData("attribute_points", data.getAttributePoints()); - sql.updateData("attribute_realloc_points", data.getAttributeReallocationPoints()); - sql.updateData("level", data.getLevel()); - sql.updateData("experience", data.getExperience()); - sql.updateData("class", data.getProfess().getId()); - sql.updateData("last_login", data.getLastLogin()); - sql.updateData("guild", data.hasGuild() ? data.getGuild().getId() : null); + @Override + public void saveData(PlayerData data) { + MySQLTableEditor sql = new MySQLTableEditor(Table.PLAYERDATA, data.getUniqueId()); + MMOCore.sqlDebug("Saving data for: '" + data.getUniqueId() + "'..."); - sql.updateJSONArray("waypoints", data.getWaypoints()); - sql.updateJSONArray("friends", data.getFriends().stream().map(UUID::toString).collect(Collectors.toList())); - sql.updateJSONArray("bound_skills", data.getBoundSkills().stream().map(skill -> skill.getSkill().getHandler().getId()).collect(Collectors.toList())); + sql.updateData("class_points", data.getClassPoints()); + sql.updateData("skill_points", data.getSkillPoints()); + sql.updateData("attribute_points", data.getAttributePoints()); + sql.updateData("attribute_realloc_points", data.getAttributeReallocationPoints()); + sql.updateData("level", data.getLevel()); + sql.updateData("experience", data.getExperience()); + sql.updateData("class", data.getProfess().getId()); + sql.updateData("last_login", data.getLastLogin()); + sql.updateData("guild", data.hasGuild() ? data.getGuild().getId() : null); - sql.updateJSONObject("skills", data.mapSkillLevels().entrySet()); - sql.updateJSONObject("times_claimed", data.getItemClaims().entrySet()); + sql.updateJSONArray("waypoints", data.getWaypoints()); + sql.updateJSONArray("friends", data.getFriends().stream().map(UUID::toString).collect(Collectors.toList())); + sql.updateJSONArray("bound_skills", data.getBoundSkills().stream().map(skill -> skill.getSkill().getHandler().getId()).collect(Collectors.toList())); - sql.updateData("attributes", data.getAttributes().toJsonString()); - sql.updateData("professions", data.getCollectionSkills().toJsonString()); - sql.updateData("quests", data.getQuestData().toJsonString()); + sql.updateJSONObject("skills", data.mapSkillLevels().entrySet()); + sql.updateJSONObject("times_claimed", data.getItemClaims().entrySet()); - sql.updateData("class_info", createClassInfoData(data).toString()); + sql.updateData("attributes", data.getAttributes().toJsonString()); + sql.updateData("professions", data.getCollectionSkills().toJsonString()); + sql.updateData("quests", data.getQuestData().toJsonString()); - MMOCore.sqlDebug("Saved data for: " + data.getUniqueId()); - MMOCore.sqlDebug(String.format("{ class: %s, level: %d }", data.getProfess().getId(), data.getLevel())); - } + sql.updateData("class_info", createClassInfoData(data).toString()); - private JsonObject createClassInfoData(PlayerData data) { - JsonObject json = new JsonObject(); - for (String c : data.getSavedClasses()) { - SavedClassInformation info = data.getClassInfo(c); - JsonObject classinfo = new JsonObject(); - classinfo.addProperty("level", info.getLevel()); - classinfo.addProperty("experience", info.getExperience()); - classinfo.addProperty("skill-points", info.getSkillPoints()); - classinfo.addProperty("attribute-points", info.getAttributePoints()); - classinfo.addProperty("attribute-realloc-points", info.getAttributeReallocationPoints()); - JsonObject skillinfo = new JsonObject(); - for (String skill : info.getSkillKeys()) - skillinfo.addProperty(skill, info.getSkillLevel(skill)); - classinfo.add("skill", skillinfo); - JsonObject attributeinfo = new JsonObject(); - for (String attribute : info.getAttributeKeys()) - attributeinfo.addProperty(attribute, info.getAttributeLevel(attribute)); - classinfo.add("attribute", attributeinfo); + //Load skill tree on + sql.updateData("skill_tree_reallocation_points", data.getSkillTreeReallocationPoints()); + sql.updateJSONObject("skill_tree_points", data.getSkillTreePoints().entrySet()); + sql.updateJSONObject("skill_tree_nodes_level", data.getNodeLevelsEntrySet()); - json.add(c, classinfo); - } - return json; - } + MMOCore.sqlDebug("Saved data for: " + data.getUniqueId()); + MMOCore.sqlDebug(String.format("{ class: %s, level: %d }", data.getProfess().getId(), data.getLevel())); + } - @NotNull - @Override - public OfflinePlayerData getOffline(UUID uuid) { - return isLoaded(uuid) ? get(uuid) : new MySQLOfflinePlayerData(uuid); - } + private JsonObject createClassInfoData(PlayerData data) { + JsonObject json = new JsonObject(); + for (String c : data.getSavedClasses()) { + SavedClassInformation info = data.getClassInfo(c); + JsonObject classinfo = new JsonObject(); + classinfo.addProperty("level", info.getLevel()); + classinfo.addProperty("experience", info.getExperience()); + classinfo.addProperty("skill-points", info.getSkillPoints()); + classinfo.addProperty("attribute-points", info.getAttributePoints()); + classinfo.addProperty("attribute-realloc-points", info.getAttributeReallocationPoints()); + JsonObject skillinfo = new JsonObject(); + for (String skill : info.getSkillKeys()) + skillinfo.addProperty(skill, info.getSkillLevel(skill)); + classinfo.add("skill", skillinfo); + JsonObject attributeinfo = new JsonObject(); + for (String attribute : info.getAttributeKeys()) + attributeinfo.addProperty(attribute, info.getAttributeLevel(attribute)); + classinfo.add("attribute", attributeinfo); - private Collection getJSONArray(String json) { - return new ArrayList<>(Arrays.asList(MythicLib.plugin.getJson().parse(json, String[].class))); - } + json.add(c, classinfo); + } - public class MySQLOfflinePlayerData extends OfflinePlayerData { - private int level; - private long lastLogin; - private PlayerClass profess; - private List friends; + return json; + } - public MySQLOfflinePlayerData(UUID uuid) { - super(uuid); + @NotNull + @Override + public OfflinePlayerData getOffline(UUID uuid) { + return isLoaded(uuid) ? get(uuid) : new MySQLOfflinePlayerData(uuid); + } - provider.getResult("SELECT * FROM mmocore_playerdata WHERE uuid = '" + uuid + "';", (result) -> { - try { - MMOCore.sqlDebug("Loading OFFLINE data for '" + uuid + "'."); - if (!result.next()) { - level = 0; - lastLogin = 0; - profess = MMOCore.plugin.classManager.getDefaultClass(); - friends = new ArrayList<>(); - MMOCore.sqlDebug("Default OFFLINE data loaded."); - } else { - level = result.getInt("level"); - lastLogin = result.getLong("last_login"); - profess = isEmpty(result.getString("class")) ? MMOCore.plugin.classManager.getDefaultClass() : MMOCore.plugin.classManager.get(result.getString("class")); - if (!isEmpty(result.getString("friends"))) - getJSONArray(result.getString("friends")).forEach(str -> friends.add(UUID.fromString(str))); - else friends = new ArrayList<>(); - MMOCore.sqlDebug("Saved OFFLINE data loaded."); - } - } catch (SQLException e) { - e.printStackTrace(); - } - }); - } + private Collection getJSONArray(String json) { + return new ArrayList<>(Arrays.asList(MythicLib.plugin.getJson().parse(json, String[].class))); + } - @Override - public void removeFriend(UUID uuid) { - friends.remove(uuid); - new MySQLTableEditor(Table.PLAYERDATA, uuid).updateData("friends", friends.stream().map(UUID::toString).collect(Collectors.toList())); - } + public class MySQLOfflinePlayerData extends OfflinePlayerData { + private int level; + private long lastLogin; + private PlayerClass profess; + private List friends; - @Override - public boolean hasFriend(UUID uuid) { - return friends.contains(uuid); - } + public MySQLOfflinePlayerData(UUID uuid) { + super(uuid); - @Override - public PlayerClass getProfess() { - return profess; - } + provider.getResult("SELECT * FROM mmocore_playerdata WHERE uuid = '" + uuid + "';", (result) -> { + try { + MMOCore.sqlDebug("Loading OFFLINE data for '" + uuid + "'."); + if (!result.next()) { + level = 0; + lastLogin = 0; + profess = MMOCore.plugin.classManager.getDefaultClass(); + friends = new ArrayList<>(); + MMOCore.sqlDebug("Default OFFLINE data loaded."); + } else { + level = result.getInt("level"); + lastLogin = result.getLong("last_login"); + profess = isEmpty(result.getString("class")) ? MMOCore.plugin.classManager.getDefaultClass() : MMOCore.plugin.classManager.get(result.getString("class")); + if (!isEmpty(result.getString("friends"))) + getJSONArray(result.getString("friends")).forEach(str -> friends.add(UUID.fromString(str))); + else friends = new ArrayList<>(); + MMOCore.sqlDebug("Saved OFFLINE data loaded."); + } + } catch (SQLException e) { + e.printStackTrace(); + } + }); + } - @Override - public int getLevel() { - return level; - } + @Override + public void removeFriend(UUID uuid) { + friends.remove(uuid); + new MySQLTableEditor(Table.PLAYERDATA, uuid).updateData("friends", friends.stream().map(UUID::toString).collect(Collectors.toList())); + } - @Override - public long getLastLogin() { - return lastLogin; - } - } + @Override + public boolean hasFriend(UUID uuid) { + return friends.contains(uuid); + } + + @Override + public PlayerClass getProfess() { + return profess; + } + + @Override + public int getLevel() { + return level; + } + + @Override + public long getLastLogin() { + return lastLogin; + } + } } diff --git a/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java b/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java index 1a74fb23..7872d50e 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java +++ b/src/main/java/net/Indyuce/mmocore/manager/data/yaml/YAMLPlayerDataManager.java @@ -77,8 +77,7 @@ public class YAMLPlayerDataManager extends PlayerDataManager { //Load skill tree nodes for (SkillTreeNode node : MMOCore.plugin.skillTreeManager.getAllNodes()) { - String path = "skill-tree-nodes." + node.getTree().getId() + "." + node.getId(); - + String path = "skill-tree-nodes." + node.getFullId(); if (config.contains(path)) data.setNodeLevel(node, config.getInt(path)); else { @@ -92,7 +91,6 @@ public class YAMLPlayerDataManager extends PlayerDataManager { if (section != null) { for (String key : section.getKeys(false)) data.setSkillTreePoints(key, section.getInt(key)); - } //Put 0 to the rest of the values if nothing has been given List skillTreeIds = MMOCore.plugin.skillTreeManager.getAll().stream().map(SkillTree::getId).collect(Collectors.toList()); @@ -102,7 +100,7 @@ public class YAMLPlayerDataManager extends PlayerDataManager { data.setSkillTreePoints(treeId, 0); } - data.setSkillTreeReallocationPoints(config.getInt("skill-tree-reallocation-points",0)); + data.setSkillTreeReallocationPoints(config.getInt("skill-tree-reallocation-points", 0)); // Load class slots, use try so the player can log in. if (config.contains("class-info")) @@ -149,7 +147,7 @@ public class YAMLPlayerDataManager extends PlayerDataManager { for (String treeId : data.getSkillTreePoints().keySet()) { config.set("skill-tree-points." + treeId, data.getSkillTreePoint(treeId)); } - config.set("skill-tree-reallocation-points",data.getSkillTreeReallocationPoints()); + config.set("skill-tree-reallocation-points", data.getSkillTreeReallocationPoints()); List boundSkills = new ArrayList<>(); data.getBoundSkills().forEach(skill -> boundSkills.add(skill.getSkill().getHandler().getId())); diff --git a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java index 6e9a386e..e439b904 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java @@ -52,6 +52,7 @@ public class SkillTreeNode implements Unlockable { public SkillTreeNode(SkillTree tree, ConfigurationSection config) { + Validate.notNull(config, "Config cannot be null"); this.id = config.getName(); this.tree = tree; @@ -106,7 +107,7 @@ public class SkillTreeNode implements Unlockable { } } catch (NumberFormatException e) { - MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't load modifiers for the skill node " + tree.getId() + "." + id+ " :Problem with the Number Format."); + MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't load modifiers for the skill node " + tree.getId() + "." + id + " :Problem with the Number Format."); } } @@ -114,9 +115,12 @@ public class SkillTreeNode implements Unlockable { maxLevel = config.contains("max-level") ? config.getInt("max-level") : 1; maxChildren = config.contains("max-children") ? config.getInt("max-children") : 1; //If coordinates are precised adn we are not wiht an automaticTree we set them up - if ((!(tree instanceof AutomaticSkillTree)) && config.contains("coordinates.x") && config.contains("coordinates.y")) { + if ((!(tree instanceof AutomaticSkillTree))) { + Validate.isTrue(config.contains("coordinates.x") && config.contains("coordinates.y"),"No coordinates specified"); coordinates = new IntegerCoordinates(config.getInt("coordinates.x"), config.getInt("coordinates.y")); } + } + /* if (config.contains("modifiers")) { for (String key : config.getConfigurationSection("modifiers").getKeys(false)) { @@ -126,8 +130,6 @@ public class SkillTreeNode implements Unlockable { } */ - } - public SkillTree getTree() { return tree; @@ -195,6 +197,11 @@ public class SkillTreeNode implements Unlockable { return id; } + + public String getFullId() { + return tree.getId() + "." + id; + } + public String getName() { return MythicLib.plugin.parseColors(name); } diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java index 01a6a013..823b2cc1 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java @@ -55,15 +55,24 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject protected final List roots = new ArrayList<>(); public SkillTree(ConfigurationSection config) { + super(config); this.id = Objects.requireNonNull(config.getString("id"), "Could not find skill tree id"); this.name = MythicLib.plugin.parseColors(Objects.requireNonNull(config.getString("name"), "Could not find skill tree name")); Objects.requireNonNull(config.getStringList("lore"), "Could not find skill tree lore").forEach(str -> lore.add(MythicLib.plugin.parseColors(str))); this.item = Material.valueOf(MMOCoreUtils.toEnumName(Objects.requireNonNull(config.getString("item")))); Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find any nodes in the tree"); + + for (String key : config.getConfigurationSection("nodes").getKeys(false)) { - SkillTreeNode node = new SkillTreeNode(this, config.getConfigurationSection("nodes." + key)); - nodes.put(node.getId(), node); + try { + + SkillTreeNode node = new SkillTreeNode(this, config.getConfigurationSection("nodes." + key)); + nodes.put(node.getId(), node); + + } catch (Exception e) { + MMOCore.plugin.getLogger().log(Level.SEVERE,"Couldn't load skill tree node "+id+"."+key+": "+e.getMessage()); + } } try { if (config.contains("paths")) { @@ -141,24 +150,28 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject } public static SkillTree loadSkillTree(ConfigurationSection config) { - String string = config.getString("type"); - - Validate.isTrue(string.equals("automatic") || string.equals("linked") || string.equals("custom"), "You must precise the type of the skill tree in the yml!" + - "\nAllowed values: 'automatic','linked','custom'"); SkillTree skillTree = null; - if (string.equals("automatic")) { - skillTree = new AutomaticSkillTree(config); - skillTree.postLoad(); - } - if (string.equals("linked")) { - skillTree = new LinkedSkillTree(config); - skillTree.postLoad(); - } - if (string.equals("custom")) { - skillTree = new CustomSkillTree(config); - skillTree.postLoad(); - } + try { + String string = config.getString("type"); + + Validate.isTrue(string.equals("automatic") || string.equals("linked") || string.equals("custom"), "You must precise the type of the skill tree in the yml!" + + "\nAllowed values: 'automatic','linked','custom'"); + if (string.equals("automatic")) { + skillTree = new AutomaticSkillTree(config); + skillTree.postLoad(); + } + if (string.equals("linked")) { + skillTree = new LinkedSkillTree(config); + skillTree.postLoad(); + } + if (string.equals("custom")) { + skillTree = new CustomSkillTree(config); + skillTree.postLoad(); + } + } catch (Exception e) { + MMOCore.plugin.getLogger().log(Level.SEVERE, "Couldn't load skill tree " + config.getName() + ": " + e.getMessage()); + } return skillTree; } @@ -189,10 +202,10 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject } else if (playerData.getNodeLevel(node) == 0 && node.isRoot()) { playerData.setNodeState(node, NodeState.UNLOCKABLE); } else { - boolean isUnlockableFromStrongParent = node.getStrongParents().size()==0?true:true; - boolean isUnlockableFromSoftParent = node.getSoftParents().size()==0?true:false; - boolean isFullyLockedFromStrongParent = node.getStrongParents().size()==0?false:false; - boolean isFullyLockedFromSoftParent = node.getSoftParents().size()==0?false:true; + boolean isUnlockableFromStrongParent = node.getStrongParents().size() == 0 ? true : true; + boolean isUnlockableFromSoftParent = node.getSoftParents().size() == 0 ? true : false; + boolean isFullyLockedFromStrongParent = node.getStrongParents().size() == 0 ? false : false; + boolean isFullyLockedFromSoftParent = node.getSoftParents().size() == 0 ? false : true; for (SkillTreeNode strongParent : node.getStrongParents()) { if (playerData.getNodeLevel(strongParent) < node.getParentNeededLevel(strongParent)) { @@ -210,7 +223,6 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject } - for (SkillTreeNode softParent : node.getSoftParents()) { if (playerData.getNodeLevel(softParent) > node.getParentNeededLevel(softParent)) { isUnlockableFromSoftParent = true; From 56178ca5937df99d00da3878ab5bf727b8e58c23 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Thu, 28 Jul 2022 11:44:19 +0200 Subject: [PATCH 05/11] conditions.yml where you can reference some conditions. --- pom.xml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/pom.xml b/pom.xml index 51b355ac..849669a5 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 net.Indyuce MMOCore - 1.9.2 + 1.9.5 MMOCore Offer your players a brand new RPG experience!! @@ -39,14 +39,6 @@ - - org.apache.maven.plugins - maven-jar-plugin - 2.3.1 - - C:\Users\guill\Minecraft Server\Server\plugins - - From 39e5096c3b629c0cd39ecca5df032509ccbe6acf Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Thu, 28 Jul 2022 12:18:45 +0200 Subject: [PATCH 06/11] Merge --- src/main/java/net/Indyuce/mmocore/MMOCore.java | 4 +++- .../net/Indyuce/mmocore/api/player/PlayerData.java | 12 +++++++++++- .../Indyuce/mmocore/quest/compat/QuestModule.java | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index 1c19397d..f025d9ac 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -2,7 +2,6 @@ package net.Indyuce.mmocore; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.UtilityMethods; -import io.lumine.mythic.lib.comp.Metrics; import io.lumine.mythic.lib.version.SpigotPlugin; import io.lumine.mythic.utils.plugin.LuminePlugin; import net.Indyuce.mmocore.api.ConfigFile; @@ -25,7 +24,9 @@ import net.Indyuce.mmocore.comp.region.WorldGuardMMOLoader; import net.Indyuce.mmocore.comp.region.WorldGuardRegionHandler; import net.Indyuce.mmocore.comp.vault.VaultEconomy; import net.Indyuce.mmocore.comp.vault.VaultMMOLoader; +import net.Indyuce.mmocore.guild.GuildModuleType; import net.Indyuce.mmocore.guild.provided.Guild; +import net.Indyuce.mmocore.guild.provided.MMOCoreGuildModule; import net.Indyuce.mmocore.listener.*; import net.Indyuce.mmocore.listener.event.PlayerPressKeyListener; import net.Indyuce.mmocore.listener.option.*; @@ -40,6 +41,7 @@ import net.Indyuce.mmocore.manager.profession.*; import net.Indyuce.mmocore.manager.social.BoosterManager; import net.Indyuce.mmocore.manager.social.PartyManager; import net.Indyuce.mmocore.manager.social.RequestManager; +import net.Indyuce.mmocore.party.MMOCoreTargetRestriction; import net.Indyuce.mmocore.party.PartyModule; import net.Indyuce.mmocore.party.PartyModuleType; import net.Indyuce.mmocore.party.provided.MMOCorePartyModule; diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index d180dd97..09604a4e 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -1,14 +1,23 @@ package net.Indyuce.mmocore.api.player; +import com.google.gson.JsonObject; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.player.MMOPlayerData; import io.lumine.mythic.lib.player.TemporaryPlayerData; import io.lumine.mythic.lib.player.cooldown.CooldownMap; +import io.lumine.mythic.lib.player.modifier.PlayerModifier; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.ConfigMessage; import net.Indyuce.mmocore.api.SoundEvent; +import net.Indyuce.mmocore.api.quest.trigger.Trigger; import net.Indyuce.mmocore.player.Unlockable; -import net.Indyuce.mmocore.waypoint.CostType; +import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.NodeState; +import net.Indyuce.mmocore.tree.SkillTreeNode; +import net.Indyuce.mmocore.tree.skilltree.LinkedSkillTree; +import net.Indyuce.mmocore.tree.skilltree.SkillTree; +import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo; +import net.Indyuce.mmocore.tree.skilltree.display.Icon; import net.Indyuce.mmocore.waypoint.Waypoint; import net.Indyuce.mmocore.api.event.PlayerExperienceGainEvent; import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent; @@ -53,6 +62,7 @@ import org.jetbrains.annotations.NotNull; import javax.annotation.Nullable; import java.util.*; import java.util.logging.Level; +import java.util.stream.Collectors; public class PlayerData extends OfflinePlayerData implements Closable, ExperienceTableClaimer { diff --git a/src/main/java/net/Indyuce/mmocore/quest/compat/QuestModule.java b/src/main/java/net/Indyuce/mmocore/quest/compat/QuestModule.java index f98c7253..284df49e 100644 --- a/src/main/java/net/Indyuce/mmocore/quest/compat/QuestModule.java +++ b/src/main/java/net/Indyuce/mmocore/quest/compat/QuestModule.java @@ -11,7 +11,7 @@ public interface QuestModule { * @return Quest with given identifier */ @Nullable - public T getQuest(String id); + public T getQuestOrThrow(String id); /** * @return If a specific player has made a certain quest From b3d783dea43e087b81e560913f230ac273a71206 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Thu, 28 Jul 2022 12:27:33 +0200 Subject: [PATCH 07/11] Merge --- .../java/net/Indyuce/mmocore/MMOCore.java | 665 +++++++++--------- .../mmocore/api/player/PlayerData.java | 7 +- 2 files changed, 333 insertions(+), 339 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index f025d9ac..c7bc40ed 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -7,6 +7,7 @@ import io.lumine.mythic.utils.plugin.LuminePlugin; import net.Indyuce.mmocore.api.ConfigFile; import net.Indyuce.mmocore.api.PlayerActionBar; import net.Indyuce.mmocore.api.player.PlayerData; +import net.Indyuce.mmocore.api.player.attribute.AttributeModifier; import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource; import net.Indyuce.mmocore.api.player.stats.StatType; import net.Indyuce.mmocore.api.util.debug.DebugMode; @@ -24,6 +25,7 @@ import net.Indyuce.mmocore.comp.region.WorldGuardMMOLoader; import net.Indyuce.mmocore.comp.region.WorldGuardRegionHandler; import net.Indyuce.mmocore.comp.vault.VaultEconomy; import net.Indyuce.mmocore.comp.vault.VaultMMOLoader; +import net.Indyuce.mmocore.guild.GuildModule; import net.Indyuce.mmocore.guild.GuildModuleType; import net.Indyuce.mmocore.guild.provided.Guild; import net.Indyuce.mmocore.guild.provided.MMOCoreGuildModule; @@ -46,11 +48,17 @@ import net.Indyuce.mmocore.party.PartyModule; import net.Indyuce.mmocore.party.PartyModuleType; import net.Indyuce.mmocore.party.provided.MMOCorePartyModule; import net.Indyuce.mmocore.skill.cast.SkillCastingMode; +import net.Indyuce.mmocore.skill.custom.mechanic.ExperienceMechanic; +import net.Indyuce.mmocore.skill.custom.mechanic.ManaMechanic; +import net.Indyuce.mmocore.skill.custom.mechanic.StaminaMechanic; +import net.Indyuce.mmocore.skill.custom.mechanic.StelliumMechanic; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.ChatColor; +import io.lumine.mythic.lib.metrics.bukkit.Metrics; import org.bukkit.command.CommandMap; import org.bukkit.configuration.file.FileConfiguration; +import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.scheduler.BukkitRunnable; import org.jetbrains.annotations.NotNull; @@ -59,268 +67,253 @@ import java.lang.reflect.Field; import java.util.Iterator; import java.util.logging.Level; -public class MMOCore extends LuminePlugin { - public static MMOCore plugin; +public class MMOCore extends JavaPlugin { + public static MMOCore plugin; - public final WaypointManager waypointManager = new WaypointManager(); - public final SoundManager soundManager = new SoundManager(); - public final RequestManager requestManager = new RequestManager(); - public final ConfigItemManager configItems = new ConfigItemManager(); - public final PlayerActionBar actionBarManager = new PlayerActionBar(); - public final SkillManager skillManager = new SkillManager(); - public final ClassManager classManager = new ClassManager(); - public final DropTableManager dropTableManager = new DropTableManager(); - public final BoosterManager boosterManager = new BoosterManager(); - public final AttributeManager attributeManager = new AttributeManager(); - public final PartyManager partyManager = new PartyManager(); - public final QuestManager questManager = new QuestManager(); - public final ProfessionManager professionManager = new ProfessionManager(); - public final ExperienceManager experience = new ExperienceManager(); - public final LootChestManager lootChests = new LootChestManager(); - public final MMOLoadManager loadManager = new MMOLoadManager(); - public final RestrictionManager restrictionManager = new RestrictionManager(); - public final SkillTreeManager skillTreeManager = new SkillTreeManager(); + public final WaypointManager waypointManager = new WaypointManager(); + public final SoundManager soundManager = new SoundManager(); + public final RequestManager requestManager = new RequestManager(); + public final ConfigItemManager configItems = new ConfigItemManager(); + public final PlayerActionBar actionBarManager = new PlayerActionBar(); + public final SkillManager skillManager = new SkillManager(); + public final ClassManager classManager = new ClassManager(); + public final DropTableManager dropTableManager = new DropTableManager(); + public final BoosterManager boosterManager = new BoosterManager(); + public final AttributeManager attributeManager = new AttributeManager(); + public final PartyManager partyManager = new PartyManager(); + public final QuestManager questManager = new QuestManager(); + public final ProfessionManager professionManager = new ProfessionManager(); + public final ExperienceManager experience = new ExperienceManager(); + public final LootChestManager lootChests = new LootChestManager(); + public final MMOLoadManager loadManager = new MMOLoadManager(); + public final RestrictionManager restrictionManager = new RestrictionManager(); + public final SkillTreeManager skillTreeManager = new SkillTreeManager(); - // Profession managers - public final CustomBlockManager mineManager = new CustomBlockManager(); - public final FishingManager fishingManager = new FishingManager(); - public final AlchemyManager alchemyManager = new AlchemyManager(); - public final EnchantManager enchantManager = new EnchantManager(); - public final SmithingManager smithingManager = new SmithingManager(); + // Profession managers + public final CustomBlockManager mineManager = new CustomBlockManager(); + public final FishingManager fishingManager = new FishingManager(); + public final AlchemyManager alchemyManager = new AlchemyManager(); + public final EnchantManager enchantManager = new EnchantManager(); + public final SmithingManager smithingManager = new SmithingManager(); - @NotNull - public ConfigManager configManager; - public VaultEconomy economy; - public RegionHandler regionHandler = new DefaultRegionHandler(); - public PlaceholderParser placeholderParser = new DefaultParser(); - public DataProvider dataProvider = new YAMLDataProvider(); + @NotNull + public ConfigManager configManager; + public VaultEconomy economy; + public RegionHandler regionHandler = new DefaultRegionHandler(); + public PlaceholderParser placeholderParser = new DefaultParser(); + public DataProvider dataProvider = new YAMLDataProvider(); - // Modules - @NotNull - public PartyModule partyModule; + // Modules + @NotNull + public PartyModule partyModule; + public GuildModule guildModule; + public boolean shouldDebugSQL = false; - public boolean shouldDebugSQL = false; + private static final int MYTHICLIB_COMPATIBILITY_INDEX = 7; - private static final int MYTHICLIB_COMPATIBILITY_INDEX = 7; + public MMOCore() { + plugin = this; + } - public MMOCore() { - plugin = this; - } - - public void load() { - - // Check if the ML build matches - if (MYTHICLIB_COMPATIBILITY_INDEX != MythicLib.MMOCORE_COMPATIBILITY_INDEX) { - getLogger().log(Level.WARNING, "Your versions of MythicLib and MMOCore do not match. Make sure you are using the latest builds of both plugins"); - disable(); - return; - } - - // Register target restrictions due to MMOCore in MythicLib - MythicLib.plugin.getEntities().registerRestriction(new MMOCoreTargetRestriction()); - - // Register extra objective, drop items... - if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) - loadManager.registerLoader(new WorldGuardMMOLoader()); - - if (Bukkit.getPluginManager().getPlugin("Citizens") != null) - loadManager.registerLoader(new CitizensMMOLoader()); - - if (Bukkit.getPluginManager().getPlugin("Vault") != null) loadManager.registerLoader(new VaultMMOLoader()); - - if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) - loadManager.registerLoader(new MythicMobsMMOLoader()); - } - - public void enable() { - new SpigotPlugin(70575, this).checkForUpdate(); - new Metrics(this); - saveDefaultConfig(); - - final int configVersion = getConfig().contains("config-version", true) ? getConfig().getInt("config-version") : -1; - final int defConfigVersion = getConfig().getDefaults().getInt("config-version"); - if (configVersion != defConfigVersion) { - getLogger().warning("You may be using an outdated config.yml!"); - getLogger().warning("(Your config version: '" + configVersion + "' | Expected config version: '" + defConfigVersion + "')"); - } - - if (getConfig().isConfigurationSection("mysql") && getConfig().getBoolean("mysql.enabled")) - dataProvider = new MySQLDataProvider(getConfig()); - shouldDebugSQL = getConfig().getBoolean("mysql.debug"); - - if (getConfig().isConfigurationSection("default-playerdata")) - dataProvider.getDataManager().loadDefaultData(getConfig().getConfigurationSection("default-playerdata")); - - if (Bukkit.getPluginManager().getPlugin("Vault") != null) economy = new VaultEconomy(); - - if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) { - placeholderParser = new PlaceholderAPIParser(); - getLogger().log(Level.INFO, "Hooked onto PlaceholderAPI"); - } - - if (Bukkit.getPluginManager().getPlugin("Citizens") != null) { - Bukkit.getPluginManager().registerEvents(new CitizenInteractEventListener(), this); - getLogger().log(Level.INFO, "Hooked onto Citizens"); - } - - if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) { - regionHandler = new WorldGuardRegionHandler(); - getLogger().log(Level.INFO, "Hooked onto WorldGuard"); - } - - if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) { - Bukkit.getServer().getPluginManager().registerEvents(new MythicHook(), this); - MMOCore.plugin.getLogger().log(Level.INFO, "Hooked onto MythicMobs"); - } - - /* - * Resource regeneration. Must check if entity is dead otherwise regen will make - * the 'respawn' button glitched plus HURT entity effect bug - */ - new BukkitRunnable() { - public void run() { - for (PlayerData player : PlayerData.getAll()) - if (player.isOnline() && !player.getPlayer().isDead()) - for (PlayerResource resource : PlayerResource.values()) { - double regenAmount = player.getProfess().getHandler(resource).getRegen(player); - if (regenAmount != 0) - resource.regen(player, regenAmount); - } - } - }.runTaskTimer(MMOCore.plugin, 100, 20); - - /* - * Clean active loot chests every 5 minutes. Cannot register this runnable in - * the loot chest manager because it is instanced when the plugin loads - */ - new BukkitRunnable() { - public void run() { - Iterator iterator = lootChests.getActive().iterator(); - while (iterator.hasNext()) { - LootChest next = iterator.next(); - if (next.shouldExpire()) { - iterator.remove(); - next.expire(false); - } - } - } - }.runTaskTimer(this, 5 * 60 * 20, 5 * 60 * 20); - - /* - * For the sake of the lord, make sure they aren't using MMOItems Mana and - * Stamina Addon...This should prevent a couple error reports produced by people - * not reading the installation guide... - */ - if (Bukkit.getPluginManager().getPlugin("MMOMana") != null) { - getLogger().log(Level.SEVERE, ChatColor.DARK_RED + "MMOCore is not meant to be used with MMOItems ManaAndStamina"); - getLogger().log(Level.SEVERE, ChatColor.DARK_RED + "Please read the installation guide!"); - Bukkit.broadcastMessage(ChatColor.DARK_RED + "[MMOCore] MMOCore is not meant to be used with MMOItems ManaAndStamina"); - Bukkit.broadcastMessage(ChatColor.DARK_RED + "[MMOCore] Please read the installation guide!"); - return; - } - - initializePlugin(false); - - if (getConfig().getBoolean("vanilla-exp-redirection.enabled")) - Bukkit.getPluginManager().registerEvents(new RedirectVanillaExp(getConfig().getDouble("vanilla-exp-redirection.ratio")), this); - - // Enable debug mode for extra debug tools - if (getConfig().contains("debug")) { - DebugMode.setLevel(getConfig().getInt("debug", 0)); - DebugMode.enableActionBar(); - } - - // Load quest module - try { - String questPluginName = UtilityMethods.enumName(getConfig().getString("quest-plugin")); - PartyModuleType moduleType = PartyModuleType.valueOf(questPluginName); - Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); - partyModule = moduleType.provideModule(); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not initialize quest module: " + exception.getMessage()); - partyModule = new MMOCorePartyModule(); - } + @Override + public void onLoad() { + // Register MMOCore-specific objects + MythicLib.plugin.getEntities().registerRestriction(new MMOCoreTargetRestriction()); + MythicLib.plugin.getModifiers().registerModifierType("attribute", configObject -> new AttributeModifier(configObject)); - // Load party module - try { - String partyPluginName = UtilityMethods.enumName(getConfig().getString("party-plugin")); - PartyModuleType moduleType = PartyModuleType.valueOf(partyPluginName); - Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); - partyModule = moduleType.provideModule(); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not initialize party module: " + exception.getMessage()); - partyModule = new MMOCorePartyModule(); - } + // Skill creation + MythicLib.plugin.getSkills().registerMechanic("mana", config -> new ManaMechanic(config)); + MythicLib.plugin.getSkills().registerMechanic("stamina", config -> new StaminaMechanic(config)); + MythicLib.plugin.getSkills().registerMechanic("stellium", config -> new StelliumMechanic(config)); + MythicLib.plugin.getSkills().registerMechanic("experience", config -> new ExperienceMechanic(config)); - // Load guild module - try { - String pluginName = UtilityMethods.enumName(getConfig().getString("guild-plugin")); - GuildModuleType moduleType = GuildModuleType.valueOf(pluginName); - Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); - guildModule = moduleType.provideModule(); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not initialize guild module: " + exception.getMessage()); - guildModule = new MMOCoreGuildModule(); - } + // Register extra objective, drop items... + if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) + loadManager.registerLoader(new WorldGuardMMOLoader()); - // Skill casting - try { - SkillCastingMode mode = SkillCastingMode.valueOf(UtilityMethods.enumName(getConfig().getString("skill-casting.mode"))); - Bukkit.getPluginManager().registerEvents(mode.loadFromConfig(getConfig().getConfigurationSection("skill-casting")), this); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not load skill casting: " + exception.getMessage()); - } + if (Bukkit.getPluginManager().getPlugin("Citizens") != null) + loadManager.registerLoader(new CitizensMMOLoader()); - if (configManager.overrideVanillaExp = getConfig().getBoolean("override-vanilla-exp")) - Bukkit.getPluginManager().registerEvents(new VanillaExperienceOverride(), this); + if (Bukkit.getPluginManager().getPlugin("Vault") != null) loadManager.registerLoader(new VaultMMOLoader()); - if (getConfig().getBoolean("hotbar-swapping.enabled")) - try { - Bukkit.getPluginManager().registerEvents(new HotbarSwap(getConfig().getConfigurationSection("hotbar-swapping")), this); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not load hotbar swapping: " + exception.getMessage()); - } + if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) + loadManager.registerLoader(new MythicMobsMMOLoader()); + } - if (getConfig().getBoolean("prevent-spawner-xp")) - Bukkit.getPluginManager().registerEvents(new NoSpawnerEXP(), this); + public void enable() { + new SpigotPlugin(70575, this).checkForUpdate(); + new Metrics(this); + saveDefaultConfig(); - if (getConfig().getBoolean("death-exp-loss.enabled")) - Bukkit.getPluginManager().registerEvents(new DeathExperienceLoss(), this); + final int configVersion = getConfig().contains("config-version", true) ? getConfig().getInt("config-version") : -1; + final int defConfigVersion = getConfig().getDefaults().getInt("config-version"); + if (configVersion != defConfigVersion) { + getLogger().warning("You may be using an outdated config.yml!"); + getLogger().warning("(Your config version: '" + configVersion + "' | Expected config version: '" + defConfigVersion + "')"); + } - if (getConfig().getBoolean("shift-click-player-profile-check")) - Bukkit.getPluginManager().registerEvents(new PlayerProfileCheck(), this); + if (getConfig().isConfigurationSection("mysql") && getConfig().getBoolean("mysql.enabled")) + dataProvider = new MySQLDataProvider(getConfig()); + shouldDebugSQL = getConfig().getBoolean("mysql.debug"); - Bukkit.getPluginManager().registerEvents(new WaypointsListener(), this); - Bukkit.getPluginManager().registerEvents(new PlayerListener(), this); - Bukkit.getPluginManager().registerEvents(new GoldPouchesListener(), this); - Bukkit.getPluginManager().registerEvents(new BlockListener(), this); - Bukkit.getPluginManager().registerEvents(new LootableChestsListener(), this); - Bukkit.getPluginManager().registerEvents(new GuildListener(), this); - Bukkit.getPluginManager().registerEvents(new FishingListener(), this); - Bukkit.getPluginManager().registerEvents(new PlayerCollectStats(), this); - Bukkit.getPluginManager().registerEvents(new PlayerPressKeyListener(), this); - // Bukkit.getPluginManager().registerEvents(new ClassTriggers(), this); + if (getConfig().isConfigurationSection("default-playerdata")) + dataProvider.getDataManager().loadDefaultData(getConfig().getConfigurationSection("default-playerdata")); - /* - * Initialize player data from all online players. This is very important to do - * that after registering all the professses otherwise the player datas can't - * recognize what profess the player has and professes will be lost - */ - Bukkit.getOnlinePlayers().forEach(player -> dataProvider.getDataManager().setup(player.getUniqueId())); + if (Bukkit.getPluginManager().getPlugin("Vault") != null) economy = new VaultEconomy(); - // load guild data after loading player data - dataProvider.getGuildManager().load(); + if (Bukkit.getPluginManager().getPlugin("PlaceholderAPI") != null) { + placeholderParser = new PlaceholderAPIParser(); + getLogger().log(Level.INFO, "Hooked onto PlaceholderAPI"); + } - // Command - try { - final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap"); + if (Bukkit.getPluginManager().getPlugin("Citizens") != null) { + Bukkit.getPluginManager().registerEvents(new CitizenInteractEventListener(), this); + getLogger().log(Level.INFO, "Hooked onto Citizens"); + } - bukkitCommandMap.setAccessible(true); - CommandMap commandMap = (CommandMap) bukkitCommandMap.get(Bukkit.getServer()); + if (Bukkit.getPluginManager().getPlugin("WorldGuard") != null) { + regionHandler = new WorldGuardRegionHandler(); + getLogger().log(Level.INFO, "Hooked onto WorldGuard"); + } - FileConfiguration config = new ConfigFile("commands").getConfig(); + if (Bukkit.getPluginManager().getPlugin("MythicMobs") != null) { + Bukkit.getServer().getPluginManager().registerEvents(new MythicHook(), this); + MMOCore.plugin.getLogger().log(Level.INFO, "Hooked onto MythicMobs"); + } + + /* + * Resource regeneration. Must check if entity is dead otherwise regen will make + * the 'respawn' button glitched plus HURT entity effect bug + */ + new BukkitRunnable() { + public void run() { + for (PlayerData player : PlayerData.getAll()) + if (player.isOnline() && !player.getPlayer().isDead()) + for (PlayerResource resource : PlayerResource.values()) { + double regenAmount = player.getProfess().getHandler(resource).getRegen(player); + if (regenAmount != 0) + resource.regen(player, regenAmount); + } + } + }.runTaskTimer(MMOCore.plugin, 100, 20); + + + /* + * For the sake of the lord, make sure they aren't using MMOItems Mana and + * Stamina Addon...This should prevent a couple error reports produced by people + * not reading the installation guide... + */ + if (Bukkit.getPluginManager().getPlugin("MMOMana") != null) { + getLogger().log(Level.SEVERE, ChatColor.DARK_RED + "MMOCore is not meant to be used with MMOItems ManaAndStamina"); + getLogger().log(Level.SEVERE, ChatColor.DARK_RED + "Please read the installation guide!"); + Bukkit.broadcastMessage(ChatColor.DARK_RED + "[MMOCore] MMOCore is not meant to be used with MMOItems ManaAndStamina"); + Bukkit.broadcastMessage(ChatColor.DARK_RED + "[MMOCore] Please read the installation guide!"); + return; + } + + initializePlugin(false); + + if (getConfig().getBoolean("vanilla-exp-redirection.enabled")) + Bukkit.getPluginManager().registerEvents(new RedirectVanillaExp(getConfig().getDouble("vanilla-exp-redirection.ratio")), this); + + // Enable debug mode for extra debug tools + if (getConfig().contains("debug")) { + DebugMode.setLevel(getConfig().getInt("debug", 0)); + DebugMode.enableActionBar(); + } + + // Load quest module + try { + String questPluginName = UtilityMethods.enumName(getConfig().getString("quest-plugin")); + PartyModuleType moduleType = PartyModuleType.valueOf(questPluginName); + Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); + partyModule = moduleType.provideModule(); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not initialize quest module: " + exception.getMessage()); + partyModule = new MMOCorePartyModule(); + } + + + // Load party module + try { + String partyPluginName = UtilityMethods.enumName(getConfig().getString("party-plugin")); + PartyModuleType moduleType = PartyModuleType.valueOf(partyPluginName); + Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); + partyModule = moduleType.provideModule(); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not initialize party module: " + exception.getMessage()); + partyModule = new MMOCorePartyModule(); + } + + // Load guild module + try { + String pluginName = UtilityMethods.enumName(getConfig().getString("guild-plugin")); + GuildModuleType moduleType = GuildModuleType.valueOf(pluginName); + Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); + guildModule = moduleType.provideModule(); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not initialize guild module: " + exception.getMessage()); + guildModule = new MMOCoreGuildModule(); + } + + // Skill casting + try { + SkillCastingMode mode = SkillCastingMode.valueOf(UtilityMethods.enumName(getConfig().getString("skill-casting.mode"))); + Bukkit.getPluginManager().registerEvents(mode.loadFromConfig(getConfig().getConfigurationSection("skill-casting")), this); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not load skill casting: " + exception.getMessage()); + } + + if (configManager.overrideVanillaExp = getConfig().getBoolean("override-vanilla-exp")) + Bukkit.getPluginManager().registerEvents(new VanillaExperienceOverride(), this); + + if (getConfig().getBoolean("hotbar-swapping.enabled")) + try { + Bukkit.getPluginManager().registerEvents(new HotbarSwap(getConfig().getConfigurationSection("hotbar-swapping")), this); + } catch (RuntimeException exception) { + getLogger().log(Level.WARNING, "Could not load hotbar swapping: " + exception.getMessage()); + } + + if (getConfig().getBoolean("prevent-spawner-xp")) + Bukkit.getPluginManager().registerEvents(new NoSpawnerEXP(), this); + + if (getConfig().getBoolean("death-exp-loss.enabled")) + Bukkit.getPluginManager().registerEvents(new DeathExperienceLoss(), this); + + if (getConfig().getBoolean("shift-click-player-profile-check")) + Bukkit.getPluginManager().registerEvents(new PlayerProfileCheck(), this); + + Bukkit.getPluginManager().registerEvents(new WaypointsListener(), this); + Bukkit.getPluginManager().registerEvents(new PlayerListener(), this); + Bukkit.getPluginManager().registerEvents(new GoldPouchesListener(), this); + Bukkit.getPluginManager().registerEvents(new BlockListener(), this); + Bukkit.getPluginManager().registerEvents(new LootableChestsListener(), this); + Bukkit.getPluginManager().registerEvents(new GuildListener(), this); + Bukkit.getPluginManager().registerEvents(new FishingListener(), this); + Bukkit.getPluginManager().registerEvents(new PlayerCollectStats(), this); + Bukkit.getPluginManager().registerEvents(new PlayerPressKeyListener(), this); + // Bukkit.getPluginManager().registerEvents(new ClassTriggers(), this); + + /* + * Initialize player data from all online players. This is very important to do + * that after registering all the professses otherwise the player datas can't + * recognize what profess the player has and professes will be lost + */ + Bukkit.getOnlinePlayers().forEach(player -> dataProvider.getDataManager().setup(player.getUniqueId())); + + // load guild data after loading player data + dataProvider.getGuildManager().load(); + + // Command + try { + final Field bukkitCommandMap = Bukkit.getServer().getClass().getDeclaredField("commandMap"); + + bukkitCommandMap.setAccessible(true); + CommandMap commandMap = (CommandMap) bukkitCommandMap.get(Bukkit.getServer()); + + FileConfiguration config = new ConfigFile("commands").getConfig(); if (config.contains("player")) commandMap.register("mmocore", new PlayerStatsCommand(config.getConfigurationSection("player"))); @@ -352,128 +345,128 @@ public class MMOCore extends LuminePlugin { ex.printStackTrace(); } - MMOCoreCommandTreeRoot mmoCoreCommand = new MMOCoreCommandTreeRoot(); - getCommand("mmocore").setExecutor(mmoCoreCommand); - getCommand("mmocore").setTabCompleter(mmoCoreCommand); + MMOCoreCommandTreeRoot mmoCoreCommand = new MMOCoreCommandTreeRoot(); + getCommand("mmocore").setExecutor(mmoCoreCommand); + getCommand("mmocore").setTabCompleter(mmoCoreCommand); - if (getConfig().getBoolean("auto-save.enabled")) { - int autosave = getConfig().getInt("auto-save.interval") * 20; - new BukkitRunnable() { - public void run() { + if (getConfig().getBoolean("auto-save.enabled")) { + int autosave = getConfig().getInt("auto-save.interval") * 20; + new BukkitRunnable() { + public void run() { - // Save player data - for (PlayerData data : PlayerData.getAll()) - if (data.isFullyLoaded()) - dataProvider.getDataManager().saveData(data); + // Save player data + for (PlayerData data : PlayerData.getAll()) + if (data.isFullyLoaded()) + dataProvider.getDataManager().saveData(data); - // Save guild info - for (Guild guild : dataProvider.getGuildManager().getAll()) - dataProvider.getGuildManager().save(guild); - } - }.runTaskTimerAsynchronously(MMOCore.plugin, autosave, autosave); - } - } + // Save guild info + for (Guild guild : dataProvider.getGuildManager().getAll()) + dataProvider.getGuildManager().save(guild); + } + }.runTaskTimerAsynchronously(MMOCore.plugin, autosave, autosave); + } + } - public void disable() { + @Override + public void onDisable() { - // Save player data - for (PlayerData data : PlayerData.getAll()) - if (data.isFullyLoaded()) { - data.close(); - dataProvider.getDataManager().saveData(data); - } + // Save player data + for (PlayerData data : PlayerData.getAll()) + if (data.isFullyLoaded()) { + data.close(); + dataProvider.getDataManager().saveData(data); + } - // Save guild info - for (Guild guild : dataProvider.getGuildManager().getAll()) - dataProvider.getGuildManager().save(guild); + // Save guild info + for (Guild guild : dataProvider.getGuildManager().getAll()) + dataProvider.getGuildManager().save(guild); - // Close MySQL data provider (memory leaks) - if (dataProvider instanceof MySQLDataProvider) - ((MySQLDataProvider) dataProvider).close(); + // Close MySQL data provider (memory leaks) + if (dataProvider instanceof MySQLDataProvider) + ((MySQLDataProvider) dataProvider).close(); - // Reset active blocks - mineManager.resetRemainingBlocks(); + // Reset active blocks + mineManager.resetRemainingBlocks(); - // Clear spawned loot chests - lootChests.getActive().forEach(chest -> chest.expire(false)); - } + // Clear spawned loot chests + lootChests.getActive().forEach(chest -> chest.expire(false)); + } - /** - * Called either when the server starts when initializing the manager for - * the first time, or when issuing a plugin reload; in that case, stuff - * like listeners must all be cleared before. - * - * Also see {@link MMOCoreManager} - * - * @param clearBefore True when issuing a plugin reload - */ - public void initializePlugin(boolean clearBefore) { - if (clearBefore) - reloadConfig(); + /** + * Called either when the server starts when initializing the manager for + * the first time, or when issuing a plugin reload; in that case, stuff + * like listeners must all be cleared before. + *

+ * Also see {@link MMOCoreManager} + * + * @param clearBefore True when issuing a plugin reload + */ + public void initializePlugin(boolean clearBefore) { + if (clearBefore) + reloadConfig(); - configManager = new ConfigManager(); + configManager = new ConfigManager(); - if (clearBefore) - MythicLib.plugin.getSkills().initialize(true); - skillManager.initialize(clearBefore); - mineManager.initialize(clearBefore); - partyManager.initialize(clearBefore); - attributeManager.initialize(clearBefore); + if (clearBefore) + MythicLib.plugin.getSkills().initialize(true); + skillManager.initialize(clearBefore); + mineManager.initialize(clearBefore); + partyManager.initialize(clearBefore); + attributeManager.initialize(clearBefore); - // Experience must be loaded before professions and classes - experience.initialize(clearBefore); + // Experience must be loaded before professions and classes + experience.initialize(clearBefore); - // Drop tables must be loaded before professions - dropTableManager.initialize(clearBefore); + // Drop tables must be loaded before professions + dropTableManager.initialize(clearBefore); - professionManager.initialize(clearBefore); - classManager.initialize(clearBefore); + professionManager.initialize(clearBefore); + classManager.initialize(clearBefore); - InventoryManager.load(); + InventoryManager.load(); - questManager.initialize(clearBefore); - lootChests.initialize(clearBefore); - restrictionManager.initialize(clearBefore); - waypointManager.initialize(clearBefore); - requestManager.initialize(clearBefore); - soundManager.initialize(clearBefore); - configItems.initialize(clearBefore); + questManager.initialize(clearBefore); + lootChests.initialize(clearBefore); + restrictionManager.initialize(clearBefore); + waypointManager.initialize(clearBefore); + requestManager.initialize(clearBefore); + soundManager.initialize(clearBefore); + configItems.initialize(clearBefore); - if (getConfig().isConfigurationSection("action-bar")) - actionBarManager.reload(getConfig().getConfigurationSection("action-bar")); + if (getConfig().isConfigurationSection("action-bar")) + actionBarManager.reload(getConfig().getConfigurationSection("action-bar")); - StatType.load(); - if (clearBefore) - PlayerData.getAll().forEach(PlayerData::update); - } + if (clearBefore) + PlayerData.getAll().forEach(PlayerData::update); + } - public static void log(String message) { - log(Level.INFO, message); - } + public static void log(String message) { + log(Level.INFO, message); + } - public static void debug(int value, String message) { - debug(value, Level.INFO, message); - } + public static void debug(int value, String message) { + debug(value, Level.INFO, message); + } - public static void log(Level level, String message) { - plugin.getLogger().log(level, message); - } + public static void log(Level level, String message) { + plugin.getLogger().log(level, message); + } - public static void debug(int value, Level level, String message) { - if (DebugMode.level > (value - 1)) plugin.getLogger().log(level, message); - } + public static void debug(int value, Level level, String message) { + if (DebugMode.level > (value - 1)) plugin.getLogger().log(level, message); + } - public File getJarFile() { - return getFile(); - } + public File getJarFile() { + return getFile(); + } - public boolean hasEconomy() { - return economy != null && economy.isValid(); - } + public boolean hasEconomy() { + return economy != null && economy.isValid(); + } - public static void sqlDebug(String s) { - if(!MMOCore.plugin.shouldDebugSQL) return; - MMOCore.plugin.getLogger().warning("- [SQL Debug] " + s); - } + public static void sqlDebug(String s) { + if (!MMOCore.plugin.shouldDebugSQL) return; + MMOCore.plugin.getLogger().warning("- [SQL Debug] " + s); + } } diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 09604a4e..17443434 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -278,7 +278,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } } - Bukkit.broadcastMessage(playerStats.getStat(StatType.HEALTH_REGENERATION)+""); + Bukkit.broadcastMessage(playerStats.getStat("HEALTH_REGENERATION")+""); if (nodeStates.get(node) == NodeState.UNLOCKABLE) setNodeState(node, NodeState.UNLOCKED); @@ -812,8 +812,9 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return; } - value = MMOCore.plugin.boosterManager.calculateExp(null, value); - value *= 1 + getStats().getStat(StatType.ADDITIONAL_EXPERIENCE) / 100; + // Apply buffs AFTER splitting exp + value *= (1 + getStats().getStat("ADDITIONAL_EXPERIENCE") / 100) * MMOCore.plugin.boosterManager.getMultiplier(null); + // Splitting exp through party members AbstractParty party; From 7141039485e86ce34e4c1501422fcfd83e797171 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Thu, 28 Jul 2022 12:42:06 +0200 Subject: [PATCH 08/11] Merge --- src/main/java/net/Indyuce/mmocore/MMOCore.java | 6 ++++-- .../Indyuce/mmocore/quest/QuestModuleType.java | 4 ++-- ...yQuestsModule.java => BeautyQuestModule.java} | 0 .../net/Indyuce/mmocore/tree/SkillTreeNode.java | 16 +++++++++------- 4 files changed, 15 insertions(+), 11 deletions(-) rename src/main/java/net/Indyuce/mmocore/quest/compat/{BeautyQuestsModule.java => BeautyQuestModule.java} (100%) diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index c7bc40ed..e878516e 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -88,6 +88,7 @@ public class MMOCore extends JavaPlugin { public final MMOLoadManager loadManager = new MMOLoadManager(); public final RestrictionManager restrictionManager = new RestrictionManager(); public final SkillTreeManager skillTreeManager = new SkillTreeManager(); + public final StatManager statManager = new StatManager(); // Profession managers public final CustomBlockManager mineManager = new CustomBlockManager(); @@ -142,7 +143,8 @@ public class MMOCore extends JavaPlugin { loadManager.registerLoader(new MythicMobsMMOLoader()); } - public void enable() { + @Override + public void onEnable() { new SpigotPlugin(70575, this).checkForUpdate(); new Metrics(this); saveDefaultConfig(); @@ -419,7 +421,7 @@ public class MMOCore extends JavaPlugin { // Drop tables must be loaded before professions dropTableManager.initialize(clearBefore); - + statManager.initialize(clearBefore); professionManager.initialize(clearBefore); classManager.initialize(clearBefore); diff --git a/src/main/java/net/Indyuce/mmocore/quest/QuestModuleType.java b/src/main/java/net/Indyuce/mmocore/quest/QuestModuleType.java index 4c7e0366..c39d3b76 100644 --- a/src/main/java/net/Indyuce/mmocore/quest/QuestModuleType.java +++ b/src/main/java/net/Indyuce/mmocore/quest/QuestModuleType.java @@ -1,6 +1,6 @@ package net.Indyuce.mmocore.quest; -import net.Indyuce.mmocore.quest.compat.BeautyQuestsModule; +import net.Indyuce.mmocore.quest.compat.BeautyQuestModule; import net.Indyuce.mmocore.quest.compat.BlackVeinQuestsModule; import net.Indyuce.mmocore.quest.compat.QuestCreatorModule; import net.Indyuce.mmocore.quest.compat.QuestModule; @@ -11,7 +11,7 @@ import javax.inject.Provider; public enum QuestModuleType { MMOCORE("MMOCore", MMOCoreQuestModule::new), QUESTS("Quests", BlackVeinQuestsModule::new), - BEAUTY_QUEST("BeautyQuests", BeautyQuestsModule::new), + BEAUTY_QUEST("BeautyQuests", BeautyQuestModule::new), QUEST_CREATOR("QuestCreator", QuestCreatorModule::new); private final String pluginName; diff --git a/src/main/java/net/Indyuce/mmocore/quest/compat/BeautyQuestsModule.java b/src/main/java/net/Indyuce/mmocore/quest/compat/BeautyQuestModule.java similarity index 100% rename from src/main/java/net/Indyuce/mmocore/quest/compat/BeautyQuestsModule.java rename to src/main/java/net/Indyuce/mmocore/quest/compat/BeautyQuestModule.java diff --git a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java index e439b904..c1484df4 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java @@ -5,7 +5,6 @@ import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.MMOLineConfig; import io.lumine.mythic.lib.player.modifier.PlayerModifier; import io.lumine.mythic.lib.util.configobject.ConfigObject; -import io.lumine.mythic.lib.util.configobject.LineConfigObject; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.quest.trigger.Trigger; @@ -80,11 +79,14 @@ public class SkillTreeNode implements Unlockable { for (String level : section.getKeys(false)) { int value = Integer.parseInt(level); for (String str : section.getStringList(level)) { - Trigger trigger = MMOCore.plugin.loadManager.loadTrigger(new MMOLineConfig(str)); - if (!triggers.containsKey(value)) { - triggers.put(value, new ArrayList<>()); + List triggerList = MMOCore.plugin.loadManager.loadTrigger(new MMOLineConfig(str)); + for (Trigger trigger : triggerList) { + if (!triggers.containsKey(value)) { + triggers.put(value, new ArrayList<>()); + } + triggers.get(value).add(trigger); } - triggers.get(value).add(trigger); + } } } catch (NumberFormatException e) { @@ -98,7 +100,7 @@ public class SkillTreeNode implements Unlockable { for (String level : section.getKeys(false)) { int value = Integer.parseInt(level); for (String str : section.getStringList(level)) { - PlayerModifier modifier = MythicLib.plugin.getModifiers().loadPlayerModifier(new LineConfigObject(new MMOLineConfig(str))); + PlayerModifier modifier = MythicLib.plugin.getModifiers().loadPlayerModifier(new MMOLineConfig(str)); if (!modifiers.containsKey(value)) { modifiers.put(value, new ArrayList<>()); } @@ -116,7 +118,7 @@ public class SkillTreeNode implements Unlockable { maxChildren = config.contains("max-children") ? config.getInt("max-children") : 1; //If coordinates are precised adn we are not wiht an automaticTree we set them up if ((!(tree instanceof AutomaticSkillTree))) { - Validate.isTrue(config.contains("coordinates.x") && config.contains("coordinates.y"),"No coordinates specified"); + Validate.isTrue(config.contains("coordinates.x") && config.contains("coordinates.y"), "No coordinates specified"); coordinates = new IntegerCoordinates(config.getInt("coordinates.x"), config.getInt("coordinates.y")); } } From 312522d77c4f06d8c10e96e806172907bad9973d Mon Sep 17 00:00:00 2001 From: Jules Date: Sun, 7 Aug 2022 21:38:42 +0200 Subject: [PATCH 09/11] Fixed merge compile errors --- .../java/net/Indyuce/mmocore/MMOCore.java | 44 +--------- .../mmocore/api/player/PlayerData.java | 82 +++++++++++-------- .../mmocore/api/util/MMOCoreUtils.java | 9 -- .../mmocore/command/CommandVerbose.java | 4 +- .../Indyuce/mmocore/gui/SkillTreeViewer.java | 22 ++--- .../mmocore/gui/api/EditableInventory.java | 3 +- .../manager/registry/MMOCoreRegister.java | 2 +- ...isterObject.java => RegisteredObject.java} | 2 +- .../mechanic/ExperienceMechanic.java | 2 +- .../mechanic/ManaMechanic.java | 2 +- .../custom => script}/mechanic/Operation.java | 2 +- .../mechanic/StaminaMechanic.java | 2 +- .../mechanic/StelliumMechanic.java | 2 +- .../Indyuce/mmocore/tree/SkillTreeNode.java | 52 +++++------- .../mmocore/tree/skilltree/SkillTree.java | 17 ++-- .../mmocore/tree/skilltree/display/Icon.java | 3 +- src/main/resources/config.yml | 5 -- 17 files changed, 101 insertions(+), 154 deletions(-) rename src/main/java/net/Indyuce/mmocore/manager/registry/{RegisterObject.java => RegisteredObject.java} (79%) rename src/main/java/net/Indyuce/mmocore/{skill/custom => script}/mechanic/ExperienceMechanic.java (97%) rename src/main/java/net/Indyuce/mmocore/{skill/custom => script}/mechanic/ManaMechanic.java (97%) rename src/main/java/net/Indyuce/mmocore/{skill/custom => script}/mechanic/Operation.java (51%) rename src/main/java/net/Indyuce/mmocore/{skill/custom => script}/mechanic/StaminaMechanic.java (97%) rename src/main/java/net/Indyuce/mmocore/{skill/custom => script}/mechanic/StelliumMechanic.java (97%) diff --git a/src/main/java/net/Indyuce/mmocore/MMOCore.java b/src/main/java/net/Indyuce/mmocore/MMOCore.java index e878516e..011c7c58 100644 --- a/src/main/java/net/Indyuce/mmocore/MMOCore.java +++ b/src/main/java/net/Indyuce/mmocore/MMOCore.java @@ -3,14 +3,11 @@ package net.Indyuce.mmocore; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.version.SpigotPlugin; -import io.lumine.mythic.utils.plugin.LuminePlugin; import net.Indyuce.mmocore.api.ConfigFile; import net.Indyuce.mmocore.api.PlayerActionBar; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.player.attribute.AttributeModifier; import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource; -import net.Indyuce.mmocore.api.player.stats.StatType; -import net.Indyuce.mmocore.api.util.debug.DebugMode; import net.Indyuce.mmocore.command.*; import net.Indyuce.mmocore.comp.citizens.CitizenInteractEventListener; import net.Indyuce.mmocore.comp.citizens.CitizensMMOLoader; @@ -34,7 +31,6 @@ import net.Indyuce.mmocore.listener.event.PlayerPressKeyListener; import net.Indyuce.mmocore.listener.option.*; import net.Indyuce.mmocore.listener.profession.FishingListener; import net.Indyuce.mmocore.listener.profession.PlayerCollectStats; -import net.Indyuce.mmocore.loot.chest.LootChest; import net.Indyuce.mmocore.manager.*; import net.Indyuce.mmocore.manager.data.DataProvider; import net.Indyuce.mmocore.manager.data.mysql.MySQLDataProvider; @@ -48,10 +44,10 @@ import net.Indyuce.mmocore.party.PartyModule; import net.Indyuce.mmocore.party.PartyModuleType; import net.Indyuce.mmocore.party.provided.MMOCorePartyModule; import net.Indyuce.mmocore.skill.cast.SkillCastingMode; -import net.Indyuce.mmocore.skill.custom.mechanic.ExperienceMechanic; -import net.Indyuce.mmocore.skill.custom.mechanic.ManaMechanic; -import net.Indyuce.mmocore.skill.custom.mechanic.StaminaMechanic; -import net.Indyuce.mmocore.skill.custom.mechanic.StelliumMechanic; +import net.Indyuce.mmocore.script.mechanic.ExperienceMechanic; +import net.Indyuce.mmocore.script.mechanic.StaminaMechanic; +import net.Indyuce.mmocore.script.mechanic.ManaMechanic; +import net.Indyuce.mmocore.script.mechanic.StelliumMechanic; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.ChatColor; @@ -64,7 +60,6 @@ import org.jetbrains.annotations.NotNull; import java.io.File; import java.lang.reflect.Field; -import java.util.Iterator; import java.util.logging.Level; public class MMOCore extends JavaPlugin { @@ -110,8 +105,6 @@ public class MMOCore extends JavaPlugin { public GuildModule guildModule; public boolean shouldDebugSQL = false; - private static final int MYTHICLIB_COMPATIBILITY_INDEX = 7; - public MMOCore() { plugin = this; } @@ -119,7 +112,6 @@ public class MMOCore extends JavaPlugin { @Override public void onLoad() { - // Register MMOCore-specific objects MythicLib.plugin.getEntities().registerRestriction(new MMOCoreTargetRestriction()); MythicLib.plugin.getModifiers().registerModifierType("attribute", configObject -> new AttributeModifier(configObject)); @@ -201,7 +193,6 @@ public class MMOCore extends JavaPlugin { } }.runTaskTimer(MMOCore.plugin, 100, 20); - /* * For the sake of the lord, make sure they aren't using MMOItems Mana and * Stamina Addon...This should prevent a couple error reports produced by people @@ -220,24 +211,6 @@ public class MMOCore extends JavaPlugin { if (getConfig().getBoolean("vanilla-exp-redirection.enabled")) Bukkit.getPluginManager().registerEvents(new RedirectVanillaExp(getConfig().getDouble("vanilla-exp-redirection.ratio")), this); - // Enable debug mode for extra debug tools - if (getConfig().contains("debug")) { - DebugMode.setLevel(getConfig().getInt("debug", 0)); - DebugMode.enableActionBar(); - } - - // Load quest module - try { - String questPluginName = UtilityMethods.enumName(getConfig().getString("quest-plugin")); - PartyModuleType moduleType = PartyModuleType.valueOf(questPluginName); - Validate.isTrue(moduleType.isValid(), "Plugin '" + moduleType.name() + "' is not installed"); - partyModule = moduleType.provideModule(); - } catch (RuntimeException exception) { - getLogger().log(Level.WARNING, "Could not initialize quest module: " + exception.getMessage()); - partyModule = new MMOCorePartyModule(); - } - - // Load party module try { String partyPluginName = UtilityMethods.enumName(getConfig().getString("party-plugin")); @@ -438,7 +411,6 @@ public class MMOCore extends JavaPlugin { if (getConfig().isConfigurationSection("action-bar")) actionBarManager.reload(getConfig().getConfigurationSection("action-bar")); - if (clearBefore) PlayerData.getAll().forEach(PlayerData::update); } @@ -447,18 +419,10 @@ public class MMOCore extends JavaPlugin { log(Level.INFO, message); } - public static void debug(int value, String message) { - debug(value, Level.INFO, message); - } - public static void log(Level level, String message) { plugin.getLogger().log(level, message); } - public static void debug(int value, Level level, String message) { - if (DebugMode.level > (value - 1)) plugin.getLogger().log(level, message); - } - public File getJarFile() { return getFile(); } diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index 043fe0d4..a45a4fec 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -1,10 +1,9 @@ package net.Indyuce.mmocore.api.player; -import com.google.gson.JsonObject; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.api.player.MMOPlayerData; -import io.lumine.mythic.lib.player.TemporaryPlayerData; import io.lumine.mythic.lib.player.cooldown.CooldownMap; +import io.lumine.mythic.lib.player.modifier.PlayerModifier; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.ConfigMessage; import net.Indyuce.mmocore.api.SoundEvent; @@ -20,6 +19,7 @@ import net.Indyuce.mmocore.api.player.profess.resource.PlayerResource; import net.Indyuce.mmocore.api.player.social.FriendRequest; import net.Indyuce.mmocore.api.player.stats.PlayerStats; import net.Indyuce.mmocore.api.quest.PlayerQuests; +import net.Indyuce.mmocore.api.quest.trigger.Trigger; import net.Indyuce.mmocore.api.util.Closable; import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.experience.EXPSource; @@ -30,13 +30,19 @@ import net.Indyuce.mmocore.experience.droptable.ExperienceItem; import net.Indyuce.mmocore.experience.droptable.ExperienceTable; import net.Indyuce.mmocore.guild.provided.Guild; import net.Indyuce.mmocore.loot.chest.particle.SmallParticleEffect; -import net.Indyuce.mmocore.manager.data.mysql.MySQLTableEditor; import net.Indyuce.mmocore.party.AbstractParty; import net.Indyuce.mmocore.party.provided.Party; import net.Indyuce.mmocore.player.Unlockable; import net.Indyuce.mmocore.skill.ClassSkill; import net.Indyuce.mmocore.skill.RegisteredSkill; import net.Indyuce.mmocore.skill.cast.SkillCastingHandler; +import net.Indyuce.mmocore.tree.IntegerCoordinates; +import net.Indyuce.mmocore.tree.NodeState; +import net.Indyuce.mmocore.tree.SkillTreeNode; +import net.Indyuce.mmocore.tree.skilltree.LinkedSkillTree; +import net.Indyuce.mmocore.tree.skilltree.SkillTree; +import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo; +import net.Indyuce.mmocore.tree.skilltree.display.Icon; import net.Indyuce.mmocore.waypoint.Waypoint; import net.Indyuce.mmocore.waypoint.WaypointOption; import net.md_5.bungee.api.ChatMessageType; @@ -76,6 +82,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc private double mana, stamina, stellium; private Guild guild; private SkillCastingHandler skillCasting; + private SkillTree cachedSkillTree; private final PlayerQuests questData; private final PlayerStats playerStats; @@ -88,6 +95,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc private final Map classSlots = new HashMap<>(); private final Map lastActivity = new HashMap<>(); + private final Map nodeLevels = new HashMap<>(); + private final Map nodeStates = new HashMap<>(); + private final Map skillTreePoints = new HashMap<>(); + /** * Saves all the items that have been unlocked so far by * the player. This is used for: @@ -185,8 +196,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return nodeLevels.keySet().stream().filter(node -> node.getTree().equals(skillTree)).mapToInt(nodeLevels::get).sum(); } - - public HashMap getSkillTreePoints() { + public Map getSkillTreePoints() { return skillTreePoints; } @@ -194,12 +204,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return skillTreePoints.containsKey(treeId); } - - - public Set> getNodeLevelsEntrySet() { - HashMap nodeLevelsString=new HashMap<>(); - for(SkillTreeNode node:nodeLevels.keySet()) { - nodeLevelsString.put(node.getFullId(),nodeLevels.get(node)); + public Set> getNodeLevelsEntrySet() { + HashMap nodeLevelsString = new HashMap<>(); + for (SkillTreeNode node : nodeLevels.keySet()) { + nodeLevelsString.put(node.getFullId(), nodeLevels.get(node)); } return nodeLevelsString.entrySet(); } @@ -242,15 +250,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc //Applies player modifiers List modifiers = node.getModifiers(getNodeLevel(node)); - - if (modifiers != null) { - Bukkit.broadcastMessage("Modifier: "+modifiers.size()); + if (modifiers != null) for (PlayerModifier modifier : modifiers) { modifier.register(getMMOPlayerData()); } - } - - Bukkit.broadcastMessage(playerStats.getStat("HEALTH_REGENERATION")+""); if (nodeStates.get(node) == NodeState.UNLOCKABLE) setNodeState(node, NodeState.UNLOCKED); @@ -263,7 +266,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc nodeStates.remove(node1); } node.getTree().setupNodeState(this); - } /** @@ -277,7 +279,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return skillTree.getIcon(displayInfo); } - public Icon getIcon(SkillTree skillTree, IntegerCoordinates coordinates) { if (skillTree.isNode(coordinates)) { @@ -293,7 +294,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return null; } - public int getSkillTreePoint(String treeId) { return skillTreePoints.get(treeId); } @@ -315,14 +315,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc } public int getNodeLevel(SkillTreeNode node) { - - return nodeLevels.get(node); } - public void setNodeLevel(SkillTreeNode node, int nodeLevel) { - nodeLevels.put(node, nodeLevel); } @@ -392,10 +388,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc this.cachedSkillTree = cachedSkillTree; } - public SkillTree getCachedSkillTree() { - + @NotNull + public SkillTree getOpenedSkillTree() { if (cachedSkillTree == null) - return MMOCore.plugin.skillTreeManager.getAll().stream().collect(Collectors.toList()).get(0); + return MMOCore.plugin.skillTreeManager.getAll().stream().findFirst().get(); return cachedSkillTree; } @@ -420,6 +416,18 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return skillPoints; } + public int getAttributePoints() { + return attributePoints; + } + + public int getAttributeReallocationPoints() { + return attributeReallocationPoints; + } + + public int getSkillTreeReallocationPoints() { + return skillTreeReallocationPoints; + } + @Override public int getClaims(ExperienceObject object, ExperienceTable table, ExperienceItem item) { String key = object.getKey() + "." + table.getId() + "." + item.getId(); @@ -447,14 +455,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc // return skillReallocationPoints; // } - public int getAttributePoints() { - return attributePoints; - } - - public int getAttributeReallocationPoints() { - return attributeReallocationPoints; - } - public boolean isOnline() { return mmoData.isOnline(); } @@ -539,6 +539,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc classPoints = Math.max(0, value); } + public void setSkillTreeReallocationPoints(int value) { + skillTreeReallocationPoints = Math.max(0, value); + } + public boolean hasSavedClass(PlayerClass profess) { return classSlots.containsKey(profess.getId()); } @@ -964,6 +968,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc skills.remove(skill); } + @Deprecated public boolean hasSkillUnlocked(RegisteredSkill skill) { return getProfess().hasSkill(skill.getHandler().getId()) && hasSkillUnlocked(getProfess().getSkill(skill.getHandler().getId())); } @@ -1006,6 +1011,10 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc setAttributeReallocationPoints(attributeReallocationPoints + value); } + public void giveSkillTreeReallocationPoints(int value) { + setSkillTreeReallocationPoints(skillTreeReallocationPoints + value); + } + public CooldownMap getCooldownMap() { return mmoData.getCooldownMap(); } @@ -1056,8 +1065,9 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc * checks if they could potentially upgrade to one of these * * @return If the player can change its current class to - * a subclass + * a subclass */ + @Deprecated public boolean canChooseSubclass() { for (Subclass subclass : getProfess().getSubclasses()) if (getLevel() >= subclass.getLevel()) diff --git a/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java b/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java index 775539c9..6ef895ba 100644 --- a/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java +++ b/src/main/java/net/Indyuce/mmocore/api/util/MMOCoreUtils.java @@ -53,10 +53,6 @@ public class MMOCoreUtils { return builder.toString(); } - public static String toEnumName(String str) { - return str.replace("-", "_").toUpperCase(); - } - /** * * @param value an integer you want to convert @@ -127,11 +123,6 @@ public class MMOCoreUtils { return t; } - public static String toEnumName(String str) { - return str.replace("-","_").replace(" ","_").toUpperCase(); - } - - public static String toBase64(ItemStack[] items) { try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); diff --git a/src/main/java/net/Indyuce/mmocore/command/CommandVerbose.java b/src/main/java/net/Indyuce/mmocore/command/CommandVerbose.java index e7c6df1d..ba69e7db 100644 --- a/src/main/java/net/Indyuce/mmocore/command/CommandVerbose.java +++ b/src/main/java/net/Indyuce/mmocore/command/CommandVerbose.java @@ -1,7 +1,7 @@ package net.Indyuce.mmocore.command; +import io.lumine.mythic.lib.UtilityMethods; import net.Indyuce.mmocore.MMOCore; -import net.Indyuce.mmocore.api.util.MMOCoreUtils; import org.bukkit.command.CommandSender; import org.bukkit.command.ConsoleCommandSender; import org.bukkit.configuration.ConfigurationSection; @@ -19,7 +19,7 @@ public class CommandVerbose { for (CommandType type : CommandType.values()) try { - values.put(type, VerboseValue.valueOf(config.getString(MMOCoreUtils.toEnumName(type.name()), "TRUE").toUpperCase())); + values.put(type, VerboseValue.valueOf(config.getString(UtilityMethods.enumName(type.name()), "TRUE").toUpperCase())); } catch (IllegalArgumentException exception) { values.put(type, VerboseValue.TRUE); MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load command verbose action for " + type.name()); diff --git a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java index 1df83887..b666b025 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java +++ b/src/main/java/net/Indyuce/mmocore/gui/SkillTreeViewer.java @@ -6,6 +6,7 @@ import net.Indyuce.mmocore.api.SoundEvent; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.gui.api.EditableInventory; import net.Indyuce.mmocore.gui.api.GeneratedInventory; +import net.Indyuce.mmocore.gui.api.InventoryClickContext; import net.Indyuce.mmocore.gui.api.item.InventoryItem; import net.Indyuce.mmocore.gui.api.item.Placeholders; import net.Indyuce.mmocore.gui.api.item.SimplePlaceholderItem; @@ -14,11 +15,10 @@ import net.Indyuce.mmocore.tree.NodeState; import net.Indyuce.mmocore.tree.skilltree.SkillTree; import net.Indyuce.mmocore.tree.SkillTreeNode; import net.Indyuce.mmocore.tree.skilltree.display.Icon; -import org.bukkit.Bukkit; -import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.configuration.ConfigurationSection; +import org.bukkit.event.inventory.ClickType; import org.bukkit.event.inventory.InventoryAction; import org.bukkit.event.inventory.InventoryClickEvent; import org.bukkit.inventory.ItemFlag; @@ -28,7 +28,6 @@ import org.bukkit.persistence.PersistentDataContainer; import org.bukkit.persistence.PersistentDataType; import java.util.ArrayList; -import java.util.LinkedList; import java.util.List; public class SkillTreeViewer extends EditableInventory { @@ -214,10 +213,10 @@ public class SkillTreeViewer extends EditableInventory { private final int maxTreeListPage; private final SkillTree skillTree; - public SkillTreeInventory(PlayerData playerData, EditableInventory editable) { super(playerData, editable); - skillTree = playerData.getCachedSkillTree(); + + skillTree = playerData.getOpenedSkillTree(); maxTreeListPage = (MMOCore.plugin.skillTreeManager.getAll().size() - 1) / editable.getByFunction("skill-tree").getSlots().size(); //We get the width and height of the GUI(corresponding to the slots given) List slots = editable.getByFunction("skill-tree-node").getSlots(); @@ -266,9 +265,7 @@ public class SkillTreeViewer extends EditableInventory { } @Override - public void whenClicked(InventoryClickEvent event, InventoryItem item) { - - + public void whenClicked(InventoryClickContext event, InventoryItem item) { if (item.getFunction().equals("next-tree-list-page")) { treeListPage++; open(); @@ -313,9 +310,8 @@ public class SkillTreeViewer extends EditableInventory { } } - if (item.getFunction().equals("skill-tree")) { - String id = event.getCurrentItem().getItemMeta().getPersistentDataContainer().get( + String id = event.getItemStack().getItemMeta().getPersistentDataContainer().get( new NamespacedKey(MMOCore.plugin, "skill-tree-id"), PersistentDataType.STRING); playerData.setCachedSkillTree(MMOCore.plugin.skillTreeManager.get(id)); MMOCore.plugin.soundManager.getSound(SoundEvent.CHANGE_SKILL_TREE).playTo(player); @@ -327,7 +323,7 @@ public class SkillTreeViewer extends EditableInventory { if (item.getFunction().equals("skill-tree-node")) { - if (event.getAction().equals(InventoryAction.PICKUP_HALF)) { + if (event.getClickType() == ClickType.RIGHT) { int offset = event.getSlot(); int xOffset=offset%9-middleSlot%9; int yOffset=offset/9-middleSlot/9; @@ -338,8 +334,8 @@ public class SkillTreeViewer extends EditableInventory { return; } - else if (event.getAction() == InventoryAction.PICKUP_ALL) { - PersistentDataContainer container = event.getCurrentItem().getItemMeta().getPersistentDataContainer(); + else if (event.getClickType() == ClickType.LEFT) { + PersistentDataContainer container = event.getItemStack().getItemMeta().getPersistentDataContainer(); int x = container.get(new NamespacedKey(MMOCore.plugin, "coordinates.x"), PersistentDataType.INTEGER); int y = container.get(new NamespacedKey(MMOCore.plugin, "coordinates.y"), PersistentDataType.INTEGER); SkillTreeNode node = skillTree.getNode(new IntegerCoordinates(x, y)); diff --git a/src/main/java/net/Indyuce/mmocore/gui/api/EditableInventory.java b/src/main/java/net/Indyuce/mmocore/gui/api/EditableInventory.java index 45a59c9a..0d6777a2 100644 --- a/src/main/java/net/Indyuce/mmocore/gui/api/EditableInventory.java +++ b/src/main/java/net/Indyuce/mmocore/gui/api/EditableInventory.java @@ -1,6 +1,7 @@ package net.Indyuce.mmocore.gui.api; import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.UtilityMethods; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.util.MMOCoreUtils; import net.Indyuce.mmocore.gui.api.adaptor.AdaptorType; @@ -39,7 +40,7 @@ public abstract class EditableInventory { public void reload(FileConfiguration config) { - this.adaptorType = AdaptorType.valueOf(MMOCoreUtils.toEnumName(config.getString("adaptor-type", "classic-adaptor"))); + this.adaptorType = AdaptorType.valueOf(UtilityMethods.enumName(config.getString("adaptor-type", "classic-adaptor"))); Validate.notNull(adaptorType, config.getString("adaptor-type") + " does not correspond to an adaptor-type.");//TODO this.radius = config.getDouble("radius", 2); diff --git a/src/main/java/net/Indyuce/mmocore/manager/registry/MMOCoreRegister.java b/src/main/java/net/Indyuce/mmocore/manager/registry/MMOCoreRegister.java index f4c59ca1..68b8bae8 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/registry/MMOCoreRegister.java +++ b/src/main/java/net/Indyuce/mmocore/manager/registry/MMOCoreRegister.java @@ -8,7 +8,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Objects; -public abstract class MMOCoreRegister implements MMOCoreManager { +public abstract class MMOCoreRegister implements MMOCoreManager { protected final Map registered = new HashMap<>(); public void register(T t) { diff --git a/src/main/java/net/Indyuce/mmocore/manager/registry/RegisterObject.java b/src/main/java/net/Indyuce/mmocore/manager/registry/RegisteredObject.java similarity index 79% rename from src/main/java/net/Indyuce/mmocore/manager/registry/RegisterObject.java rename to src/main/java/net/Indyuce/mmocore/manager/registry/RegisteredObject.java index 57b5b7b7..83505be9 100644 --- a/src/main/java/net/Indyuce/mmocore/manager/registry/RegisterObject.java +++ b/src/main/java/net/Indyuce/mmocore/manager/registry/RegisteredObject.java @@ -1,6 +1,6 @@ package net.Indyuce.mmocore.manager.registry; -public interface RegisterObject { +public interface RegisteredObject { /** * Identifier used to register an object diff --git a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/ExperienceMechanic.java b/src/main/java/net/Indyuce/mmocore/script/mechanic/ExperienceMechanic.java similarity index 97% rename from src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/ExperienceMechanic.java rename to src/main/java/net/Indyuce/mmocore/script/mechanic/ExperienceMechanic.java index 4e19420e..6382fac3 100644 --- a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/ExperienceMechanic.java +++ b/src/main/java/net/Indyuce/mmocore/script/mechanic/ExperienceMechanic.java @@ -1,4 +1,4 @@ -package net.Indyuce.mmocore.skill.custom.mechanic; +package net.Indyuce.mmocore.script.mechanic; import io.lumine.mythic.lib.script.mechanic.type.TargetMechanic; import io.lumine.mythic.lib.skill.SkillMetadata; diff --git a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/ManaMechanic.java b/src/main/java/net/Indyuce/mmocore/script/mechanic/ManaMechanic.java similarity index 97% rename from src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/ManaMechanic.java rename to src/main/java/net/Indyuce/mmocore/script/mechanic/ManaMechanic.java index 7a01335a..962a1c43 100644 --- a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/ManaMechanic.java +++ b/src/main/java/net/Indyuce/mmocore/script/mechanic/ManaMechanic.java @@ -1,4 +1,4 @@ -package net.Indyuce.mmocore.skill.custom.mechanic; +package net.Indyuce.mmocore.script.mechanic; import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.skill.SkillMetadata; diff --git a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/Operation.java b/src/main/java/net/Indyuce/mmocore/script/mechanic/Operation.java similarity index 51% rename from src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/Operation.java rename to src/main/java/net/Indyuce/mmocore/script/mechanic/Operation.java index ea05f52c..0d47e8d5 100644 --- a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/Operation.java +++ b/src/main/java/net/Indyuce/mmocore/script/mechanic/Operation.java @@ -1,4 +1,4 @@ -package net.Indyuce.mmocore.skill.custom.mechanic; +package net.Indyuce.mmocore.script.mechanic; public enum Operation { GIVE, diff --git a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/StaminaMechanic.java b/src/main/java/net/Indyuce/mmocore/script/mechanic/StaminaMechanic.java similarity index 97% rename from src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/StaminaMechanic.java rename to src/main/java/net/Indyuce/mmocore/script/mechanic/StaminaMechanic.java index 52a9b865..73be61b9 100644 --- a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/StaminaMechanic.java +++ b/src/main/java/net/Indyuce/mmocore/script/mechanic/StaminaMechanic.java @@ -1,4 +1,4 @@ -package net.Indyuce.mmocore.skill.custom.mechanic; +package net.Indyuce.mmocore.script.mechanic; import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.skill.SkillMetadata; diff --git a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/StelliumMechanic.java b/src/main/java/net/Indyuce/mmocore/script/mechanic/StelliumMechanic.java similarity index 97% rename from src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/StelliumMechanic.java rename to src/main/java/net/Indyuce/mmocore/script/mechanic/StelliumMechanic.java index c9fa301f..3e94f40c 100644 --- a/src/main/java/net/Indyuce/mmocore/skill/custom/mechanic/StelliumMechanic.java +++ b/src/main/java/net/Indyuce/mmocore/script/mechanic/StelliumMechanic.java @@ -1,4 +1,4 @@ -package net.Indyuce.mmocore.skill.custom.mechanic; +package net.Indyuce.mmocore.script.mechanic; import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.script.mechanic.type.TargetMechanic; diff --git a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java index c1484df4..fe0bf78f 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java +++ b/src/main/java/net/Indyuce/mmocore/tree/SkillTreeNode.java @@ -2,6 +2,7 @@ package net.Indyuce.mmocore.tree; import com.gmail.nossr50.mcmmo.acf.annotation.HelpSearchTags; import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.api.MMOLineConfig; import io.lumine.mythic.lib.player.modifier.PlayerModifier; import io.lumine.mythic.lib.util.configobject.ConfigObject; @@ -27,6 +28,7 @@ public class SkillTreeNode implements Unlockable { private final String name, id; private IntegerCoordinates coordinates; private boolean isRoot; + /** * The lore corresponding to each level */ @@ -35,64 +37,58 @@ public class SkillTreeNode implements Unlockable { //TODO modifiers depending on level with drop tables private final HashMap> modifiers = new HashMap<>(); private final HashMap> triggers = new HashMap<>(); + //The max level the skill tree node can have and the max amount of children it can have. private final int maxLevel, maxChildren, size; private final ArrayList children = new ArrayList<>(); + /** - * Associates the required level to each parent - * You only need to have the requirement for one of your softParents but you need to fulfill the requirements - * of all of your strong parents. + * Associates the required level to each parent. + *

+ * You only need to have the requirement for one of your softParents + * but you need to fulfill the requirements of all of your strong parents. **/ - - private final HashMap softParents = new HashMap<>(); private final HashMap strongParents = new HashMap<>(); - public SkillTreeNode(SkillTree tree, ConfigurationSection config) { - - Validate.notNull(config, "Config cannot be null"); this.id = config.getName(); this.tree = tree; name = Objects.requireNonNull(config.getString("name"), "Could not find node name"); size = Objects.requireNonNull(config.getInt("size")); - isRoot = config.contains("is-root") ? config.getBoolean("is-root") ? true : false : false; + isRoot = config.getBoolean("is-root", false); //We initialize the value of the lore for each skill tree node. for (String state : Objects.requireNonNull(config.getConfigurationSection("lores")).getKeys(false)) { - NodeState nodeState = NodeState.valueOf(MMOCoreUtils.toEnumName(state)); + NodeState nodeState = NodeState.valueOf(UtilityMethods.enumName(state)); if (nodeState == NodeState.UNLOCKED) { //TODO: Message could'nt load ... instead of exce/*99+*-*99**9+-ption ConfigurationSection section = config.getConfigurationSection("lores." + state); - for (String level : section.getKeys(false)) { + for (String level : section.getKeys(false)) lores.put(new NodeContext(nodeState, Integer.parseInt(level)), section.getStringList(level)); - } + } else { lores.put(new NodeContext(nodeState, 0), config.getStringList("lores." + state)); } } + //We load the triggers if (config.contains("triggers")) { try { ConfigurationSection section = config.getConfigurationSection("triggers"); - for (String level : section.getKeys(false)) { - int value = Integer.parseInt(level); - for (String str : section.getStringList(level)) { - List triggerList = MMOCore.plugin.loadManager.loadTrigger(new MMOLineConfig(str)); - for (Trigger trigger : triggerList) { - if (!triggers.containsKey(value)) { - triggers.put(value, new ArrayList<>()); - } - triggers.get(value).add(trigger); - } - - } + for (String levelFormat : section.getKeys(false)) { + final int level = Integer.parseInt(levelFormat); + final List triggers = new ArrayList<>(); + for (String str : section.getStringList(levelFormat)) + triggers.add(MMOCore.plugin.loadManager.loadTrigger(new MMOLineConfig(str))); + this.triggers.put(level, triggers); } } catch (NumberFormatException e) { - MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't load triggers for the skill node " + tree.getId() + "." + id + " :Problem with the Number Format."); + MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't load triggers for skill node " + tree.getId() + "." + id + " : Problem with the Number Format."); } } + //We load the player Modifiers if (config.contains("modifiers")) { try { @@ -216,18 +212,15 @@ public class SkillTreeNode implements Unlockable { return modifiers.get(level); } - public List getTriggers(int level) { return triggers.get(level); } - @Override public String getUnlockNamespacedKey() { return "skill_tree:" + tree.getId() + "_" + coordinates.getX() + "_" + coordinates.getY(); } - @Override public boolean equals(Object o) { if (this == o) return true; @@ -308,7 +301,6 @@ public class SkillTreeNode implements Unlockable { } - /** * @param namespacedKey Something like "skill_tree:tree_name_1_5" * @return The corresponding skill tree node @@ -369,6 +361,4 @@ public class SkillTreeNode implements Unlockable { return Objects.hash(nodeState, nodeLevel); } } - - } diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java index 823b2cc1..6039861d 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/SkillTree.java @@ -1,11 +1,12 @@ package net.Indyuce.mmocore.tree.skilltree; import io.lumine.mythic.lib.MythicLib; +import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.api.util.PostLoadObject; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.api.util.MMOCoreUtils; -import net.Indyuce.mmocore.manager.registry.RegisterObject; +import net.Indyuce.mmocore.manager.registry.RegisteredObject; import net.Indyuce.mmocore.tree.NodeState; import net.Indyuce.mmocore.tree.skilltree.display.DisplayInfo; import net.Indyuce.mmocore.tree.skilltree.display.Icon; @@ -13,7 +14,6 @@ import net.Indyuce.mmocore.tree.IntegerCoordinates; import net.Indyuce.mmocore.tree.SkillTreeNode; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; -import org.bukkit.ChatColor; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; import org.jetbrains.annotations.NotNull; @@ -38,7 +38,7 @@ import java.util.logging.Level; * @author Ka0rX * @see {@link SkillTreeNode} */ -public abstract class SkillTree extends PostLoadObject implements RegisterObject { +public abstract class SkillTree extends PostLoadObject implements RegisteredObject { private final String id, name; private final List lore = new ArrayList<>(); private final Material item; @@ -55,15 +55,14 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject protected final List roots = new ArrayList<>(); public SkillTree(ConfigurationSection config) { - super(config); + this.id = Objects.requireNonNull(config.getString("id"), "Could not find skill tree id"); this.name = MythicLib.plugin.parseColors(Objects.requireNonNull(config.getString("name"), "Could not find skill tree name")); Objects.requireNonNull(config.getStringList("lore"), "Could not find skill tree lore").forEach(str -> lore.add(MythicLib.plugin.parseColors(str))); - this.item = Material.valueOf(MMOCoreUtils.toEnumName(Objects.requireNonNull(config.getString("item")))); + this.item = Material.valueOf(UtilityMethods.enumName(Objects.requireNonNull(config.getString("item")))); Validate.isTrue(config.isConfigurationSection("nodes"), "Could not find any nodes in the tree"); - for (String key : config.getConfigurationSection("nodes").getKeys(false)) { try { @@ -71,7 +70,7 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject nodes.put(node.getId(), node); } catch (Exception e) { - MMOCore.plugin.getLogger().log(Level.SEVERE,"Couldn't load skill tree node "+id+"."+key+": "+e.getMessage()); + MMOCore.plugin.getLogger().log(Level.SEVERE, "Couldn't load skill tree node " + id + "." + key + ": " + e.getMessage()); } } try { @@ -97,7 +96,7 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject continue; } for (String size : config.getConfigurationSection("icons." + key).getKeys(false)) { - DisplayInfo displayInfo = new DisplayInfo(NodeState.valueOf(MMOCoreUtils.toEnumName(key)), Integer.parseInt(size)); + DisplayInfo displayInfo = new DisplayInfo(NodeState.valueOf(UtilityMethods.enumName(key)), Integer.parseInt(size)); Icon icon = new Icon(config.getConfigurationSection("icons." + key + "." + size)); icons.put(displayInfo, icon); @@ -251,10 +250,10 @@ public abstract class SkillTree extends PostLoadObject implements RegisterObject } - @Nullable /** * Returns null if it is not a node and returns the node type if it a node */ + @Nullable public boolean isNode(IntegerCoordinates coordinates) { for (SkillTreeNode node : nodes.values()) { if (node.getCoordinates().equals(coordinates)) diff --git a/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/Icon.java b/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/Icon.java index 63836f2b..08296a37 100644 --- a/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/Icon.java +++ b/src/main/java/net/Indyuce/mmocore/tree/skilltree/display/Icon.java @@ -1,5 +1,6 @@ package net.Indyuce.mmocore.tree.skilltree.display; +import io.lumine.mythic.lib.UtilityMethods; import net.Indyuce.mmocore.api.util.MMOCoreUtils; import org.bukkit.Material; import org.bukkit.configuration.ConfigurationSection; @@ -21,7 +22,7 @@ public class Icon { return customModelData; } public Icon(ConfigurationSection config) { - this(Material.valueOf(Objects.requireNonNull(MMOCoreUtils.toEnumName( + this(Material.valueOf(Objects.requireNonNull(UtilityMethods.enumName( config.getString("item")))),config.contains("model-data")?config.getInt("model-data"):0); } diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 248d5a0e..7ba96ca0 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -231,11 +231,6 @@ resource-bar-colors: stamina-half: 'DARK_GREEN' stamina-empty: 'WHITE' -# When set to true, attributes are saved and -# reset when a player changes their class. -# Not implemented yet. -# attributes-as-class-info: true - # Whether or not the admin commands should display # the result of the command when ran. # For Example: "Players Level is now 10." From 6ef15ffcea0b97d69bacd2f32aae407b22e1d503 Mon Sep 17 00:00:00 2001 From: Jules Date: Sun, 7 Aug 2022 22:58:13 +0200 Subject: [PATCH 10/11] Implemented class scripts --- .../api/player/profess/PlayerClass.java | 58 +++++++--- .../mmocore/api/player/stats/PlayerStats.java | 14 ++- .../mmocore/listener/ClassScriptListener.java | 50 +++++++++ .../mmocore/listener/ClassTriggers.java | 106 ------------------ .../player/playerclass/ClassTrigger.java | 58 ---------- .../player/playerclass/ClassTriggerType.java | 29 ----- .../script/trigger/MMOCoreTriggerType.java | 8 ++ 7 files changed, 110 insertions(+), 213 deletions(-) create mode 100644 src/main/java/net/Indyuce/mmocore/listener/ClassScriptListener.java delete mode 100644 src/main/java/net/Indyuce/mmocore/listener/ClassTriggers.java delete mode 100644 src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTrigger.java delete mode 100644 src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTriggerType.java create mode 100644 src/main/java/net/Indyuce/mmocore/script/trigger/MMOCoreTriggerType.java diff --git a/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java b/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java index 69d77053..ba93ec80 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/profess/PlayerClass.java @@ -5,7 +5,15 @@ import com.mojang.authlib.properties.Property; import io.lumine.mythic.lib.MythicLib; import io.lumine.mythic.lib.UtilityMethods; import io.lumine.mythic.lib.api.MMOLineConfig; +import io.lumine.mythic.lib.api.player.EquipmentSlot; import io.lumine.mythic.lib.api.util.PostLoadObject; +import io.lumine.mythic.lib.player.modifier.ModifierSource; +import io.lumine.mythic.lib.player.skill.PassiveSkill; +import io.lumine.mythic.lib.script.Script; +import io.lumine.mythic.lib.skill.SimpleSkill; +import io.lumine.mythic.lib.skill.Skill; +import io.lumine.mythic.lib.skill.handler.MythicLibSkillHandler; +import io.lumine.mythic.lib.skill.trigger.TriggerType; import io.lumine.mythic.lib.version.VersionMaterial; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.player.PlayerData; @@ -20,8 +28,6 @@ import net.Indyuce.mmocore.experience.ExpCurve; import net.Indyuce.mmocore.experience.ExperienceObject; import net.Indyuce.mmocore.experience.droptable.ExperienceTable; import net.Indyuce.mmocore.loot.chest.particle.CastingParticle; -import net.Indyuce.mmocore.player.playerclass.ClassTrigger; -import net.Indyuce.mmocore.player.playerclass.ClassTriggerType; import net.Indyuce.mmocore.player.stats.StatInfo; import net.Indyuce.mmocore.skill.ClassSkill; import net.Indyuce.mmocore.skill.RegisteredSkill; @@ -45,25 +51,29 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject { private final List description = new ArrayList<>(), attrDescription = new ArrayList<>(); private final ItemStack icon; private final Map options = new HashMap<>(); - private final ManaDisplayOptions manaDisplay; private final int maxLevel, displayOrder; + + @NotNull + private final ManaDisplayOptions manaDisplay; + + @NotNull private final ExpCurve expCurve; + + @Nullable private final ExperienceTable expTable; + @NotNull + private final CastingParticle castParticle; + private final Map stats = new HashMap<>(); private final Map skills = new LinkedHashMap<>(); private final List subclasses = new ArrayList<>(); - - @Deprecated - private final Map classTriggers = new HashMap<>(); - + private final List classScripts = new LinkedList<>(); private final Map resourceHandlers = new HashMap<>(); @Deprecated private final Map eventTriggers = new HashMap<>(); - private final CastingParticle castParticle; - public PlayerClass(String id, FileConfiguration config) { super(config); @@ -82,7 +92,7 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject { profileField.set(meta, gp); icon.setItemMeta(meta); } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException - | SecurityException exception) { + | SecurityException exception) { throw new IllegalArgumentException("Could not apply playerhead texture: " + exception.getMessage()); } @@ -110,15 +120,26 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject { } this.expTable = expTable; + if (config.contains("scripts")) + for (String key : config.getConfigurationSection("scripts").getKeys(false)) + try { + final TriggerType trigger = TriggerType.valueOf(UtilityMethods.enumName(key)); + final Script script = MythicLib.plugin.getSkills().loadScript(config.getConfigurationSection("scripts." + key)); + final Skill castSkill = new SimpleSkill(trigger, new MythicLibSkillHandler(script)); + final PassiveSkill skill = new PassiveSkill("MMOCoreClassScript", castSkill, EquipmentSlot.OTHER, ModifierSource.OTHER); + classScripts.add(skill); + } catch (IllegalArgumentException exception) { + MMOCore.plugin.getLogger().log(Level.WARNING, "Could not load script '" + key + "' from class '" + id + "': " + exception.getMessage()); + } + if (config.contains("triggers")) - for (String key : config.getConfigurationSection("triggers").getKeys(false)) { + for (String key : config.getConfigurationSection("triggers").getKeys(false)) try { String format = key.toLowerCase().replace("_", "-").replace(" ", "-"); eventTriggers.put(format, new EventTrigger(format, config.getStringList("triggers." + key))); } catch (IllegalArgumentException exception) { MMOCore.log(Level.WARNING, "Could not load trigger '" + key + "' from class '" + id + "':" + exception.getMessage()); } - } if (config.contains("attributes")) for (String key : config.getConfigurationSection("attributes").getKeys(false)) @@ -308,10 +329,15 @@ public class PlayerClass extends PostLoadObject implements ExperienceObject { return equals(playerData.getProfess()); } - @Nullable - @Deprecated - public ClassTrigger getClassTrigger(ClassTriggerType type) { - return classTriggers.get(type); + /** + * @return A list of passive skills which correspond to class + * scripts wrapped in a format recognized by MythicLib. + * Class scripts are handled just like + * passive skills + */ + @NotNull + public List getScripts() { + return classScripts; } @Deprecated diff --git a/src/main/java/net/Indyuce/mmocore/api/player/stats/PlayerStats.java b/src/main/java/net/Indyuce/mmocore/api/player/stats/PlayerStats.java index 7e49e87b..479db212 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/stats/PlayerStats.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/stats/PlayerStats.java @@ -6,13 +6,13 @@ import io.lumine.mythic.lib.api.stat.StatMap; import io.lumine.mythic.lib.api.stat.modifier.StatModifier; import io.lumine.mythic.lib.player.modifier.ModifierSource; import io.lumine.mythic.lib.player.modifier.ModifierType; +import io.lumine.mythic.lib.player.skill.PassiveSkill; +import io.lumine.mythic.lib.player.skill.PassiveSkillMap; import net.Indyuce.mmocore.MMOCore; import net.Indyuce.mmocore.api.player.PlayerData; import net.Indyuce.mmocore.experience.Profession; import net.Indyuce.mmocore.player.stats.StatInfo; import net.Indyuce.mmocore.skill.ClassSkill; -import org.apache.commons.lang.Validate; -import org.jetbrains.annotations.NotNull; public class PlayerStats { private final PlayerData data; @@ -96,9 +96,15 @@ public class PlayerStats { * * This updates the player's PASSIVE skills */ - data.getMMOPlayerData().getPassiveSkillMap().removeModifiers("MMOCorePassiveSkill"); + final PassiveSkillMap skillMap = data.getMMOPlayerData().getPassiveSkillMap(); + skillMap.removeModifiers("MMOCorePassiveSkill"); for (ClassSkill skill : data.getProfess().getSkills()) if (skill.getSkill().getTrigger().isPassive()) - data.getMMOPlayerData().getPassiveSkillMap().addModifier(skill.toPassive(data)); + skillMap.addModifier(skill.toPassive(data)); + + // This updates the player's class SCRIPTS + skillMap.removeModifiers("MMOCoreClassScript"); + for (PassiveSkill script : data.getProfess().getScripts()) + skillMap.addModifier(script); } } diff --git a/src/main/java/net/Indyuce/mmocore/listener/ClassScriptListener.java b/src/main/java/net/Indyuce/mmocore/listener/ClassScriptListener.java new file mode 100644 index 00000000..66d70333 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/listener/ClassScriptListener.java @@ -0,0 +1,50 @@ +package net.Indyuce.mmocore.listener; + +import io.lumine.mythic.lib.api.player.MMOPlayerData; +import net.Indyuce.mmocore.MMOCore; +import net.Indyuce.mmocore.api.event.PlayerChangeClassEvent; +import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent; +import net.Indyuce.mmocore.script.trigger.MMOCoreTriggerType; +import org.bukkit.Bukkit; +import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; +import org.bukkit.event.Listener; + +/** + * This class calls trigger types registered by MMOCore + * which are specific to player classes. + * + * @see {@link MMOCoreTriggerType} + */ +public class ClassScriptListener implements Listener { + + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) + public void onClassChange(PlayerChangeClassEvent event) { + + // With delay + Bukkit.getScheduler().runTask(MMOCore.plugin, () -> { + final MMOPlayerData caster = event.getData().getMMOPlayerData(); + caster.triggerSkills(MMOCoreTriggerType.CLASS_CHOSEN, null); + }); + } + + @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) + public void onLevelUp(PlayerLevelUpEvent event) { + + // With delay + Bukkit.getScheduler().runTask(MMOCore.plugin, () -> { + final MMOPlayerData caster = event.getData().getMMOPlayerData(); + caster.triggerSkills(MMOCoreTriggerType.LEVEL_UP, null); + }); + } + + /* @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) + public void onBlockBreak(BlockBreakEvent event) { + performScripts(event.getPlayer(), MMOCoreTriggerType.BREAK_BLOCK); + } + + @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) + public void onBlockPlace(BlockBreakEvent event) { + performScripts(event.getPlayer(), MMOCoreTriggerType.PLACE_BLOCK); + }*/ +} diff --git a/src/main/java/net/Indyuce/mmocore/listener/ClassTriggers.java b/src/main/java/net/Indyuce/mmocore/listener/ClassTriggers.java deleted file mode 100644 index 465b66cb..00000000 --- a/src/main/java/net/Indyuce/mmocore/listener/ClassTriggers.java +++ /dev/null @@ -1,106 +0,0 @@ -package net.Indyuce.mmocore.listener; - -import io.lumine.mythic.lib.api.event.PlayerAttackEvent; -import io.lumine.mythic.lib.api.player.EquipmentSlot; -import io.lumine.mythic.lib.damage.DamageType; -import io.lumine.mythic.lib.skill.result.SkillResult; -import io.lumine.mythic.lib.skill.trigger.TriggerMetadata; -import net.Indyuce.mmocore.MMOCore; -import net.Indyuce.mmocore.api.event.PlayerChangeClassEvent; -import net.Indyuce.mmocore.api.event.PlayerLevelUpEvent; -import net.Indyuce.mmocore.api.player.PlayerData; -import net.Indyuce.mmocore.player.playerclass.ClassTrigger; -import net.Indyuce.mmocore.player.playerclass.ClassTriggerType; -import org.bukkit.Bukkit; -import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; -import org.bukkit.event.EventPriority; -import org.bukkit.event.Listener; -import org.bukkit.event.block.BlockBreakEvent; - -import javax.annotation.Nullable; -import javax.inject.Provider; -import java.util.HashMap; -import java.util.Map; - -/** - * This class still uses quest triggers because this was implemented - * in 1.9 and 1.9 is big enough as an update. - *

- * Future implementation will utilize skill mechanics. MMOCore 1.10 - * will merge the quest triggers with the ML skill mechanics. - * - * @author jules - * @see {@link ClassTrigger} - */ -@Deprecated -public class ClassTriggers implements Listener { - - @Deprecated - private static final Map damageTriggers = new HashMap<>(); - - static { - damageTriggers.put(DamageType.MAGIC, ClassTriggerType.MAGIC_DAMAGE); - damageTriggers.put(DamageType.PHYSICAL, ClassTriggerType.PHYSICAL_DAMAGE); - damageTriggers.put(DamageType.PROJECTILE, ClassTriggerType.PROJECTILE_DAMAGE); - damageTriggers.put(DamageType.WEAPON, ClassTriggerType.WEAPON_DAMAGE); - damageTriggers.put(DamageType.SKILL, ClassTriggerType.SKILL_DAMAGE); - damageTriggers.put(DamageType.UNARMED, ClassTriggerType.SKILL_DAMAGE); - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) - public void onAttack(PlayerAttackEvent event) { - for (Map.Entry entry : damageTriggers.entrySet()) - if (event.getDamage().hasType(entry.getKey())) - applyTriggers(event.getPlayer(), entry.getValue(), () -> new TriggerMetadata(event.getAttack(), event.getEntity())); - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) - public void onClassChange(PlayerChangeClassEvent event) { - Bukkit.getScheduler().runTask(MMOCore.plugin, () -> applyTriggers(event.getData(), ClassTriggerType.CLASS_CHOSEN)); - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) - public void onLevelUp(PlayerLevelUpEvent event) { - applyTriggers(event.getData(), ClassTriggerType.LEVEL_UP); - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) - public void onBlockBreak(BlockBreakEvent event) { - applyTriggers(event.getPlayer(), ClassTriggerType.BREAK_BLOCK); - } - - @EventHandler(ignoreCancelled = true, priority = EventPriority.MONITOR) - public void onBlockPlace(BlockBreakEvent event) { - applyTriggers(event.getPlayer(), ClassTriggerType.PLACE_BLOCK); - } - - private SkillResult applyTriggers(Player player, ClassTriggerType type) { - return applyTriggers(PlayerData.get(player), type); - } - - private SkillResult applyTriggers(PlayerData player, ClassTriggerType type) { - return applyTriggers(player, type, () -> new TriggerMetadata(player.getMMOPlayerData().getStatMap().cache(EquipmentSlot.MAIN_HAND), null, null)); - } - - @Nullable - private SkillResult applyTriggers(Player player, ClassTriggerType type, Provider triggerMetaProvider) { - return applyTriggers(PlayerData.get(player), type, triggerMetaProvider); - } - - /** - * Apply class shortcut skills from a specific class trigger type. - * - * @param player Player triggering - * @param type Trigger type - * @param triggerMetaProvider Small optimization: if no shortcut skill is found - * with the corresponding trigger type, trigger meta - * is not calculated which saves computations - * @return Skill result or null if no shortcut skill was cast - */ - @Nullable - private SkillResult applyTriggers(PlayerData player, ClassTriggerType type, Provider triggerMetaProvider) { - ClassTrigger trigger = player.getProfess().getClassTrigger(type); - return trigger == null ? null : trigger.trigger(triggerMetaProvider.get()); - } -} diff --git a/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTrigger.java b/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTrigger.java deleted file mode 100644 index 73755651..00000000 --- a/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTrigger.java +++ /dev/null @@ -1,58 +0,0 @@ -package net.Indyuce.mmocore.player.playerclass; - -import io.lumine.mythic.lib.MythicLib; -import io.lumine.mythic.lib.UtilityMethods; -import io.lumine.mythic.lib.api.MMOLineConfig; -import io.lumine.mythic.lib.script.Script; -import io.lumine.mythic.lib.script.mechanic.Mechanic; -import io.lumine.mythic.lib.skill.SimpleSkill; -import io.lumine.mythic.lib.skill.Skill; -import io.lumine.mythic.lib.skill.handler.MythicLibSkillHandler; -import io.lumine.mythic.lib.skill.result.SkillResult; -import io.lumine.mythic.lib.skill.trigger.TriggerMetadata; -import io.lumine.mythic.lib.skill.trigger.TriggerType; -import io.lumine.mythic.lib.util.configobject.ConfigObject; -import net.Indyuce.mmocore.listener.ClassTriggers; -import org.apache.commons.lang.Validate; - -import java.util.List; - -/** - * Class triggers are shortcuts for the MythicLib custom - * passive skill creation system. - *

- * A class trigger is defined by a {@link ClassTriggerType} which - * determines when the action is performed, and a set of {@link Mechanic} - * which determines what happens when triggered. - *

- * Class triggers fully replace 'event triggers' which were an - * over simplified implementation of passive skills. - * - * @author jules - * @see {@link ClassTriggers} - */ -@Deprecated -public class ClassTrigger { - private final ClassTriggerType type; - private final Script skill = new Script("classTrigger", false); - private final Skill castableSkill = new SimpleSkill(TriggerType.CAST, new MythicLibSkillHandler(skill)); - - public ClassTrigger(String triggerTypeString, List mechanicStringList) { - Validate.notNull(mechanicStringList, "Mechanic list cannot be null"); - type = ClassTriggerType.valueOf(UtilityMethods.enumName(triggerTypeString)); - - for (String key : mechanicStringList) { - ConfigObject config = new MMOLineConfig(key); - Mechanic mechanic = MythicLib.plugin.getSkills().loadMechanic(config); - skill.getMechanics().add(mechanic); - } - } - - public ClassTriggerType getType() { - return type; - } - - public SkillResult trigger(TriggerMetadata triggerMeta) { - return castableSkill.cast(triggerMeta); - } -} diff --git a/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTriggerType.java b/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTriggerType.java deleted file mode 100644 index a2f657ec..00000000 --- a/src/main/java/net/Indyuce/mmocore/player/playerclass/ClassTriggerType.java +++ /dev/null @@ -1,29 +0,0 @@ -package net.Indyuce.mmocore.player.playerclass; - -public enum ClassTriggerType { - BREAK_BLOCK, - - PLACE_BLOCK, - - CLASS_CHOSEN, - - LEVEL_UP, - - @Deprecated - MAGIC_DAMAGE, - - @Deprecated - PHYSICAL_DAMAGE, - - @Deprecated - PROJECTILE_DAMAGE, - - @Deprecated - WEAPON_DAMAGE, - - @Deprecated - SKILL_DAMAGE, - - @Deprecated - UNARMED_DAMAGE; -} diff --git a/src/main/java/net/Indyuce/mmocore/script/trigger/MMOCoreTriggerType.java b/src/main/java/net/Indyuce/mmocore/script/trigger/MMOCoreTriggerType.java new file mode 100644 index 00000000..bf2f5c02 --- /dev/null +++ b/src/main/java/net/Indyuce/mmocore/script/trigger/MMOCoreTriggerType.java @@ -0,0 +1,8 @@ +package net.Indyuce.mmocore.script.trigger; + +import io.lumine.mythic.lib.skill.trigger.TriggerType; + +public class MMOCoreTriggerType { + public static final TriggerType LEVEL_UP = new TriggerType("LEVEL_UP"), + CLASS_CHOSEN = new TriggerType("CLASS_CHOSEN"); +} From bd5aeba93dbd7dc90099ce3ebfc5368cd5401192 Mon Sep 17 00:00:00 2001 From: Jules Date: Sun, 7 Aug 2022 22:59:16 +0200 Subject: [PATCH 11/11] Fixed class exp table application --- src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java | 4 ---- .../net/Indyuce/mmocore/experience/PlayerProfessions.java | 1 - 2 files changed, 5 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index a45a4fec..3eec7631 100644 --- a/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -773,10 +773,6 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc new SmallParticleEffect(getPlayer(), Particle.SPELL_INSTANT); } getStats().updateStats(); - - // Apply class experience table - if (getProfess().hasExperienceTable()) - getProfess().getExperienceTable().claim(this, level, getProfess()); } refreshVanillaExp(); diff --git a/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java b/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java index 2295a281..e4287279 100644 --- a/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java +++ b/src/main/java/net/Indyuce/mmocore/experience/PlayerProfessions.java @@ -213,7 +213,6 @@ public class PlayerProfessions { // Apply profession experience table if (profession.hasExperienceTable()) profession.getExperienceTable().claim(playerData, level, profession); - } if (check) {