MCTowns

MCTowns

52.4k Downloads

Let mayors buy more territory space with /te redefine

jmhertlein opened this issue ยท 14 comments

commented

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.

commented

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

commented

Fixed in dcb2758 and db8ebf4

Give jenkins an hour to trigger a new build and you can download a version to test there.

commented

Just tested. I was able to expand a territory without paying for it.

commented

Admins don' t have to pay. Do you need it to allow admins the option to pay?

commented

Yes. I would like to play legitimately along with my players lol. ๐Ÿ‘

commented

Alright, I'll make it only bypass cost when you supply the -admin flag.

Does this work correctly for non-admins?

commented

Not sure, haven't had any players on yet that own a town. Will test that as soon as I can.

commented

Added in 70a4dbf

Admins should now be charged by default, add the -admin flag to bypass.

commented

Ok. I'll check it out when I get in this evening. Thanks

commented

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...

screen shot 2014-01-14 at 12 26 20 am
screen shot 2014-01-14 at 12 26 05 am
screen shot 2014-01-14 at 12 31 19 am

commented

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?

commented

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.

commented

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.

commented

sounds good, this will be a nice add to the plugin to help us manage and modify existing towns.