[SUBMITTED] [ADMN/SEC] BananaRegion - simple region renting [953]

Discussion in 'WIP and Development Status' started by codename_B, Jul 5, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    codename_B

    Firstly, the download link: http://uf6.info/bcode/BananaRegion.jar

    This is what I would describe as a "less buggy release" and as such I would appreciate all stacktraces and bug reports you can muster ;)

    What you do: place a sign with the following formatting on an area surrounded by a fence
    Please note you MUST place the sign on top of a fence!
    line 0: bananaregion
    line 1:
    line 2:
    line 3:

    What it does:
    • protects the region from anyone else interacting, placing blocks, destroying blocks etc
    • allows you to add/remove players from your region easily (by adding/removing signs with the appropriate name, one sign per player)
    • makes the region fireproof
    • logs the amount that the player would be charged per block for building/destroying in that area
    • stops water and lava flow in the region
    • players cannot destroy, change, or place rental signs
    Commands:
    /rent - rents an area
    /unrent - unrents an area

    How to rent:
    Look at the sign and type /rent - you are now renting that area and can build in it

    How to unrent:
    Look at the sign and type /unrent - you have been removed from the rental area

    Multiple tenants:
    YES

    Multiworlds:
    NOT YET

    Register:
    YES
    To build in a rented area using this plugin - you must have iCo4, iCo5, EE17 or BoSE.
     
  2. Offline

    Master_Rudik

    You left the IRC before I could report the results of the testing I did:
    • Pistons and TNT, obviously, can penetrate the region, destroying the fence and thus deleting the region from the plugin config on its next check for regions.
      • As you can guess, this also applies to Creepers,.
    • Water and lava can flow into regions from the outside, meaning when combined that cobblestone and obsidian can form on the inside.
    • (This one is a bit hard to explain) : If a block is placed on the face of a block outside the region that is oriented toward the region, it will be allowed to be built in the region. Not much of a problem because it just means the walls of the region can be filled up, but I can see instances where this might be bad.
    • In one instance, region allowed editing area west of the sign, but worked fine east of it. Wish I had more info on this one, but we didn't reproduce it. Must've just been a random quirk.
    Other than what I've found, plugin works perfect. Keep up the good work!
     
  3. Offline

    WinSock

    Shameless plug:
    @codename_B if you want you could use elRegions API to take care of figuring out regions and economy and stuff. Just manually use the RegionManager to make a region that corresponds with the fence region to make a polygon. And you can hook into player enter and leave events.
     
  4. Offline

    codename_B

    I don't like the idea of depending on another plugin for something like this though - but thanks :)
     
  5. Offline

    WinSock

    Worth a try :D but its just an API so i'm shamelessly plugging it to developers to try to get it off the ground lol
     
  6. Offline

    codename_B

    Ah right lol :) well good on you for working on an API! I'll definately consider it for other things I'll be doing.
     
  7. Offline

    Kalais

    I guess I'll start posting my testing here instead of in my request page where it began. :)
     
  8. Offline

    codename_B

    Added register ;)
     
  9. Offline

    Kalais

    @codename_B

    Made rent cost 10. Nothing was deducted from player's iConomy account.

    Code:
    11:33:09 [INFO] xJoshJx wants to rent.
    11:33:09 [INFO] Tried to set line 1 to xJoshJx
    11:33:09 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'rent
    ' in plugin BananaRegion v0.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12
    9)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
    98)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:711)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
            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:84)
            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.NullPointerException
            at com.ubempire.region.RegionReader.readStatic(RegionReader.java:28)
            at com.ubempire.region.Region.onCommand(Region.java:47)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
    11:33:38 [INFO] reading regions...
    11:33:38 [INFO] 1 regions read.
    11:33:38 [INFO] Saved: true
    11:33:52 [INFO] xJoshJx wants to rent.
    11:33:52 [INFO] Tried to set line 1 to [FOR RENT]
    11:33:52 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'unre
    nt' in plugin BananaRegion v0.2
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12
    9)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:2
    98)
            at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.
    java:711)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)
    
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
            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:84)
            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.NullPointerException
            at com.ubempire.region.RegionReader.readStatic(RegionReader.java:28)
            at com.ubempire.region.Region.onCommand(Region.java:57)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 12 more
     
  10. Offline

    codename_B

    Thanks, looking into that now.

    @Kalais - redownload and try now.

    @Kalais - I think I've fixed it now - I tried it on my test server and it worked amazingly well :D

    NOTE: Players who rent a region will not be able to destroy the bananaregion sign - though they can still destroy the fence, but replacing the fence will re-enable the region.

    Next on the list - colored signs!

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

    Kalais

    @codename_B
    When will the player be able to click the sign to rent? Using the commands, how does the plugin know which region you're renting when there are multiple signs? They won't be able to destroy the fence if I have that region protected, right?
     
  12. Offline

    codename_B

    I've just updated to include that. They don't click the sign, but they point at it and type /rent.
    It knows which sign because it's the sign they are looking at :D

    Redownload :)
     
  13. Offline

    Kalais

    Any chance of a shift+right clicking of the sign?

    Testing: It doesn't charge the user. It only says it is. Also, this is per block or per plot charge? I was originally hoping for per plot but would like the option of doing per block.
     
  14. Offline

    codename_B

    The charge is per block placed/destroyed as because the regions are stored in memory and only what is needed is loaded there is no way to charge players for regions that aren't loaded :)

    I guess I could add SHIFT+right clicking the sign, but seriously? Is one command too simple?

    Coming soon! A complete rewrite of how the system works! 7 day leases instead of per-block cost!

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

    Geekin_It_Up

    could you plz update this!
     
Thread Status:
Not open for further replies.

Share This Page