Solved Takes Ages to Update YML

Discussion in 'Plugin Development' started by SimplyCode, Jul 9, 2014.

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

    SimplyCode

    So recently I've been making a plugin to tp to people leave location. Now it works, all code is working, commands, everything is loading pretty much. When I log in, and tp to my last log location, it was my log location from HOURS ago. The update to the yml is not instant.

    Is there any way to make the update to the YML instant, in other words, as soon as someone leaves make sure the YML updates their location of logging so that someone in game could instantly tp to their log location? I've put a link to my code below. Thanks.

    http://pastebin.com/XHj44w9U
     
  2. Offline

    fireblast709

    SimplyCode You only register your events when the config file doesn't exist, which is only with the first run (or when you delete it inbetween)
     
  3. Offline

    LordVakar

    SimplyCode
    As fireblast said above, move the event registration outside the method.
    Also, you might want to reload the config everytime you save it, or maybe use the load() method.
     
Thread Status:
Not open for further replies.

Share This Page