Let mayors buy more territory space with /te redefine
jmhertlein opened this issue ยท 14 comments
Currently, if mayors are configured to be allowed to buy territories, /region redefine will not permit them to enlarge them.
This should be fixed to let them buy more space.
Hey, I hate to bother about this again, but is there a way we can expedite a fix for this? I have a couple towns now looking to expand existing territories and I don't want to do it for free, kinda ruins the economy aspect of the server. :[ Thanks for considering
Alright, I'll make it only bypass cost when you supply the -admin flag.
Does this work correctly for non-admins?
Not sure, haven't had any players on yet that own a town. Will test that as soon as I can.
Added in 70a4dbf
Admins should now be charged by default, add the -admin flag to bypass.
Hey. I'm commenting on this because I was going to open a new ticket, but then I saw this. I just used /territory redefine on a currently selected territory, with a new world guard region selected, to expand my new town's territory. It did it for free. No extra cost. Technically, someone can buy a small block selection and then redefine for a huge town. This is a big no-no in our server.
I understand it may take some time to get this working, so if its going to take a substantial amount of time, can we disable territory redefining? There has to be some sort of quick solution. We're about to open up a new world and there's going to be 3-4 new towns popping up over the next couple weeks. I don't want anyone else finding out about this on the server, lol.
Here's the screenshots I took during this test. First image, my existing territory. Second image, my poly selection, and territory redefine command. As shown, no currency was taken and no warnings given (town has no money in it at the moment lol). Third image is the territory after updating for free. :-) Of course, the poly selection issue is still happening (I went back to the latest WG and WE snapshots because I needed item frame protection). Ironically, I tested this in creating a second territory right before this, and using //sel poly and then //expand vert, it worked. I created a poly shaped territory. So I guess in redefine it isn't working. idk...
It looks like it will not allow you to redefine territories at all unless you have the mct.admin permission node.
Does this fix the security concerns you have for the immediate future?
Yes, it does. Thanks. How big of a project is it to make it work so that mayors can redefine territories, purchasing the additional land? In the immediate future I can secure territory redefining to myself only, but I'm sure they'll need to redefine their own territories in the near future.
Nothing too complicated.
Gonna look something like
if(region you're trying to redefine is a territory) {
numBlocksToBuy = numBlocksInNewRegion - numBlocksInOldRegion;
charge them for numBlocksToBuy, making sure they have enough money and etc etc
}
Mind you, it's more than just two lines, but that's the general idea.