Inactive [SEC/ADMN] OwnBlocksX v0.2.3 - Protect your blocks (MySQL, iConomy 5) [1000]

Discussion in 'Inactive/Unsupported Plugins' started by cvenomz, Jul 10, 2011.

  1. Offline


    OwnBlocksX - (OwnBlocks eXtended)
    Version: v0.2.3

    OwnBlocksX is a branch off the original OwnBlocks plugin. OwnBlocksX is intended to add support for many features which may not be suitable for the original plugin. Such features include MySQL support (completed), iConomy 5 support (completed), and group project support (in progress).

    See original plugin thread for more information

    • Blocks you place cannot be broken by others
    • Ability to exclude certain blocks from being protected
    • Support for Permissions AND non-Permissions servers
    • Add (pre-placed) blocks to the database manually
    Notable Changes:

    -MySQL is now required
    -If you are migrating from OwnBlocks, you will need to convert your database unless you are starting fresh. Here is a helpful link
    -Permissions nodes are now OwnBlocksX.* (note the X)
    -toggle command is now /obx or /ownblocksx
    -New configuration file name and path
    -If you are upgrading from the test builds (OwnBlocksMySQL) then you need to rename your database table from OwnBlocks to OwnBlocksX.If you are using MySQL, the command is:
    "RENAME TABLE OwnBlocks TO OwnBlocksX"

    Download OwnBlocksX v0.2.3
    Source Code
    OwnBlocks is released under the WTFPL License.

    Other Notes:
    If you are having problems, you may need to have the MySQL JDBC driver installed

    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.

    host - enter the MySQL database host. 'localhost' unless you are running the database on a separate server
    databaseName - name of the MySQL database you will use on the MySQL server
    username - the MySQL user with which OwnBlocksX will authenticate with the MySQL database
    password - password for the MySQL user
    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.
    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:
    'OwnBlocksX.ignoreOwnership' - Allows player to break blocks placed by others. This node is typically given to admins.
    'OwnBlocksX.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.
    '' - Allows a player to use the info-tool to display who owns a protected block.
    'OwnBlocksX.add' - Allows a player to use the add-tool to add blocks to the database for protection.


    • Version 0.2.3 (8-7-2011)
      • Fixed another permissions bug (OwnBlocksX.ignoreOwnership) [Thanks MineJob!]
    • Version 0.2.2 (8-7-2011)
      • Fixed permissions bug (OwnBlocksX.use) [Thanks Worlther!]
    • Version 0.2.1 (8-3-2011)
      • Fixed bug where enable-on-login did not function
    • Version 0.2 (7-15-2011)
      • Implemented MySQL connection timeout workaround [Thanks ghost15!]
      • Moved tracking of enabled/disabled players to MySQL
    • Version 0.1.1 (7-11-2011)
      • Added message when player tries to break block not owned by them
    • Version 0.1 (7-10-2011)
      • Initial release
      • Added MySQL support
      • Added iConomy 5 support
    dark_hunter, Lunthus, Hacr and 3 others like this.
  2. Offline


    Looks pro! Just don't know if my survival server will like it or not..
  3. Offline




    Will you be able to make an message when users try to break blocks that are placed by other?


    [playername] owns this block

    or something like that :)
  4. Offline


    updated for this

    And how long does it take until this gets moved to the Releases section? :\
    It only took OwnBlocks a few hours to get moved
  5. Offline


    Can you add support for blocks being moved by pistons?
    Or is it already in it? :D
  6. Offline


    So what happens when a user surrounds another user in blocks, or walls off someone else's house? :S
  7. Offline


    They call an admin. I guess. Or do /spawn or /home or whatever they can.
  8. Offline


    Best plugin ever!

    Thanks man :D
  9. Offline


    There's been a pretty big build up of submissions over the past few days. It usually doesn't take this long :/
  10. Offline


    is it spoused to work automaticly? if it is its not working
  11. Offline


    This might be possible once the piston API events get solidified. Until then, no.
    This. It has also been suggested to add an option to disallow adjacent construction to help mitigate this problem.
    Thanks :)
    You need to set up your MySQL database, and the proper configurations in the OwnBlocksX config file
  12. Offline


    how do i make a data base
  13. Offline


    See if you can find a tutorial. Try some google searches and this
  14. Offline


    how do i make a database?
  15. Offline


    Do you have MySql ?
  16. Offline


    First, sorry for my bad english, i'm from Russia. Second - this is great plugin, thanks a lot for it! But tables in my DB of MySQL don't creating. I was made a user@localhost, db (minecraft) and password. After first starting of minecraft server i was change in "" #MySQL CONFIG with my parameters. After i had see in DB new table with name "OwnBlocksX", but it is null always. Can you help me, please? Where is my trouble, maybe in my hands??? [creeper]

    Hmmmm.... When i was made myself by admin, after push "T" and wrote a "/obx" plugin is starting and wrote me: "OwnBlocks Activated; Blocks you build will be protected". Ok, so what i made wrong? Why simple players can't to use this plugin, they wrote /obx, but nothing happens, no messages from plugin in chat... Help me, please, who know answer on my question.

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


    You can use for example db4free.

    Have u got permissions set right?

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


    Thanks ofr making this plug in, youve releave me from people always griefing in my server :) but now since the new update with pistons, griefers are getting smarter, with pistons they can now use that to break into peoples houses and use it to ruin people creations:( is there a way to stop this from happening if not, for the next update of this plug in is it possible to add this feature in?
  19. Offline


    You must add the permissions node 'OwnBlocksX.use' to the default user in your Permissions configuration
    No piston related features will be able to be added until after the bukkit API has added support for them
  20. Offline


    It do doesn't automatically, when i connect and types /obx it's says "Owblocks enabled", and i'm pretty sure my config file i right. Would be nice if it was impossible for the user to turn of Ownblocks, maybe you can add that? :)
    I_ndex likes this.
  21. Offline

    IOn Vash

    Is there a way to port the old format to mysql? Because if there isn't I cant switch to this or everyone will lose protection on the stuff they built.
  22. Offline


    This looks good, Im wondering how the iconomy plays into this tho, is it like u pay to place blocks down, or pay to toggle this on or off.

    Im wondering if it would possible to Sell the stuff you place with this like say u build a house you could Sell that house.

    Also I need the Group support so I'm waiting on that feature. :)
  23. Offline


    Yep, cvenomz wrote a converter, Here is a snipped version of his reply w/ information on migration:
  24. Offline


    Shhhhhh! just dont tell them that OwnBlocksX is on your server lol
    iConomy is currently set as a pay-to-place blocks. Selling stuff would be complicated, but its a cool idea. I didnt think of that
  25. Offline


    What if i used OwnBlocks 0.2.1 before with MySQL and I dont want to loose my previous database?
  26. Offline


    Why dont it enable automaticly?

    I have set it to enable at log in. Strange... ?
  27. Offline


    Check out the Notable Changes section in the original post. Namely, you will need to rename the database table, and move your configurations to the new config file. However, nothing changed regarding the guts of the database, just the names. Let me know if you are having trouble.
    There is an option in the configuration file: enabled-on-login. just set it from false to true and everyone will have OwnBlocksX enabled by default upon logging into the server
  28. Offline


    #Set whether OwnBlocks is activated on player login (enabled by default) or if
    #players must enable OwnBlocks themselves (disabled by default)
    It still dosent activate automaticly at log in?
  29. Offline


    Hi Cvenomz,

    Looks like you have a issue that I seem to find a lot with plug-ins that go to MySQL,

    It seems that after the initial mysql connect, the code doesn't check to make sure its still open. Eventually that initial connection will time out, and then you get the error below.

    Simple solutions, check connection state and reconnect if needed, or make and close connections as needed (this one probably isn't as good of an idea for this plugin)


    Show Spoiler

    2011-07-15 10:00:38 [SEVERE] [OwnBlocksX] Failed to get block. Probably SQL error
    2011-07-15 10:00:38 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    The last packet successfully received from the server was 47,723,177 milliseconds ago. The last packet sent successfully to the server was 0 milliseconds ago.
    2011-07-15 10:00:38 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-07-15 10:00:38 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-07-15 10:00:38 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-07-15 10:00:38 [SEVERE] at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.SQLError.createCommunicationsException(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.MysqlIO.sendCommand(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.StatementImpl.executeQuery(
    2011-07-15 10:00:38 [SEVERE] at me.cvenomz.OwnBlocks.MysqlDatabase.getBlock(
    2011-07-15 10:00:38 [SEVERE] at me.cvenomz.OwnBlocks.MysqlBlockListener.onBlockBreak(
    2011-07-15 10:00:38 [SEVERE] at$35.execute(
    2011-07-15 10:00:38 [SEVERE] at org.bukkit.plugin.RegisteredListener.callEvent(
    2011-07-15 10:00:38 [SEVERE] at org.bukkit.plugin.SimplePluginManager.callEvent(
    2011-07-15 10:00:38 [SEVERE] at net.minecraft.server.ItemInWorldManager.c(
    2011-07-15 10:00:38 [SEVERE] at net.minecraft.server.ItemInWorldManager.a(
    2011-07-15 10:00:38 [SEVERE] at net.minecraft.server.NetServerHandler.a(
    2011-07-15 10:00:38 [SEVERE] at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
    2011-07-15 10:00:38 [SEVERE] at net.minecraft.server.NetworkManager.b(
    2011-07-15 10:00:38 [SEVERE] at net.minecraft.server.NetServerHandler.a(
    2011-07-15 10:00:38 [SEVERE] at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    2011-07-15 10:00:38 [SEVERE] at net.minecraft.server.MinecraftServer.h(
    2011-07-15 10:00:38 [SEVERE] at
    2011-07-15 10:00:38 [SEVERE] at
    2011-07-15 10:00:38 [SEVERE] Caused by: Software caused connection abort: recv failed
    2011-07-15 10:00:38 [SEVERE] at Method)
    2011-07-15 10:00:38 [SEVERE] at Source)
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.util.ReadAheadInputStream.fill(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(
    2011-07-15 10:00:38 [SEVERE] at
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.MysqlIO.readFully(
    2011-07-15 10:00:38 [SEVERE] at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(
    2011-07-15 10:00:38 [SEVERE] ... 22 more

  30. Offline


    Thanks for pointing this out AND for providing potential solutions :D
    I remember getting this problem in another plugin I wrote a few weeks ago. I wasnt sure if it was plugin-specific, or a "global" issue. Now I know. I added code that makes the server reset the MySQL connection every hour. This should resolve the issue. Later I hope to implement checking to make sure the connection is still valid when interfacing with the database, per your suggestion.

    Thanks man

Share This Page