Skip to content
Timothy Barela edited this page Feb 27, 2018 · 6 revisions

Housing

Gives a housing and shop system to your server. Previously this depended on the SEconomy plugin, but this is now being replaced by the BankingPlugin. Ensure that the BankingPlugin is configured correctly first.

Config

The config can be found at housing/config.json. To generate it, start your server and exit it. The format is:

{
  "Database": {
    "DatabaseType": "sqlite",
    "ConnectionString": "uri=file://housing\\db.sqlite,Version=3"
  },
  "CurrencyType": "YourCurrencyName",
  "RequireAdminRegions": false,
  "PurchaseRate": 100.0,
  "TaxRate": 1.0,
  "StoreTaxRate": 10.0,
  "TaxPeriod": "00:00:15",
  "MaxDebtAllowed": 10000,
  "AllowOfflineShops": true,
  "SalesTaxRate": 0.07,
  "MinHouseSize": 1000,
  "MaxHouseSize": 10000,
  "MaxHouses": 10,
  "MinShopSize": 10,
  "MaxShopSize": 10000
}

Let's go over the properties:

Database: This sub object controls how Housing persists itself. DatabaseType supports either "sqlite" or "mysql". Connection strings vary by database type, and your configuration. The default sqlite connection string is: "uri=file://housing\\db.sqlite,Version=3"

And for an example, a mysql connection string will look like: 
"Server=localhost;Database=db_housing;Uid=user;Pwd=user_password;"

CurrencyType: Name of a defined Currency within the BankingPlugin. This MUST be set to a valid Currency!
RequireAdminRegions: Whether users must place houses on admin defined regions. If this is true, then a user must place a house on a region whose name begins with __Plot. Players can also buy these regions in whole.
PurchaseRate: The purchase rate for a house. The purchase cost of a house is area * PurchaseRate.
TaxRate: The tax rate for a house. The tax cost of a house is area * TaxRate.
StoreTaxRate: The tax rate for a store, a house that contains a shop. The tax cost of a store is area * StoreTaxRate.
TaxPeriod: The period of taxes. In the format hh:mm:ss.
MaxDebtAllowed: The maximum debt allowed on a house for a player. If this value is exceeded, then the house will become unclaimed and up for grabs.
AllowOfflineShops: Whether users can let shops stay open while they are offline.
SalesTaxRate: The sales tax rate for shops.

The other properties are self-explanatory. Commands

There are a lot of commands required for house/shop management:

/house (permission housing.house):
    /house 1: Waits for you to set the first point of a house.
    /house 2: Waits for you to set the second point of a house.
    /house allow <player-name>: Allows the specified player name into the house you are standing in.
    /house buy <house-name: Buys the current house, if on sale, or the entire plot.
    /house disallow <username>: Disallows the specified username from the house you are standing in.
    /house info: Gives info about the house you are standing in.
    /house remove: Removes the house you are standing in. This will remove shops as well.
    /house sell <price>: Sells your house. This is not reversible.
    /house set <house-name>: Sets a house using the points. This will bring up a confirmation if houses require currency to purchase.
/itemshop (permission housing.itemshop):
    /itemshop 1: Waits for you to set the first point of a shop, which must lie entirely within a house you own.
    /itemshop 2: Waits for you to set the second point of a shop, which must lie entirely within a house you own.
    /itemshop buy <item-index> [amount]: Brings up a confirmation to purchase that many items.
    /itemshop close: Closes the shop you are standing in.
    /itemshop info: Gives info about the shop you are standing in.
    /itemshop open: Opens the shop you are standing in.
    /itemshop remove: Removes the shop you are standing in.
    /itemshop set <shop-name>: Sets the shop using the points. To finalize the shop, a chest must be right-clicked that lies within the house.
    /itemshop setmsg <message>: Sets the message for the shop you are standing in.
    /itemshop setprice <item-name> <price>: Sets the price for an item of the shop you are standing in.

Normally, the house or shop you are standing in must belong to you. But with the permissions housing.house.admin or housing.itemshop.admin, you may modify other people's shops.

Clone this wiki locally