I need help with the config files I never used the config for anything this is my first time and I dont know how to make it so the player that is using this plugin can set its own Items. Please Help! Thanks <3
Ula492 Have a read of this page on the Bukkit Wiki. If you have any trouble, feel free to ask here for help.
@dsouzamattfor this https://forums.bukkit.org/threads/adding-items-to-player-inventory-through-config-list.176416/ but it confused me and the code below. Code:java for(String str: config.getIntegerList("items")) {String[] item = str.split(":");e.getPlayer().getInventory().addItem(new ItemStack(item[0], item[1]));
Look at these video: P.S. You don't need to create a file called config.yml, to set information do getConfig().set("whatyouwant.whatyouwant", what you want to be set in that position.) Credit to PogoStick29
@macboin Still didnt help:/ im trying to set block IDs into the config so you can change them when ever u want so if u add a Diamond ID you can change it into Gold or something that u want only 4 things can be there doe
Just use this to get a list Code: getConfig().getList("NameOfTheList"); and this to set a list Code:java getConfig().set("Items", |Your List|)