Problem with getting a 'boolean' from config.

Discussion in 'Plugin Development' started by DJ_Amos123, Jul 7, 2013.

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

    DJ_Amos123

    Hello,
    I'm taking over a plugin and I'm having trouble with a certain part of the code.
    Here's the problem:
    https://github.com/MrAmos123/ClickItem/blob/master/src/me/MrAmos123/CI/CI.java
    LINE: 33
    LINE: 46
    LINE: 158 - 160

    Can someone please suggest a way to fix this issue.
    Thanks,
    DJ_Amos123.

    EDIT: Basically it's not loading 'true' or 'false' from the config, so it defaults to true.
    But I want it so it's customizable making the item droppable

    EDIT2: I'm new at java, so please could you give some detailed help. ^.^
     
  2. Offline

    CubieX

    What problem do you have with it?
    Any errors?
     
  3. Offline

    iFamasssxD

    Its most likely a NPE and it is most likely due to it not being read right in the config.
    A stacktrace would be helpful.
     
  4. Offline

    DJ_Amos123

    That makes no sense to me, what so ever. :)
     
  5. Offline

    SnipsRevival

    Post whatever error you are getting.
     
  6. Offline

    Minnymin3

    DJ_Amos123

    It will help you if you are taking over a plugin to learn Java. But to do with your problem the getBoolean method defaults to false. Does the item always not drop? Also realized that you are setting the 'config' variable before creating the default config which will make it not work the first time the plugin is run.
     
  7. Offline

    DJ_Amos123

    Well, this is my encouragement to learn Java, you see I have very little motivation, but if I force myself to take upon plugins, and trying to re-design them, it's working, but I'm hitting a few things I'm not sure how to fix.

    No errors.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 3, 2016
  8. Offline

    DJ_Amos123

Thread Status:
Not open for further replies.

Share This Page