Error saving List<Enum> to config

Discussion in 'Bukkit Help' started by Geekola, Dec 24, 2012.

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


    I have the following enum:

    public enum Actions { CRAFT, USE, PLACE, BREAK, PICKUP }
    When I do:

    //rule.getActions() returns List<Actions>
    getConfig().set( path , rule.getActions() );
    I get this in my config:
        - !!com.github.mineGeek.LevelRestrictions.Managers.Rule$Actions 'PLACE'
    This causes reloading the config to barf all over the console.
    Tried looping through to create a string, but config wraps in -> '
    Using the exact same code but on a List<Integer> works as expected (which is to say it works!)

    Can't seem to find the solution. Thanks in advance for any insight, help or solutions!

    A Christmas bump :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 30, 2016
Thread Status:
Not open for further replies.

Share This Page