Hello. I have problem with usage HashMap. I have diagnosed issues with HashMaps on plugin start and... it works but it doesn't. Methodes are properly executed, HashMap have good values for... time of executing method. Code:java for (Player player : Bukkit.getServer().getOnlinePlayers()) {Hero hero = heroes.getCharacterManager().getHero(player);HeroesSkillTree hst = new HeroesSkillTree();hst.loadPlayerConfig(player.getName());hst.recalcPlayerPoints(hero, hero.getHeroClass());} But this is not the most strange thing. I have created /st HashMap command which loadPlayerFile and recalcPlayerPoints. Only difference between onEnable method and this is that the /st HashMap works PROPER. Code:java case "hashmap": HST.loadPlayerConfig(sender.getName());HST.recalcPlayerPoints(WAddonCore.heroes.getCharacterManager().getHero((Player)sender),WAddonCore.heroes.getCharacterManager().getHero((Player)sender).getHeroClass());sender.sendMessage(HST.playerSkills.values().toString());sender.sendMessage(HST.playerSkills.toString());sender.sendMessage(HST.playerClasses.values().toString()); break; Class extending JavaPlugin: click. Class with HashMaps: click. Also, how I can copy text from one *.yml file and paste in another *.yml file?
wiedzmin137 I know the answere to your .yml problem I think. Just open the file with a program like Notepad++ , than select the text you want to copy, press ctrl+c on Windows and cmd+c on Mac. Than open your other .yml file where you want to past the text in, press crtl+v or cmd+v and your done.
Nevermind than wiedzmin137 I thought about a solution for the .yml problem, and I think I got one. Get the text that you want and make a String variable for it. Than add the String variable to the other .yml file where you want to paste it in. EDIT by Moderator: merged posts, please use the edit button instead of double posting.
But how is the method for printing new line of text into .yml File (this will do all I need)? EDIT: I have repaired problem with HashMap. Code:java HeroesSkillTree hst = new HeroesSkillTree(); This instance was awful.