[INACTIVE][SEC] OwnBlocks v10.0 - Players may not break blocks placed by others [860]

Discussion in 'Inactive/Unsupported Plugins' started by cvenomz, Apr 19, 2011.

  1. Offline


    Version: v10.0

    (7-10-2011) - Please see the latest branch of OwnBlocks, called OwnBlocksX. It is recommended you use OwnBlocksX now.

    OwnBlocks keeps track of placed blocks, and who placed them. Players are not allowed to break blocks placed by other players. Note however, that indirect breaking may still occur (i.e. fire, tnt).

    • Blocks you place cannot be broken by others
    • Persistence; Server remembers who owns what blocks after a restart or "reload"
    • Toggleability! Use /ownblocks or /ob to toggle OwnBlocks on and off
    • Ability to exclude certain blocks from being protected
    • Support for Permissions AND non-Permissions servers
    • Auto-saving intervals for database protection
    • Add (pre-placed) blocks to the database manually
    Download OwnBlocks v10.0

    please note - If you are using iConomy, only version 4.6 is currently supported.

    Source Code
    OwnBlocks is released under the WTFPL License.

    Config File Options:
    Please note that at any time you may move/rename/delete you config file, and restart your server to produce the example/default config file with these options pre-filled along with descriptions. Also remember that lines preceded by a '#' are comments, and are ignored.
    exclude - enter comma separated integers of block-ids you wish to exclude from being protected and entered into the database. An example would be to enter the block-id for saplings, so planted trees do not have a single log at the bottom that is protected when a tree is harvested by another player.
    iConomy - enter an integer greater than '0' (zero) to enable. The number entered becomes the 'Basic Rate' at which players are charged to place protected blocks. Players will not be able to place blocks if they have insufficient funds.
    debug - If you are experiencing errors, and want to post them here to resolve them, or just want to spam your server log with information, set debug equal to 'true'
    status-message - Set this to 'disable' to not receive the message "[Username] - OwnBlocks is now activated for you....". Set this to 'simple' to receive a simple "OwnBlocks activated/deactivated" instead. Lastly, set this to 'disable' to disable messages entirely. Now that I think of it, disabling status-messages seems like a really bad idea......but the choice is yours.
    save-interval - Enter the number of seconds specifying the interval between database saves. The default is 60 seconds. Increase this number if you have an obscenely large database that takes a long time to write to disk. Decrease this number if you are paranoid and/or have very fast disk IO.
    info-id - Enter the integer representing the ID of the material or tool you would like to use as your "information tool" which will display the Owner of a block you right click with specified tool. Default is 269, which is the wooden shovel.
    add-id - Enter the integer representing the ID of the material or tool you would like to use as your "add tool" which will add the block you left click with the tool to the database. Default is 268, which is the wooden sword.
    enabled-on-login - True means that OwnBlocks is automatically activated for every player as soon as they log in. False means that OwnBlocks must be activated manually by each player when they want to start building protected blocks.

    Permissions Nodes:
    You will need to add these nodes to your Permissions configurations if your server uses Permissions:
    'OwnBlocks.ignoreOwnership' - Allows player to break blocks placed by others. This node is typically given to admins.
    'OwnBlocks.use' - Allows a player to even use OwnBlocks. If you want everyone to be able to protect blocks with OwnBlocks, and assuming you have a "normal" Permissions configuration, then add this node to your "default" class.
    'OwnBlocks.info' - Allows a player to use the info-tool to display who owns a protected block.
    'OwnBlocks.add' - Allows a player to use the add-tool to add blocks to the database for protection.

    • Version 10.0 (5-20-2011)
      • Added configuration to set whether OwnBlocks is activated for players upon login
      • Added tool to add pre-built blocks to the protection database
      • Improved process of saving database
      • Fixed status-message configuration options (inconsistent verb tense)
      • Default to protecting all blocks when Permissions is not detected
    • Version 9.0 (5-5-2011)
      • Added support for Servers without the Permissions plugin
      • Added 'OwnBlocks.use' and 'OwnBlocks.info' nodes
    • Version 8.2 (5-4-2011)
      • Fixed NullPointerException when right clicking with empty hand
    • Version 8.1 (5-4-2011)
      • Added ability to use tool to display who a block belongs to. use info-id in your config file
    • Version 7.0 (5-3-2011)
      • Added database auto-saving intervals
      • Added ability to enable/disable 'status message'
    • Version 6.5 (4-29-2011)
      • Added iConomy support for charging a basic rate for each block placed
      • Added config option for debug mode
    • Version 5.0 (4-23-2011)
      • Added Permissions Integration :)
      • I think I fixed a bug that occurred when the 'reload' command is issued
    • Version 4.0 (4-23-2011)
      • Added properties file (/plugins/Ownblocks/OwnBlocks.properties)
      • 'exclude'
      • Blocks are now removed from database when broken by their owners
    • Version 3.0 (4-22-2011)
      • Added the ability to toggle OwnBlocks on and off
      • Added commands: /ownblocks or /ob
    • Version 2.0 (4-21-2011)
      • Moved data directory from main folder to the plugins folder
      • Added/fixed serialization (Persistence)
      • Made database searching more efficient
    • Version 1.0 (4-20-2011)
      • Initial Testing Release
    ToDo: Should there be continued interest in this plugin, I will consider looking into:

    • MySQL support
    • Support for group projects
    • Add configuration option to prevent "adjacent construction", where a player builds blocks on blocks owned by another player
    • Add support for Metadata values
    • Area Selection
    • Update this iConomy shenanigans.
    • Look into solution for chest protection
    • Add command to check the database for blocks that have become air because they were deleted externally by something like WorldEdit
  2. Offline


    ....;; I'm already built building....
    How to makes own blocks about building?
    Plz help me;; I can't translate English; I'm from Korea...
  3. Offline


    I dont plan on updating to Permissions 3.0 unless I hear people are starting to switch to it.

    This should already be the case

    Unfortunately I don't speak Korean, so I don't know how helpful I can be, but to protect existing blocks, you use the 'add tool' which is configured in the config file. The default is the wooden sword. So try clicking blocks with the wooden sword. You will also need to make sure that you have the 'OwnBlocks.add' Permissions node, or if Permissions is not installed, be an OP.
  4. Offline


    I got a serious problem.. Right now, after updating from 9.0 to 10.0, ownblocks stopped working. I've tried to set it up again, I've tried everything I could think of.. But no

    How come?
  5. Offline


    I'd love to help you, but you need to tell me exactly what is wrong. Saying its broken doesn't help at all. Please post exactly what isn't working, along with what version of craftbukkit, permissions, etc, and your configuration file.
  6. Offline


    Is there any way I can add a whole world to the list of owned blocks (default world) and then people can continue building from there? I would not like people to destroy the structures that are already there but be able to make their own protected structures.
  7. Offline



    Craftbukkit: 818
    Permissions: Permissions 3.1.4

    That is the only two things I updated after I updated to 818. The problems could have started after I installed Permissions 3.1.4. Anyways, here's my config file

    #OwnBlocks Properties File

    #to exclude certain items from being protected when a player places them
    #regarldess of if they have OwnBlocks activated, enter the ID of the item
    #after the exclude key (comma separated; no spaces)
    #The example below would exclude Dirt(03) and Sand(12) from being added to the database

    #Please Note: changes are not retro-active. In this example, dirt placed before being excluded
    #Would still be protected, even after it is added to the 'exclude list'

    #To charge players a basic rate to their iConomy accounts, enter the amount (Integer)
    #that you wish to charge them per block they protect. Values <= 0 disable iConomy

    #Uncomment to enable debug mode

    #status-message is the message sent to players telling them when OwnBlocks has
    #been activated or deactivated for them. Options are: [enable, disable, simple]

    #Number of seconds between database saves. '0' to disable (not reccommended)

    #Id of material that when used will display the owner of a placed block.
    #default value is 269, which is a wooden shovel

    #Id of material that when used will add block to the database to be protected
    #default value is 268, which is a wooden sword

    #Set whether OwnBlocks is activated on player login (enabled by default) or if
    #players must enable OwnBlocks themselves (disabled by default)
  8. Offline


    Thanks. I tried v10.0 on 818 with a similar config and didnt seem to get any problems. Can you please explain what the problem is? And please post a server start-up log.
  9. Offline


    My problem is that the permissions isn't working.

    I've set up like that I and the moderators can remove blocks placed by others, by I got suspicious when I saw a lot of removed blocks on different buildings. Then I removed ownblocks.ignoreownership and replaced that with ownblocks.use, but the mods was still able to remove blocks placed by others.

    And here is the server start-up log for ownblocks only:

    OwnBlocks: Database read in from file
    OwnBlocks: version 10.0 initialized
  10. Offline


    Did you reload/restart the server after changing the permissions config?
  11. Offline


    Yes, I did

    But I reinstalled Permissions and now it's working .. for some reason, but thanks for the help anyway : )

    EDIT: I've found the source of the problem. It's Permissions.. Not OwnBlocks
  12. Offline


    Glad to hear its working. Thanks for posting back after you found what the problem was
  13. Offline


    Any word on the iConomy 5.0 update status?
  14. Offline


    It won't be ready for at least a little while. I haven't gotten much time to work on it lately
  15. Offline


    Naw, I wouldn't be using it for large zones of any kind, just making tight selections of just someones pre-ownblocks structure and setting all the blocks they placed as owned by them. That way their old structures are owned in the same way their newer ones are. It bothers me that some structures are owned using OB and older ones are not. Must be OCD.

  16. Offline


    Think you can get it working with Group Manger?
  17. Offline


    Hey I just wanted to get this sorted. Because it was very annoying. As an Admin to my server (so i have all the permissions anyway) If for example i break a fellow admin's block and then try to place a block where one of my admin's placed a block it disappears. so I checked with my admin to see if he could put his block back and he could? Is this part of the plugin or a bug? If it is part of the plug-in is there a way to disable this so i can replace my admins blocks?
  18. Offline


    Ill see what I can do.
    Probably not, but Ill at least take a look. Ive never used Group Manager, so its a bit foreign to me.

    This shouldn't happen. OwnBlocks is currently written (as of v10.0) to never block someone from placing blocks. Even if the OwnBlocks still thinks there is a block there that belongs to someone else, it will overwrite the owner of the previous block with the new owner. I agree that is sounds like you have a problem, but OwnBlocks shouldnt be the cause. Please double check your configurations and ensure you are not suffering from block lag or something.
  19. Offline


    I'm using GroupManager now and yes, it's working perfect
  20. Offline

    Wyatt Hunsaker

    just update iconomy support is all i gotta say
    you know what your doin
    good job keep it up man
  21. Offline


    Hi, i use the vercion 9.0, with 1.6.6 bukkit (last vercion of bukkit), updated 5 days ago and today I started to have a problem with ownblocks, when you want to enable or disable ownblocks (with /ownblocks or /ob) , appear the following error in the chat: "An internal error occurred while Attempting to Perform this command" and does not protect the blocks.
    The server use Windows Server 2003.

    I hope you can help me, greetings and thanks in advance.

  22. Offline


    Nah it wasn't lag but to admit I did also install some other plug-ins at the same time as yours but it seemed like it was yours doing it. I will sort it out soon though :) (sorry)

    either way you have made an amazing plug-in and it has already helped stopping those greifers.

    good job,
  23. Offline


    Awesome! One less thing on my todo list.
    Thanks man. Ill work on it.
    Can you check the server log? A stack trace would help me find where the problem is.

    Its always hard to tell which plugins are causing problems :\ No apologies necessary :) If it does turn out there is a problem with OwnBlocks, I would definitely want to know about it.
    And thanks, I'm very glad to hear that it has helped.
  24. Offline


    Surely griefers could mess up other people's stuff by placing random blocks in stupid places (i.e. in front of doors) that the victim couldn't remove? If you see what I mean?
  25. Offline



    Thanks in advance :)
  26. Offline


    Here are three features that could be implemented: A remove tool to remove owner, the possibility to add blocks for other and then multiple owner. I would be grateful if you could add these features so I wouldnt have to do it :)
  27. Offline


    Would love to see SQL support so that we with larger servers could use it.

    The idea of the plugin is grate and I'd love to use it
  28. Offline


    Oh no, not that error...
    I honestly am out of ideas for this error. It doesnt make sense to me. Maybe someone else can make some sense of it. Here is the offending code: http://i.imgur.com/GRtPv.png The problem is that there is a null pointer exception in the togglePlayer() Method. The only statement capable of producing such an error in the trace is the one that references the variable "activatedPlayers". This makes sense. However, in the onEnable() method: http://i.imgur.com/TWI8L.png I have this statement check to make sure it is not null, and if it is, initialize it. I thought I had all my bases covered.
    @Everyone: any ideas?
    @styyluz: have you tried v10.0?
  29. Offline


    I need to erase the folder ownblocks (of 9.0), to run correctly with the v 10.0, but it is very important that the blocks remain protected as they were before, which is the file that has blocks secured to put in the new folder?

    Sory for my bad english, thanks.
  30. Offline


    The data file you are looking for should be titled Database.db or something very similar. If you are worried, I would recommend taking a full backup of the server folder just in case something goofs up.
  31. Offline


    I just cleaned up my plugins and and its working fine now so it turns out it was just a silly mistake by me and it was nothing to do with your plugin!

Share This Page