10-27-2015, 08:47 PM
(This post was last modified: 10-27-2015, 09:01 PM by Seadragon91.)
I have looked into the source code to implement flags. For mini games flags would be helpful and also for protections, like disable pvp, tnt, mob spawning, etc.
I see that the every player has then a list of Cuboids in a instance named cPlayerAreas. If I add a flag to a area and save it to the sqlite3 file. Then all player areas needs to be reloaded, to ensure that the cuboid has a flag.
The current code is not really suitable for that.
I have started implementing of flags and found a few other things that makes it much more complex, for example only applying the flag to players in a specific group.
Edit:
If there were only one area, that would be accessed if the player places/breaks a block, that would simplify things. But here I think the biggest problem would be to get the area from the coordinates.
I see that the every player has then a list of Cuboids in a instance named cPlayerAreas. If I add a flag to a area and save it to the sqlite3 file. Then all player areas needs to be reloaded, to ensure that the cuboid has a flag.
The current code is not really suitable for that.
I have started implementing of flags and found a few other things that makes it much more complex, for example only applying the flag to players in a specific group.
Edit:
If there were only one area, that would be accessed if the player places/breaks a block, that would simplify things. But here I think the biggest problem would be to get the area from the coordinates.