Closed BBCSS closed 3 years ago
Might be covered by the new towntag.plot_names
tag? Not sure how towny works or how its API corresponds to any of the things people say about it... the API doesn't have "plots" it has "plot groups", which don't have chunk links or anything, seem to just have names and prices.
I'll check it out but I'm having issues with the latest release build. Either way, I'll look through the API sometime and see if I can't find some relevant info. I know plot groups are a thing that allow players to group their plots together (to give them all the same player permissions, for example) so I'm not sure much actual location data would be there.
I believe in the code, Towny refers to plots as TownBlocks and I do see TownBlock & TownBlockOwner which are also referred to in Resident but I don't know enough about Java to be certain of how they're working together.
TownBlocks appear to be identified by... a vertical Location? an x,z,world, but it's a location not a chunk, so... I've added towntag.plots
as a list of locations with the y set to 0. Is that reasonably sufficient? idk if it's just chunks being mishandled, or if it's the location at the center of a chunk, or what... but it definitely gets the X/Z values from a Bukkit Location instance not Chunk, so...
Okay Maxime on discord tested and confirmed that it is actually chunk coords, and the code I was looking at in Towny's source was legitimately just completely misusing Bukkit Location objects, so now it's set correctly and working.
Would it be possible to get a PlayerTag.towny.plots tag that returns the ChunkTags for each plot a player owns?
The New Issue button in this repo was hiding behind a prompt, sorry.