Read out configs

Discussion in 'Plugin Development' started by Rysefoxx, Oct 14, 2019.

Thread Status:
Not open for further replies.
  1. Config:
    Code:
        public static File ordner = new File("plugins//HomeSystem");
        public static File file = new File("plugins//HomeSystem//Coords.yml");
        public static YamlConfiguration Koordinaten = YamlConfiguration.loadConfiguration(file);
    So I want to read out the Users home name.
    E.g down below its Home1

    What I tried:
    Code:
    String HomeName = Main.Koordinaten.getString(p.getUniqueId()+".");
    p.getUniqueId to get to his uuid, and the "." to go once down to the Home name. But its not working

    My yml config:
    Code:
    42cda9a2-2a22-4e22-9d0a-be70a9545763:
      Home1: <------ I want to store this name in a variable
        Welt: world
        X: -487.35657646935465
        Y: 75.90382173378735
        Z: 35.49300216999534
     
  2. Offline

    timtower Administrator Administrator Moderator

Thread Status:
Not open for further replies.

Share This Page