[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

    KimKandor

    Saplings have added values now regular is o6 but how to add damage values such as 6,1 6,2 ?

    I know it's bad form to post twice in a row, but could you add a toggle to the config so we can set default to off instead of on? Players will be protecting everything without thinking about it.

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

    Ukito

    How to install it?

    Code:
    22:05:57 [SEVERE] Could not pass event BLOCK_BREAK to OwnBlocks
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
            at me.cvenomz.OwnBlocks.OwnBlocksBlockListener.onBlockBreak(OwnBlocksBlo
    ckListener.java:42)
            at org.bukkit.plugin.java.JavaPluginLoader$33.execute(JavaPluginLoader.j
    ava:400)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:257)
            at net.minecraft.server.ItemInWorldManager.d(ItemInWorldManager.java:156
    )
            at net.minecraft.server.ItemInWorldManager.b(ItemInWorldManager.java:118
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:434)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    22:05:59 [SEVERE] Could not pass event BLOCK_BREAK to OwnBlocks
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
            at me.cvenomz.OwnBlocks.OwnBlocksBlockListener.onBlockBreak(OwnBlocksBlo
    ckListener.java:42)
            at org.bukkit.plugin.java.JavaPluginLoader$33.execute(JavaPluginLoader.j
    ava:400)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:59)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:257)
            at net.minecraft.server.ItemInWorldManager.d(ItemInWorldManager.java:156
    )
            at net.minecraft.server.ItemInWorldManager.b(ItemInWorldManager.java:118
    )
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:434)
            at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
            at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    >
     
  4. Offline

    habbah

    works perfect but can you add a warning when players dont have enough funds? "You Dont Have Enough Money To Place This Block It Costs (amount). and you only have (amount)" ???
     
  5. Offline

    ShredxD

    How to install it?
    I need help in permissions :S
     
  6. Offline

    Splaat

    Do I have to use FakePermission to get the protection to work? Cause FakePermission causes the Nethrar to fail, the portal won't work every time FakePermission is installed..
     
  7. Offline

    Azukay

  8. Offline

    KimKandor

    Fake permissions as well as GroupManager itself from the forums have not been updated. If you're using Essentials, use the jars we supply for those things. Otherwise what Azukay said will work fine as well.
     
  9. Offline

    ShredxD

    Wonder if you can set up some objects to be broken and not others, and my other problem is, I can not put the moderator (admin) to break what others build
     
  10. Offline

    killj0y

    In order for your mods or op or anyone to break other blocks people have placed you must download a "Permissions" plugin. The one i use is http://forums.bukkit.org/threads/ad...ow-with-real-multiworld-permissions-740.5974/ Once downloaded and installed simply add the node 'OwnBlocks.ignoreOwnership' for the group members you want to allow to break anything.
     
  11. Offline

    cvenomz

    Alright, try this: v6.3 If there arent any problems then v6.3 should be ready for stable release

    And yes, as mentioned by Azukay and killj0y, you must have Permissions installed for OwnBlocks to properly work
     
  12. Offline

    habbah

    Code:
    2011-04-29 11:03:00 [SEVERE] null loading OwnBlocks v6.3 (Is it up to date?)
    java.lang.NullPointerException
        at me.cvenomz.OwnBlocks.OwnBlocks.readProperties(OwnBlocks.java:273)
        at me.cvenomz.OwnBlocks.OwnBlocks.onEnable(OwnBlocks.java:121)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:127)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:632)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:218)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    
    cb733
     
  13. Offline

    cvenomz

    Whoops, simple fix I think: v6.4
     
  14. Offline

    stellarfirefly

    Major feature request: Group-based permissions. Protected blocks are marked as owned by a group, and members of that group may destroy them. If the creator does not belong to a group, i.e. is only part of "default", then permissions default to player-only.

    On my server, there are many group projects. Per-player protection won't work.
     
  15. Offline

    habbah

    works perfect! but you should put a space between the insefficant funds message at the end it. it goes " you Only Have2.0" instead of "you Only Have 2.0" and maybe put it as red.

    also would be cool if we could make our own isefficant funds message in the config file,
     
  16. Offline

    cvenomz

    Yes, I like this. I am trying to figure out how to implement this though

    Fixed, and updated to v6.5
    Yes, I was thinking about this. Maybe I will add it sometime in the near future. I added a donate button in case you still felt like donating, but of course, don't feel pressured.
     
  17. Offline

    Ukito

    How to make the plugin work without Permissions? if its posible
     
  18. Offline

    Azukay

    With the Essentials' GroupManager plugin (I think) there is an in-game command to add people to different groups. Towny uses something similar I think.

    Probably something along the lines of "if no permissions detected, default enable OwnBlocks to players and default admin break blocks to Ops" (built into the plugin code). Otherwise you need some form of permissions plugin to run this :)

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

    Ukito

    How get from plugin information what i have to setup in permissions plugin?
     
  20. Offline

    killj0y

    From the first post...

    The only permission is to allow people to break all blocks..

    Permissions Integration - Add the node 'OwnBlocks.ignoreOwnership'
     
  21. Offline

    habbah

    this is not a 100% foolproof way t protect your blocks for some reason not all blocks are getting protected... ;{
     
  22. Offline

    Mook

    Is that anyway to check who the user is on the protected block? - aka whack it once with a iron axe?

    If not, could this be a feature request?
     
  23. Offline

    killj0y

    Explain what you mean?

    I have a world running have had over 250 users log in and build in the past 72 hours while running this mod. Not one act of grieving as been reported
     
  24. Offline

    habbah

    give it some time they will come it works well at first but now im getting reports of greifing and have seen it with my own eyes

    maybe because my server crashed once... if it doesent save right after the block is placed and only when the server stops this would be why

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

    akrieger

    FakePermission shouldn't cause Nethrar to fail anymore - I removed the default dependence on Permissions, and it must be explicitly set to use Permissions now.
     
  26. Offline

    spunkiie

    Can I import my database (flatfile) from PreciousStone ?
     
  27. Offline

    AmazingHayman

    Could you add a permission node for the ability to use that plugin?
    Only want that Admins can set such blocks.
     
  28. Offline

    killj0y

    My server has crashed once also but blocks are still 100% protected even with my sever being full almost 24/7
     
  29. Offline

    Dalton Just

    So, how do I get this to work?

    I just put it in and in game it says my blocks are being protected but people can smash them.
    :confused:
     
  30. Offline

    cvenomz

    That would do it. Any unclean shutdown can cause data loss. I plan to add a feature later to mitigate this.
    Currently there is not such feature implemented. I dont even know what PreciousStone is. Ill have to take a look.
    Sounds reasonable.
    Sounds like the plugin isnt actually enabled. Please check that you have OwnBlocks installed, as well as Permissions. If you ensure both are installed, yet it still doesnt work, please post your server startup log
     
  31. Offline

    Lynxdragon

    There is a problem with persistence in 740, Updated the server and it created a new database. This is getting tiresome, everyone on my server will need to re-build again because protection is gone.
     

Share This Page