Protection is not constant,

Discussion in 'Plugin Development' started by florilu, May 28, 2014.

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

    florilu

    Hey guys,
    currenty I'm developing a plugin for my server, but I'm experiencing a small bug.
    My goal is, to make protection with WorldGuard easier for my team, and even more comfortable.
    I implemented a function, where you can buy a plot, but unfortunalety I've got a bug.
    When you buy a plot via a command, it works properly with this line of code
    Code:java
    1. getWorldGuard().getRegionManager(player.getWorld()).getRegion(args[0]).setOwners(domain);

    then I look with the command /region info <PlotID> if the player who got the plot owns it. It shows me that the player really owns the plot, but when I run a reload on my server, the player don't own the plot anymore. So he can't build on it.
    Is there a way to make the "ownership" of a protection constant?
    I'm very thankful to every reply on this thread.

    PS:
    Sorry for my "bad" English. I haven't spoken it for a long while :D
     
  2. Offline

    teej107

    I haven't used WorldGuard but I am pretty sure I know what the issue is. Whenever you reload a plugin, you lose all data that is stored with it, unless you save it in a file. Save where ever the plots are stored in a file. Then have it load the plots from the file at each reload. Don't save Player though.
     
Thread Status:
Not open for further replies.

Share This Page