Inactive [MECH] ResidenceSigns v1.0 - Use signs to Rent/Buy/Sell land with Residence [1060]

Discussion in 'Inactive/Unsupported Plugins' started by KarnEdge, Jul 28, 2011.

  1. Offline

    KarnEdge

    ResidenceSigns
    Instead of making your players use "/res market rent Town.HouseName", allow your players to right click signs to rent and buy land, or put down signs to set up renting or selling with the Residence mod.

    WORKING ON STABLE VERSION.

    Download
    [​IMG] ResidenceSigns (v1.0) - NOT WORKING
    [​IMG] ResidenceSigns (v0.2)

    Current Features
    • Placing a [Rent] or [ForSale] sign on a residence that is already set up for rent or sale will automatically fill in all other information.
    • [Rent] signs allow you to setup a residence for rent using "Price/Days/AutoRenew [t/f]?" on the second line and an optional residence full name on the third.
    • Right clicking a [Rent] sign will attempt to rent the house in your name.
    • When someone rents a house using a sign, the bottom line of the sign will change from "Available" to the renter's name.
    • [ForSale] signs allow you to sell a residence for "Price" on the second line and an optional residence full name on the third.
    • Right clicking a [ForSale] sign will attempt to buy the residence.
    • When someone buys the residence, the bottom line of the sign will change from "Available" to "Sold".
    • Sign text will change if there are any differences in info whenever someone right clicks.
    • Residence name is optional on the third line. By default, wherever cuboid the sign is located in, it will try to use that residence.
    • Locale usage, defaults loaded into "english.locale" under "/plugins/ResidenceSigns"
    • Database usage, H2 and MySQL. Settings under "config.yml" under "/plugins/ResidenceSigns"
    • Multiple signs can used for one Residence.
    • If a player uses a /res, /land buy, /rent, /unrent commands or a [Rent]/[ForSale] sign; all signs for that Residence will be updated with the appropriate information. This also includes lease and rent expirations.
    • UseColors under config.yml can be set to true or false to turn off colors. Setting this to false will turn off all colors on signs and use the default black text; however, if a mistake is made on the sign it will still turn the top text to Red to indicate a problem.
    Shorthand Commands

    [Required Parameter]
    <Optional Parameter>
    If <ResidenceName> is not given, it will use your current location if there is a residence there.
    • /rsadmin
      • Toggle's on and off "/resadmin" mode.
      • Only people with "residence.admin" node can use this.
      • When activated, any signs you place or right click will act as if you used "/resadmin" instead of "/res"
        • Eg; Right-clicking a rent sign at Town.House with /rsadmin on will basically do "/resadmin market rent Town.House" instead of "/res market rent Town.House"
      • Keep in mind, it does have persistence unless server is restarted.
      • This toggle only works for market signs and the shorthand commands below.
      • It will not make regular Residence commands become "/resadmin" commands.
      • Left click a sign to add it to the database and/or update it manually.
    • /rent <info> <ResidenceName>
      • Rent a residence.
      • Info will give information on renting price.
    • /unrent <ResidenceName>
      • Remove yourself from renting a residence.
    • /land [buy/sell/remove/info] <ResidenceName> [price]
      • Buy or sell a residence (selling requires [price])
      • Remove will stop selling residence.
      • Info will give information on residence. (I don't think this works though)
    Planned Features
    • SQLite, MySQL, and FlatFile database backend to store sign locations so information can be changed on signs when someone does not use a sign to rent/buy. If a residence is made unrentable, not for sale or its pricing is updated, it will also rewrite the sign (or signs) to reflect changes.
    • Make wall signs use the block that they are attached to instead of actual location of sign.
    • An option to turn on/off all colors.
    • Locale settings so [Rent], [ForSale], and all other worded parts of the sign can be changed to a different language.
    Change Log

    Version 1.0
    • Added: Configuration options including database information, turning colors on and off, and locale name.
    • Fixed: Auto-renew not accepting correct true and false.
    • Added: Database usage (MySQL or H2, defaults to H2), thanks to @JustMeFlex for his downloader class and helping get my bearings back on SQL usage again. Multiple signs can be used for one residence and they will update no matter what is used for renting, buying or selling.
    • Added: Locale usage, set under config.yml. It will create a default localename.locale file.
    • Added: Left click a pre-version 1.0 sign with /rsadmin on will add your old signs to the database.
    • Fixed: Miscellaneous bugs.
    Previous Versions (open)

    Version 0.2
    • Fixed: Player interaction (right-clicking) with signs that do not have [Rent] or [ForSale] in the top line will no longer be manipulated by ResidenceSigns. (sorry!)
    • Updated: [ForSale] signs now properly show sale price since method was added in recent version of Residence.
    • Changed: Any interaction with created [Rent] or [ForSale] signs that are not blue will not try to do anything to prevent unwanted results.
    Version 0.1

    • Initial Release


    Installation and Help
    1. Drop ResidenceSigns.jar into /plugins directory.
    2. Enjoy!
    Screenshots (open)
    [​IMG][​IMG][​IMG][​IMG]
    Sign Setup (open)
    [​IMG]

    First line: [Rent] (not case-sensitive)
    Second line: Price/Days/AutoRenew (optional if residence is already set up for rent)
    Third line: Residence full name (optional, uses sign location otherwise)
    Fourth line: Shows status of residence (do not write on this line)

    [​IMG]
    First line: [ForSale] (not case-sensitive)
    Second line: Price (optional if residence is already set up for sale)
    Third line: Residence full name (optional, uses sign location otherwise)
    Fourth line: Shows status of residence (do not write on this line)
     
    Wei Bin, Clucky, Rollese and 2 others like this.
  2. Offline

    BlueGhostHD

    How come this is saying I don't have an Economy, yet the Essentials economy is working fine...?
     
  3. Offline

    KarnEdge

    You may want to refer to the Residence mod thread. This mod doesn't interact directly with any Economy plugins, Residence does all that work. I'm not sure Residence actually supports Essentials econ.
     
  4. Offline

    hero of spirits

    I found out what was wrong, there is a section, where you define a group lot size, max height, if they can use the select comands, etc...
    i made one for admin, which should have co existed with the default group there, for some reason, when the admin group is on, no one can purchase lots which are for sale, how ever, when i removed that admin group, and just left the default there, they could purchase land, however, I, being an admin, could not make new lots for sale...
    i am dealing with it. it does work now, just have to copy paste the admin part whenever i want to make new land, then redelete when i want it back to normal
     
  5. Offline

    KarnEdge

    That's really odd... You definitely want to bring that up to bekvon in his thread.
     
  6. Offline

    MonsieurApple

    Approved!
     
    KarnEdge likes this.
  7. Offline

    dlmarti

    Is there anyway to have the sign be updated in some other fashion than right clicking it? Right now when a rent expires the sign does not get updated?
     
  8. Offline

    KarnEdge

    That is in the original post stating it will not update unless right clicked. I am working on adding a database backend that will store all the sign locations. Without their coords, I cannot update the signs which is why I can only update then when clicked on or set.

    Once I complete the database backend, signs will updated anytime something changes with the residence. Also, I will add Left-Clicking for admins (rsadmin), to manually update signs later and add older signs to database.
     
  9. Offline

    dlmarti

    Can you also grab the left click event for updating the signs? Having the right click do both the update and the renting is problematic.
     
  10. Offline

    Moe041991

    @KarnEdge
    whenever somebody clicks a [ForSale] sign, it says "invalid residence" and changes the sign from available to sold without actually selling it.

    €: Since i cant even buy residences with the casual residence command, I assume its a flaw of residence itself.

    €2: If i set up a sign on a residence, IT DOESNT PUT THE RESIDENCE ON THE MARKET ITSELF? cause i think thats the error. It says invalid residence cause the sign wont put the residence on the market. /res market list is emptry.

    Could this be a future feature? that setting up this sign will put the residence on the market?
     
  11. Offline

    KarnEdge

    [Rent] signs will set up the residence to be for rent if its not already set up for rent.
    [ForSale] signs will set up the residence to be for sale if its not already set up for sale.
    This already works this way. I haven't really tested out the selling yet so I will try it out tonight. I do know Renting works just fine.

    Are you putting the sign inside of the cuboid of the residence you're selling or renting out?
     
  12. Offline

    Moe041991

    Nevermind, the permissions werent setup properly.
     
  13. Offline

    KarnEdge

    Ahh okay... does selling/buying work? I haven't tested it since my server does really use that feature.
     
  14. Offline

    sbeex

    Great plugin dude ! :)

    Could you add a config.yml to change languages string or maybe give us the source ? Thank you :)
     
  15. Offline

    Moe041991

    first testing was positiv. I'll give you some feedback whenever I introduced it to my users.
     
  16. Offline

    KarnEdge

    Actually all of the languages strings I use are from Residence itself, you would want to change the English.yml file under "Plugins/Residence/Language". The only string I give is about the pricing, I will add that to the config.yml eventually.
     
  17. Offline

    sbeex

    Oh sorry... but you mean : "[Rent]" can be changed to "[Louer]" with this language file ?
    thank you :)
     
  18. Offline

    KarnEdge

    Oooh okay, yeah I'll see about adding that!
     
  19. Offline

    Swadon

    Great Plugin !

    One question, I always make the /rsadmin if I cannot create ForSale/Rent signs.
    How do I remove this ?

    Thank You.
     
  20. Offline

    JustMeFlex

    Make it so that rent signs automatically change back to Available after the old rent expires
     
  21. Offline

    Zenolijo

    Lovely plugin! :)
    Using it with my newly started server and after a while you learn fast to make those signs ^^
    Those signs makes everything so simple and have managed to make a 30player city in 4 days, and alot because of your easy sollution, thanks! :D

    The residence signs messes up the /res market for me though, not a big problem though.

    Code:
    18:05:01 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'res' in plugin Residence v2.3.7
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:320)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:713)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:677)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:670)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
        at com.bekvon.bukkit.residence.Residence.onCommand(Residence.java:1264)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    
     
  22. Offline

    KarnEdge

    This feature will be added once I have database backend implemented. Right now, the only way to update a sign is to Right Click it since that's the only way to know the sign's coordinates on the map. The database will store sign locations and update them if Rent expires or people use commands to rent/buy/etc instead of the sign.

    I'll see if this happens on my server. That's definitely an error from Residence itself, does this happen when using /res market command without ResidenceSigns installed? You said it happens when right clicking a sign, have you tried checking that residence with "/res market info Residence.Name" to see if its still considered a residence and not an expire lease or something else of that sort? If so, I probably have to add an extra error check to prevent this.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 18, 2016
  23. Offline

    JustMeFlex

    I'll recreate the entire plugin then, just for personal use until you get the database done. Plugin making can't be that difficult...
     
  24. Offline

    Hoddie54

    Great! Love this. Thanks a bunch
     
  25. Offline

    Zenolijo

    It doesn't happen when right-clicking a sign, the signs works perfect.
    Sorry, i'm not available to try without the plugin because i just have 1 testing computer and its always 5+ people on :/
    The whole /res market * doesnt work.
     
  26. Offline

    JustMeFlex

  27. Is the days like rel life or minecraft days ??
     
  28. Offline

    KarnEdge

    Real life days via Residence mod.
     
  29. Ok thanks
     
  30. Offline

    Mike187

    I get this when reloading:


    2011-08-23 19:10:20 [SEVERE] Could not pass event CUSTOM_EVENT to ResidenceSigns
    java.lang.NoClassDefFoundError: com/bekvon/bukkit/residence/event/ResidenceRentEvent
    at us.rgaming.residencesigns.RSEventListener.onCustomEvent(RSEventListener.java:25)
    at org.bukkit.plugin.java.JavaPluginLoader$88.execute(JavaPluginLoader.java:862)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at ru.tehkode.permissions.PermissionManager.callEvent(PermissionManager.java:473)
    at ru.tehkode.permissions.PermissionManager.callEvent(PermissionManager.java:477)
    at ru.tehkode.permissions.PermissionManager.reset(PermissionManager.java:447)
    at ru.tehkode.permissions.bukkit.PermissionsEx.onDisable(PermissionsEx.java:112)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:128)
    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:906)
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:294)
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(SimplePluginManager.java:287)
    at org.bukkit.plugin.SimplePluginManager.clearPlugins(SimplePluginManager.java:315)
    at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:423)
    at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:281)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:344)
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:489)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:468)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.ClassNotFoundException: com.bekvon.bukkit.residence.event.ResidenceRentEvent
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:36)
    at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:24)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 21 more
    I use bukkit 1060.
     
  31. Offline

    fatmarley

    @KarnEdge Not sure about this issue. It seems the residence signs cant access the lib driver to store the data...

    Show Spoiler
    2011-08-24 01:10:59 [INFO] [ResidenceSigns 2.0] Could not create connection: org.h2.jdbc.JdbcSQLException: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-155]
    2011-08-24 01:10:59 [SEVERE] null
    java.lang.NullPointerException
    at Flex.ResidenceSigns2.SignDatabaseHandler.setupSignsTable(SignDatabaseHandler.java:61)
    at Flex.ResidenceSigns2.SignDatabaseHandler.initialize(SignDatabaseHandler.java:50)
    at Flex.ResidenceSigns2.ResidenceSigns2.onEnable(ResidenceSigns2.java:121)
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:885)
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:278)
    at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:178)
    at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:161)
    at org.bukkit.craftbukkit.CraftServer.reload(CraftServer.java:452)
    at org.bukkit.command.SimpleCommandMap$ReloadCommand.execute(SimpleCommandMap.java:281)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:352)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:737)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:701)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:694)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:89)
    at org.getspout.spout.SpoutNetServerHandler.a(SpoutNetServerHandler.java:436)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:454)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    2011-08-24 01:10:59 [INFO] [ResidenceSigns 2.0] Disabled
     

Share This Page