Loading data into a HashMap!

Discussion in 'Plugin Development' started by GeekyCompz, May 10, 2014.

Thread Status:
Not open for further replies.
  1. Offline


    Hello there,
    So I have a plugin so far that sets a start and a finish with coordinates and a world. As well as a KEY NAME.
    When the plugin starts, I need it to create a NEW hashmap and load in all the data from the info specified.
    For example;
        world: world
        x: 100
        y: 60
        z: 100
        yaw: 10.00100
        pitch: 10.00100
    Into a hashmap.
    This is what I have so far, planned. xD
    public HashMap<String, List<CourseObject>> courseObj = new HashMap<String, List<CourseObject>>();
    And I have a class called CourseObject.
    How would I go about doing this.

  2. Offline


    1. courseObj.put(String, courseObjectList);

    The String is what I guess is a name and courseObjectList is a thing of the type List<CourseObject>
  3. Offline


    I can't get it to work. Any precise code to load the data from the file and put it into it's own map or class.
    Then I could do, this.courseObjs.get... Which I can then get the information of the P1. in the file.

  4. Offline


    Read up on the configuration API to load data into CourseObject. Then follow the advice of GeekyCompz.
Thread Status:
Not open for further replies.

Share This Page