[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

    cvenomz

    OwnBlocks:
    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).

    Features:
    • 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.


    Changelog:
    • 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
    [​IMG]
     
  2. Offline

    titog176

    hey when i had a creation done i made it like a couple days back and now its not protected..... because i got the plugin today! any backup plugin addon or something?

    great! u can just rebuild it i would be glad also ty for making this plugin my bro is obsessed with a plugin like this omg ty ty ty ! im a fan too lol

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

    cvenomz

    I may be able to add a feature that allows you to select blocks you previously built to be protected under your name. Currently though, there is no way to do this without rebuilding what you already made.
     
  4. Offline

    BigBlueGER

    This is awesome! Maybe include options like 'exclude dirt' or so ;D
    I'm sure that this can fight region-based protection plugins ^.^
     
  5. Offline

    titog176

    also maybe u can ask the creator of [WorldEdit] If he Can help u make ur plugin work with Worldedit cuz if i built a house out of WorldEdit it would NOT be Protected!

    Well ill be back with more suggestions Later Cheers For All!

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

    cvenomz

    Thanks. As a user, would you prefer an option like 'exclude dirt', or an option to toggle whether the blocks you are placing are being protected or not? I think I am leaning a little more toward the toggle, but I think both would accomplish a similar goal.
     
  7. Offline

    BigBlueGER

    Yep, the toggle is also useful.
    Maybe do both, but prior the toggle =P
    So that it first checks if it is toggled, and if it is, then check if the block got the ID of Dirt, if not, then protect.
    Might be a bit CPU heavy, or?
     
  8. Offline

    tha d0ctor

    How about instead of linking with wordedit (bulky and performance inhibiting) you include it with logblock and just set logblock and set logblock db time to 9999 or something to have blockplacements stored forever
     
  9. Offline

    titog176

    I Agree i must have not Been Awakened Enough to Solve this Mystery But tha d0ctor Good Job using ur Prior Knowledge
     
  10. Offline

    Unscrewed

    Ur spamming this topic a little bit. ;-)
     
  11. Offline

    cvenomz

    Nah, shouldnt be CPU heavy. I like this idea. If people are going to use this plugin and want me to continue development, then I will add this.


    This shouldn't be an issue. It will be easy
     
  12. Offline

    kahlilnc

    Config what blocks can be broken?
     
  13. Offline

    stormtroopercs

    Interesting.. Will watch. Good job so far!
     
  14. Offline

    Zaros

    This plugin looks amazing. I think you should have protection on as the default, because most players don't want others to break their blocks. Also at a later time, permissions should be added so admins can be able to break other's blocks. This is important because of the following:

    Player 1 builds castle
    Player 2 covers castle on obsidian

    Only player 2 (or ops if thats added) could remove the blocks, and most servers have Admins for this. I would really prefer not to make all my Admins OPs.

    I'm watching this thread for now.
     
  15. Offline

    damieng13

    this mod is PERFECT it was exactly what i was looking for a few days ago! ill bookmark this and wait for it to work (and for bukkit to get updated) this is perfect for small servers!... you made my day lol
     
  16. Offline

    phaed

    Sounds exactly like PreciousStones's unbreakable blocks.
     
  17. Offline

    eXecbLue

    Hey cvenomz, just signed up here to say that you should definitely continue this plugin and fix the bugs, specially so database doesnt get corrupt after a restart. This plugin is great and simple, except it lacks this one thing that I already mentioned, I've tried PreciousStones, I didn't have the time to waste to figure out how it all works and how I could make it work the way I wanted. But OwnBlocks does exactly what I need.
    So please cvenomz, fix the saving even if it would be using sqlite or mysql database to save block owners, I really need this plugin functioning properly, it's a big step against griefers.

    Also my other suggestion would be to somehow mark an area that is already owned by other people and which can't be destroyed, and make it that only OP can mark the area.. this for the start would be good, then later you could implement ownership's of the areas.

    Thank you and please keep on developing it.
     
  18. Offline

    Linaks

    Please permissions support because a permissions like "ownblocks.ignore" would be useful for teamusers ;)
     
  19. Offline

    Clancy Dawson

    With the toggle idea, could you link it to iconomy as an option? So that players can decide whether they want to protect there creations or not, like insurance on an RP server, and also act as a deterrent from players abusing this power and using it as a way of griefing? Either turn block protection on for 20 blocks for 100 gold, or 10 gold per protected block for example.

    Also a link to permissions would be awesome.
     
  20. Offline

    cvenomz

    Wow, thanks guys for all the support! I will get working on this in a few minutes.
     
  21. This seems like a perfect anti-grief mechanism, Although, can you create a couple of modes for me? Just to keep donations high on my server;
    mode
    1 - Everybody has "ownblocks.use" (Every block placed is protected)
    2 - Selected people have "ownblocks.100" (100 blocks from a command of /ownblocks start, can be stopped / paused using /ownblocks pause, stop)

    Or allow it so you can predefine differnt modes, eg, 10 permission branches,

    ob.1 - ob.10
    with a config file of:

    ob.1: 10
    ob.2: 15
    ob.3: 55

    Etc...

    I dont know how this would be possible but it would be a fun way to stop greifing.
     
  22. Offline

    cvenomz

    Plugin Updated to v2.0

    See edited top post for complete details, but serialization is fixed. The database is now properly written and read.

    More to come...

    Could you explain a little more what you mean by this?

    I agree, this is a good idea. I hope to add support for permissions eventually. Personally I find the documentation for Permissions pretty lame, but I'll see what I can do


    Thanks for you message. I dont think I understand what you mean by your 'marking' idea though. Players being able to mark their own areas to prevent them from being destroyed?

    I hope to get to this eventually

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

    Blacky372

    I´ll use it if you add a toggle function!
    That is very important!
     
  24. Offline

    kahlilnc

    Can or did you add configurable blocks that can be broken by others?
     
  25. Offline

    TruffleDucks

    You should make it so that certain items are banned from the server, like tnt :D
     
  26. Offline

    eXecbLue

    What I mean is, for OP to be able to select an area of already existing blocks, and make them protected so no one can destroy them.
    In my case, my server already has a lot of buildings and stuff, but this plugin wasn't in place when they're made so anyone can break them.
     
  27. Offline

    cvenomz

    For things that are already existing, you will want to look at Cuboid, WorldGuard, or WorldEdit. They let you protect pre-existing areas (which you select)
     
  28. Offline

    Littlericket

    I hope Permission Support will be added soon.. and OPs cannot destroy blocks of other Players. Probaly a Bug ?
     
  29. Offline

    eXecbLue

    It would still be nice to do it with this plugin, I would prefer it. A lot easier and less hassle to add more useless plugins.
     
  30. Offline

    cvenomz

    I wouldn't call them useless, but fair enough. I will look into it.
    Lol, yeah, not exactly a bug; more like a feature not added yet :)
     

Share This Page