Another issue.

Discussion in 'Plugin Development' started by TotallyNotWalshy, Sep 19, 2014.

Thread Status:
Not open for further replies.
  1. So I now have another issue. So what I want is you can only mine in a certain world (listed in config) But it is just causing it to not work.

    Line which is causing this:
    Code:java
    1. if(main.getConfig().getList("FortuneWorlds").contains(player.getWorld())){
     
  2. Offline

    augustas656

    The error is being caused by you checking wether the FortuneWorlds list in your config contains a World object, unless serialized that's pretty much impossible, what you want to do is change player.getWorld() to player.getWorld().getName() because then you get the name of the world in String form not as a World instance.

    Regards
    augustas656
     
  3. augustas656 Ok I will try.

    EDIT: Worked again, thanks a lot!
     
Thread Status:
Not open for further replies.

Share This Page