BuyRegion
As BukkitDev staff have left the team I am no longer updating the plugin on here, Please visit the discussion on Spigot, I will move all updates and information over soon - If plugin releases start to get accepted I will think about moving over downloads back to bukkit - As for other plugins you can view my uploads here
Allows you to create signs which can be used to buy or rent WorldGuard regions. The plugin works with all Vault supported economy systems as it requires Vault for economy support.
Please create a ticket for problems else they get lost in the comments.
Plugin work and update
I have pushed build 1.1.7 out (Pending to be released) to squat bugs and fix anything that appears, The plugin has been tested on a spigot / bukkit 1.7.8 build and is working successful with no errors. Please report anything you get into the comments so we can go through and fix these problems together :)
PS: Try and use pastebin when pasting a error
UUID's:
A UUID safe build will be released soon along with bug fixes when some are found.
Installation
- Put BuyRegion.jar in your plugins directory.
- Do a /reload to reload your plugins.
- Configure your permissions if needed.
- Enjoy!
Permissions
- buyregion.create - allows the creation of [BuyRegion] and [RentRegion] signs.
- buyregion.admin - allows usage of admin commands.
- buyregion.exempt - allows player to bypass BuyRegionMax
- buyregion.buy - allows player to buy a region (if config requires)
- buyregion.rent - allows player to rent a region (if config requires)
(note: OPs have all nodes)
Usage
Create a BuyRegion Sign
- : [BuyRegion]
- : <regionname>
- : <price>
- : unused/any
Example Sign
- [BuyRegion]
- epic_store
- 200
The previous would make a sign that would sell region 'epic_store' for '200' of your economy currency.
Create a RentRegion Sign
- : [RentRegion]
- : <regionname>
- : <price>
- : <timespan>
Example Sign
- [RentRegion]
- epic_store
- 200
- 7 days
The previous would make a sign that would rent region 'epic_store' for '200' of your economy currency for 7 days. Once rented properties expire, the region is automatically put back up for rent. If the renter has auto-renew turned on, the property will be renewed to them if they have the available money. See notes for information about sign replacement.
Buy a Region
- The player must enter buy mode by typing /buyregion
- The player must right-click a BuyRegion sign.
(note: if the player right-clicks a BuyRegion sign while not in buy mode, they will be prompted to enter buy mode.)
(note: if RequireBuyMode is set to false the player will not be required to enter buy mode before buying or renting a region.)
Rent a Region
- Same as buying a region, see above.
Player Commands
- /buyregion - toggles buy mode
- /buyregion renew <region> - renews rental on <region>
- /buyregion autorenew - shows current autorenew status
- /buyregion autorenew <true/false> - sets auto-renew for all of the player's rentals
- /buyregion help - shows help screen
Admin Commands
- /buyregion buycheck <player> - checks total bought regions for <player>
- /buyregion rentcheck <player> - checks total rented regions for <player>
- /buyregion buyset <player> <amount> - sets total bought regions for <player>
- /buyregion rentset <player> <amount> - sets total rented regions for <player>
- /buyregion buymax - displays current BuyRegionMax
- /buyregion buymax <amount> - sets BuyRegionMax
- /buyregion rentmax - displays current RentRegionMax
- /buyregion rentmax <amount> - sets RentRegionMax
- /buyregion buymode - shows the current RequireBuyMode setting
- /buyregion buymode <true/false> - sets RequireBuyMode
- /buyregion buyperms - shows the current RequireBuyPerms setting
- /buyregion buyperms <true/false> - sets RequireBuyPerms
- /buyregion rentperms - shows the current RequireRentPerms setting
- /buyregion rentperms <true/false> - sets RequireRentPerms
- /buyregion evict <region> - performs an eviction on <region>
- /buyregion help - shows all commands
(note: Setting BuyRegionMax or RentRegionMax to 0 makes it unlimited)
Timespans
Timespan Examples
- 1 day
- 15 secs
- 20 mins
- 5 h
Accepted Time Values
- Seconds: s, sec, secs, second, seconds
- Minutes: m, min, mins, minute, minutes
- Hours: h, hour, hours
- Days: d, day, days
Config Options
- BuyRegionMax - max regions a player can buy with BuyRegion
- RentRegionMax - max regions a player can rent with BuyRegion
- CheckExpirationsInMins - how often to check for expired rented regions IN MINUTES
- RequireBuyMode - is buy mode required to be on to use buy/rent signs? Recommended: true
- RequireBuyPerms - require the player to have buyregion.buy to buy a region
- RequireRentPerms - require the player to have buyregion.rent to rent a region
- DateFormat - Sets the date format - Accepted Values: Default, US, EU
Date Formats
- Default - year/month/day
- US - month/day/year
- EU - day/month/year
Message Configuration
- All messages that are sent to a player can be changed by editing your config.yml in the 'Messages' section.
- Between the name of the field and the contents you should be able to figure out which is which.
- Sentences that seem to just end will probably have the value placed there.. consider this when making changes.
- No admin messages can be changed... would be a lot of work on my end for nothing.
Notes
- Auto-renew is defaulted to OFF for all players. They will only need to turn it on once, however.
- Only use 1 [RentRegion] sign per rentable region. For performance reasons it does not properly support multiple signs per region. It will let you create them, but it will probably lead to strange behavior. This applies to [BuyRegion] signs also.
- I would recommend trying to avoid original RentRegion signs being destroyed.. the replacement of them is still a little sketchy for positioning. I do plan to look at this but was trying to get a release out with the renting for all the people currently dead in the water from that other plugin going inactive.
- The CheckExpirationsInMins config setting can accept decimals.. so 0.05 = 3 seconds for instance. Although I wouldn't recommend going less than 0.5 for that setting. With a lot of rented regions it could be a taxing operation. Best left to 5+ minutes for average servers that rent things for days, and not minutes or seconds.
- I didn't bother making the signs indestructible as the idea is to place it inside the already defined protected region.. which would typically make it unbreakable anyways. Furthermore, for performance reasons I'm trying very hard to avoid hooking the block break event.
OK I've having trouble getting this to work right i'll type out what i'm doing and what i'm trying to do
i have a 50x50x50 area label area01 in it i have vendor stalls and houses named stall01 or house01
i typed (after cubiod'ing)/region define area01
now i set it to priority 0
then i set lets say a smaller zone of 5x5x5 as a stall01
/region define stall01
then it seems no matter if i set this area as priority 5 or as child or as parent of /area01 when i have a player buy the region it simply says you do not have permissions to build
is there a command i can set for the large region so i don't have to think each time
like make it the child automatically
wait can i set the larger as priority 0 and the smaller as 1 each time<or do i have this backwards>
@CoffeeNutz
you need to setparent..
/region setparent <smallregion> <largeregion>
that will do ya.
ok i think im doing something wrong...
I'm /region define <mass region name> then i'm making smaller regions inside of it (so i protect the whole place and then make smaller places to sell out)
and it keeps telling the buyers you dont have perm even after they buy it
@JDigital1337
Thanks and congratulations! Your plugin is Amazing!! =)
@Trecoo
You may be right, I'll check that code when I get home. Originally there was no help for players, I may have overlooked that and only appended to the admin part.
Thanks for the heads up!
Hi JD.
I think there is a problem.
Seems that normal players can't see the help menu, just OP players.
any idea?
When they type /buyregion <anything> it turns on the buy mode (exeption: the player's command, like renew and autorenew...)
@mbjrncdr
When we approach it from a "can't rent out past this timeframe" aspect instead of the "player can only have so many advanced rentals", it becomes a much simpler solution.
I can probably add this in the near future.
Good idea, thanks for the suggestion!
I understand your concern about limiting the timespans and that generateing a lot of data to keep track of. The 6 years was just a extreme example. The issue i'm trying to get at is more about a player stacking multiple rents up on each other and then just not using the plot they are renting for a number of reasons. I have had this happen to a manual run market place. A way to solve this could be having a max-rent time in the config that would stop any renew attempt that leads to exceeding this time limit.
@midnightfang22
Confirmed there was a bug in the days calculation when using high values.. I rewrote that part and have uploaded 1.1.0 to solve for this.
Thanks for the bug report!
@ mbjrncdr I don't like the idea of limiting total timespans that can be rented for, aside from that being just more data to keep track of, it really is an economy issue for your server. If a player has the funds to rent a property out for 6 years, and you don't want this... your prices are definitely too cheap. Consider the wealth of players when setting prices. And yes... there is a permission that is required to make buy-signs. To be clear, the purpose of this plugin is not for players to rent out their properties to other players, but for server owners to rent properties as an economy sink.
@FiddyCraft - At this time I have no plans to keep track of regions and regen them..
anyway you can make it so if the rent runs out it can regen the area to how it was before the renter paid into it
Thanx for the renew feature it will be very handy. How ever I have a question. Is there a limit to how many time periods you can re-rent for. A problem could arise that someone rents the plot for 6 years into the future. This is bad because, 6 years is a long time and many people leave a server long b4 that and thus locking up a plot for no good reason. It should be max 1 or 2 time periods prepaid rent. Also I think there is a need for a security feature if we want to give players the right to make buy signs. No one but the owner or the people with a bypass permission should be able to create a buysign for the region
Um...The region seems to be removing itself too early on the rentregion. I put the time as 30 days and it expires within a few minutes...any reason as to why? Yeah the time for expiration is setting to like 12/06/15 when I put 30 days from today.
@Schmarozer
Currently not possible for the money to go to a player, also I will look into LWC support but no promises there.
Why does my post ignored?
@FlamingUber
Looks like you are right, looking into it now. It is reading the perms right there is just some bug.. give me a few.
Just uploaded 1.0.9 to fix that.. was some bad logic for that
For some reason, unless I am OP, I can't make buyregion signs. I gave the node buyregion.create, but it still won't work.
Ok.. i was bored...
1.0.8 uploaded with auto-renew functionality. It is defaulted to OFF however so each player will need to turn it on if they want it.
Fear not!
I just uploaded 1.0.7 - waiting on approval.
Added: /buyregion renew <region>
Good catch guys, didn't even think about it until it was mentioned. Guess that's why we have on-going development :)
(It isn't automatic renew.. I may look at that in the future, but at least they can renew in advance. - also, this does work retroactively, so it will be seamless.. just update and /reload)
EDIT: I just thought of a simple light-weight way to do the auto-renews so this feature may be in 1.0.8.
Oh shit.... There is no Auto Renew?? I didn't think of that.......
This is going to be bad. in 7 days all my shops will be back up for rent and I am going to have mass chaos on the server. I for see other people trying to rent other properties and stealing shit.
Anyways to add an auto renew feature? and have to apply to currently rented properties? I will donate triple if you can do this lol