[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

    cvenomz

    Yes, this is coming
    Can you please provide a server log, as well as your OwnBlocks and Permissions configurations?
    Thanks, Ill update the thread title
     
  3. Offline

    FatalNickle

    Im using bukkit 766. iConomy 5.0, Latest build of Permissions, and its only protecting Ops, says on init that permissions plugin is not found, defaulting to OP. Permissions works fine, i even added the permission node to users, it still doesnt work for them. But, isn't it supposed to not have to use permissions too..? Im not charging people for protection, So I just want it on, all the time, for everyone. Not just ops. Help please !

    EDIT: If I could suggest, an option to use permissions in the config would be nice. Since apparently it can't see my install of permissions.
     
  4. Offline

    seem

    HELP!!!!!!
    My plugin have a big error:
    16:22:38 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'ob' in plugin OwnBlocks v9.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:85)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:278)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:682)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:645)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:639)
    at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:32)
    at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:372)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:287)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.NullPointerException
    at me.cvenomz.OwnBlocks.OwnBlocks.togglePlayer(OwnBlocks.java:181)
    at me.cvenomz.OwnBlocks.OwnBlocks.onCommand(OwnBlocks.java:201)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    ... 12 more
     
  5. Offline

    cvenomz

    Thanks for the feedback. I recall another user having a similar issue. The problem is that OwnBlocks v9.0 does not work with the latest version of Permissions yet.

    Thanks for the stack trace. Could you please describe what happened to cause this error? as well as a server startup log?
     
  6. Offline

    FatalNickle

    Sooo there should be a toggle to use it or not use it :) Especially if its a version error. I run this on my server, and its great, but only ops sad :( Can you make like.. a v9.1 that can ignore permissions? And just default admins being able to ignore? And keep the other options you have?
     
  7. Offline

    seem

    So i have a normal linux root with debian. I run bukkit (766) an v9.0 of own block. I start the Server and then come :
    2011-05-16 19:00:41 [INFO] [OwnBlocks] Database read in from file

    But when i type : /ob in the chat then come the errormessage.
     
  8. Offline

    cvenomz

    This should already be the case. If OwnBlocks cannot detect permissions, it falls back on whether the player is an OP or not.

    What is the username of the player who enters this and causes it to crash? Are you typing it into the server console?

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

    FatalNickle

    Thats what I mean, I dont want it to default to OP's for use, I want everyone's blocks to be protected no matter what.
     
  10. Offline

    seem

    its "seem2810". Thats me.
    I've test it with an other account.

    But why do you need the Nickname?
     
  11. Offline

    RTRD

    @cvenomz This does not work:
     
  12. Offline

    Eth0

    Hi again.

    well.. i installed this addon and i works fine. for 5-6 days. then it come with a error and wont start up.
    i deleted it and installed a new one. (both was same version come this site) and again it works. now its 6 days sinse i installed it and quess what. it broke down again :/ what is happening?
     

    Attached Files:

  13. Offline

    KimKandor

    If you've had a crash, or had to stop the server anyway other that inputting the "stop" command, the ownblocks database file can become corrupt or even blank, check that it actually has some size other than 0. You might need to restore it from a backup, you do have those right? :) The file is /plugins/OwnBlocks/Database.db .
     
  14. any way to disable the message it prints on login? my server does not need more spam during login pls :( and the config is only for the messages returned by using the command, not for the login msg.
     
  15. Offline

    PhantomGamers

    Would be neat if players could specify 'friends' that can modify their blocks.
    This plugin would be great to stop griefers, but at the same time hinders the ability to make projects as a group.

    Also, how does this handle chests?
     
  16. Offline

    FatalNickle

    No, I mean I dont want it to default back to just op's. I want all player's blocks protected.
     
    TheMonsterNOR likes this.
  17. Offline

    TheMonsterNOR

    1.
    when will there be any update?
    2. Can you Please Make Ownblocks for Everyone and OPS Get To Destoy anyones stuff.
    Thank You!
    Really Need this!
     
  18. Offline

    BoKx

    "configuration option to set whether OwnBlocks is automatically enabled for players by default on login"
    or "tool to add pre-built blocks to the database"
    anytime soon?

    great plugin nonetheless!
    I hope you continue working on this :D

     
  19. Offline

    cvenomz

    Ohhhhhhhhh. I get it. Good idea, never thought of that.
    Regarding friends and groups: working on a solution for that problem. Regarding chests: It should allow anyone to access the chest and what it contains, but not allow them to break it.
    1. If everything worked out nicely, this weekend may look feasible.
    2. I will see if I can add this feature in the next release.
    As previously mentioned, it is likely you had a bad shutdown and it is corrupted. I also plan to fix the method OwnBlocks writes to disk to fix this problem.
    I wanted to make sure there werent any funny characters of anything that would throw an exception in the code. No idea why this is happening to you; I will need more information to try to piece together what is going on.
    Ok, I will take another look at it and see where the problem is in the code.
    Sure, that is on my ToDo list.
    Yes, hopefully soon
     
  20. Offline

    PhantomGamers

    Awesome! :)


    Any chance this will be changed in the future? People stealing diamonds out of chests is quite a popular method of griefing :S
     
  21. Offline

    cvenomz

    You bring up a good point. Being a protection plugin, protecting chests would make sense... I wont be able to do anything about it for the next update, but I will see what I can do about chest protection. Good idea.
     
    TheMonsterNOR likes this.
  22. Offline

    PhantomGamers

    Okay. Sounds good. :)
    Would also be nice if the chest protection worked with the 'friends' system too! So friends/groups can share chests.
     
    TheMonsterNOR likes this.
  23. Offline

    KimKandor

    wow, great ideas from everyone, but I wonder if ownblocks should try to be a "do all" plugin, there's already a lot of ways to lock chests with such things as lockette, lwc, worldguard, essprotect signs and a few more. Just having players owning the blocks and keeping the plugin trim seems a huge plus to me. Anyway nice job and great to see you're looking at adding a few features (hint: metadata values) :p
     
  24. This plugin would not benefit from being a LWC rip.

    There are far too many plugins which lock chests, it's sorta annoying!
     
  25. Offline

    seem

    I have change the permission from the file to 0755 and now it works :D
     
  26. Offline

    RTRD

    Ok, cool! :)
     
  27. Offline

    PhantomGamers

    Yes, but this plugin is so players OWN their blocks.
    Is a chest not a block?
    Players should be able to own their chests too :p
     
  28. Offline

    KimKandor

    Well, continuing that logic they should own their doors also ... which means more locks ... I believe owning as far as breaking them is concerned is enough but that's just IMHO.
     
  29. Offline

    PhantomGamers

    Hell, doors would be cool to own as well...
    Though that isn't necessary if every other block is ungriefable, then griefers can't do anything by opening a door.
     
  30. Offline

    cvenomz

    Aha, I would not have guessed. Good to know; thanks for posting back your solution :)
    Yes! I was hoping someone would feel the same way. I think I may end up something like an "OwnBlocks Basic" and an "OwnBlocks Extended" where the basic version would be as easy as a copy into your plugins dir and you are good to go, and the extended would allow for all these extraneous features.
    (metadata now added to my ToDo)

    @RTRD: Found the problem: Verb tenses. The config file tells you to say "disable" while the code is looking for "disabled". Sorry about that. This will be remedied in the next version :] So, in the meantime, use "disabled".

    Hey! Here is v10.0 (*Testing*). I tested it myself, and everything seems to be working correctly. Please let me know how it works. If there aren't any problems, then I will add it up to the official list. New stuff:
    • Add configuration option to set whether OwnBlocks is automatically enabled for players by default on login
    • Add tool to add pre-built blocks to the database
    • Improve process of writing database to file.
    • Fix status-message=disable
    • Default to protecting all blocks when permissions is not detected
    new node: 'OwnBlocks.add'
    due to problems upgrading iConomy, OwnBlocks still only supports version 4.6

    EDIT: Also, if you test this, and dont like the way certain things are implemented, let me know. For instance, if you want a different message when adding blocks, or Left click instead of right click, (or something completely different) let me know. If I like your idea more than mine then I will change it :)

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

    KimKandor

    You forgot to add the default OwnBlocks.properties to the jar with the updates.
     

Share This Page