HousingDistricts

Discussion in 'Plugin Release Discussion' started by Simon311, Oct 1, 2013.

  1. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Description: A well-known plugin for protecting houses. Please read command descriptions and syntax in game. Please read config options descriptions in the generated config file (tshock/hconfig.json).​

    Permissions:
    • house.admin - Bypass ownership checks for commands (for Admins)
    • house.bypasscount - Bypass house count checks (allows to have more houses than defined by config)
    • house.bypasssize - Bypass house size checks (bypass limitations on minimum/maximum size of a house, limitations defined in config)
    • house.edit - For editing all houses (for Admins)
    • house.use - Access to /house (ability to protect a house)
    • house.root - Access to reload and wipe ( /housereload and /housewipe )
    • house.lock - Access to /house lock (ability to lock houses from trespassers)
    • house.enterlocked - For entering any locked house
    • house.size.[int] - Overrides maximum house size set by config, does not inherit. Use like: house.size.1000
    • house.count.[int] - Overrides maximum house amount allowed for a player set by config, does not inherit. Use like: house.count.20
    • house.rod - Allows teleporting into houses using RoD (Rod of Discord), despite of AllowRod config option being false.


    Commands:
    • /house set [1,2] - Sets a point (1 = top left corner, 2 = bottom right corner)
    • /house add [name] - Creates a house with specified name (from points defined by /house set)
    • /house redefine [name] - Redefines a house using points set up with /house set [1,2]
    • /house list - Lists all current houses
    • /house allow [username] [housename] - Adds [username] to house [housename] as an owner. Use carefully, a new owner can as well just /house disallow you ;)
    • /house disallow [username] [housename] - Deletes [username] from [housename]'s owners
    • /house name - Allows to find out house's name by hitting a block.
    • /house delete [name] - Deletes a house.
    • /house clear - Cleares points set by /house set
    • /house info - Gives you most information about a house (Name, is locked, chat enabled, owners, visitors, is from an old world)
    • /house addvisitor [username] [housename] - Allows [username] to enter your locked house [housename].
    • /house delvisitor [username] [housename] - Deletes [username] from [housename]'s owners
    • /house lock [name] - Locks a house, no trespassers will be allowed to enter. Do not do while somebody else is inside the house, you might put them into infinite teleport loop.
    • /house reload - Reloads config and all houses.
    • /house chat [name] - Enables house-chat.
    • /all [message] - Allows to chat publically while being inside a house with house-chat enabled.
    • /housewipe [true] - Removes all houses, use on a new world.
    • /housereload - Alias for /house reload


    Download | Source


    Other protection plugins:
    Changelog:
    Version 2.0.3:
    • 1.2.4 Update
    Version 2.o.2.7:
    • Fixed /grow
    • Increased thresholds
    Version 2.0.2.6:
    • May or may not be fixed
    Version 2.0.2.5:
    • Update for new Terraria
    • May or may not be broken
    Version 2.0.2.3:
    • Fixed visitors bugs
    • Fixed help display
    • Fixed typos
    Version 2.0.2.2:
    • Updated in-game help
    • /housewipe will now reset auto-increment value.
    Version 2.0.2.1:
    • Fixed some bugs
    • Added Paint protection
    • Added TP protection
    Version 2.0.2.0:
    • Fixed visitor commands editing owners instead
    • Removed deadlock detection
    Version 2.0.1.9:
    • More fixing for false detection.
    Version 2.0.1.8:
    • Fixed false detections.
    Version 2.0.1.7:
    • "Fixed" timers issue. Just made it detect if a timer thread got deadlocked.
    Version 2.0.1.6:
    • Added NotifyOwner, NotifyVisitor, NotifySelf in config, allows to control who gets the notifications and who does not
    • Added permissions: house.size.[int] and house.count.[int], allows to override config settings on maximum house size and maximum houses owned by a user for a certain group. Use like this: house.size.1000 or house.count.5
    • From now on players can't create houses that intersect any regions, unless they're allowed to build in the region their house intersects.
    • Some more optimizations, mostly on loops.
    Version 2.0.1.5:
    • Overall performance adjustment (hoping this will finally fix deadlocks)
    • Fixes for a few unnoticed things
    • Deprecated owners, visitors, debug (now it is all called /house info)
    • Adjusted permissions to work right.
    Version 2.0.1.4:
    • Not fixing anything, see next update.
    Version 2.0.1.2:
    • Crash-proofing. Causing deadlocks :p
    Version 2.0.1.1:
    • Added check for "tshock.canchat" permission for /all command
    • Added /housewipe - Deletes all houses, do on fresh world, requires house.root permission
    • Forgot to mention in previous changelog: /house redefine will also reset WorldID to current ;)
    Version 2.0.1:
    • From now on we're making sure a house is not overlapping World's spawn point
    • Added /house disallow, /house delvisitor, /house visitors
    • Renamed /house owner to /house owners
    • From now on we're making sure that a user is not yet owner/visitor in /house allow and /house addvisitor
    • Bugfix for House Owners not being able to enter their own locked house
    • Updated /house help
    Version 2.0:
    • Ported to SQL Queries
    • Added /house reload (alias for /housereload)
    • Added /house lock (/changelock deprecated)
    • /house reload now reloads database as well
    • /converthouse deprecated
    • Minor performance fixes
    • Fixed /house lock not working with NotifyOnEntry = false
    • Fixed all the commands to report "No such house!" instead of just "Command failed"
    • Fixed some WorldID related stuff
    • Added "World Mismatch: " to /house debug
    • Added notification if "/house add" hits a house made in another world
    • Probably some other fixes/optimizations I forgot to mention

    Note: Report bugs in this topic, or to me on IRC.
     
    • Like Like x 3
  2. Patrikk

    TShock Mod TShock Contributor Plugin Developer

    Joined:
    May 25, 2012
    Messages:
    104
    Works like a charm ^^ Thanks
     
  3. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Thanks for the feedback
    Also, be careful - you shouldn't use Submission plugins just like that xD
     
  4. Pychnight

    Plugin Developer

    Joined:
    Aug 26, 2011
    Messages:
    176
    Very interesting, i will get to testing all plugins ported to 1.2.0.1 of terraria. I will report any issues if i find any.
     
  5. Tyson Strange

    Tyson Strange Level 5

    Joined:
    Jul 23, 2011
    Messages:
    107
    Can you make different options for max house?

    Like, for new users i want them to have a house, but long time players, I want to be able to give them bigger houses..
     
  6. Syntheaux

    Syntheaux Testing until the end

    Joined:
    Dec 4, 2011
    Messages:
    3
    You could make a new group for those players and give that group the bypass permissions.
     
  7. Tyson Strange

    Tyson Strange Level 5

    Joined:
    Jul 23, 2011
    Messages:
    107
    i dont have them to have unlimited

    just a bit more than the default, in stages even, like new players 3000, higher 5-8000, then maybe 10000

    would it just be possible to add a couple of stages?
     
  8. sketaful

    sketaful Level 2

    Joined:
    Jul 18, 2012
    Messages:
    27
    How do you set max house size?NVM ;)
     
  9. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Will consider in future releases, thanks for the idea.
     
  10. Cyberpew

    Cyberpew Level 0

    Joined:
    Oct 4, 2013
    Messages:
    4
    If a user has a space within their name, is it possible to /house allow them even though they have a spaced name? If this isn't already possible, could you add this in the plugin possibly? As I got quite a few users with spaced names that are complaining that they cannot add a house visitor/allowed user.
     
  11. MarioE

    TShock Admin TShock Mod Plugin Developer

    Joined:
    May 26, 2012
    Messages:
    386
    Use quotes around the spaced names.
     
  12. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    In TShock, if you must enter a command argument containing spaces, you use " ".
    Like /house allow "User One" "House One" .
     
    • Like Like x 1
  13. Wolfe

    Wolfe Level 9

    Joined:
    Jan 3, 2012
    Messages:
    386
    My server crashed a few minutes ago. Checked the logs and these are the last lines:

    2013-10-04 20:01:03 - HTools: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
    2013-10-04 20:01:03 - GetDataHandlers: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
    2013-10-04 20:01:03 - GetDataHandlers: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
    2013-10-04 20:01:03 - GetDataHandlers: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
    2013-10-04 20:01:03 - GetDataHandlers: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
    2013-10-04 20:01:04 - GetDataHandlers: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
    2013-10-04 20:01:04 - GetDataHandlers: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
    2013-10-04 20:01:04 - GetDataHandlers: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
    2013-10-04 20:01:04 - HTools: ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
    at HousingDistricts.HTools.OwnsHouse(String UserID, House house)
     
  14. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    How do I recreate the issue? From what this says it looks like house = null;
    Can I have at least ~15 lines prior to crash?
    Also, what build? Did you have any similar errors on previous builds?
     
  15. Wolfe

    Wolfe Level 9

    Joined:
    Jan 3, 2012
    Messages:
    386
    https://github.com/NyxStudios/TShock/releases/tag/v4.20011
    No idea how to recreate it, I myself haven't experienced the bug, but my server has.
    If I look at the whole log, this error seems to happen a lot throughout the whole log. I'll PM it to you so I don't expose a bunch of IP's
     
  16. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    By build I meant version of Housing Districts ;) Also, are you running Mono or Windows?
    Are you using SQLite or MySQL?
    I would suggest you try to do /housewipe & /housereload and see if the issue persists.
     
  17. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Try new version 2.0.1.2, it should fix your issue, but I still recommend you do /housewipe
     
  18. Wolfe

    Wolfe Level 9

    Joined:
    Jan 3, 2012
    Messages:
    386
    Sorry, I must have copied the bottom link without clicking View More or something. I'm using 2.0.1.2, my bad. I'll try /housewipe to see if that fixes it.

    Edit: /housewipe isn't a command, if that's what you meant. I checked the house list and there was only one house named "Young''s House". Could the double apostrophe (or even a single one) cause it?
     
  19. Simon311

    Simon311 TShock Contributor; Moderator
    TShock Contributor Plugin Developer

    Joined:
    Feb 23, 2013
    Messages:
    337
    Uhm dude, I released 2.0.1.2 after you posted the issue ;)
    If you already installed it - there should be no errors
     
  20. Wolfe

    Wolfe Level 9

    Joined:
    Jan 3, 2012
    Messages:
    386
    What is wrong with me... I clicked the link I saw in my own post. Sorry, I woke up 20 minutes ago, I'm still a bit wonky.