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


    I'm found some bug.
    -> Ability to exclude certain blocks from being protected - this feature isn't work.
  3. Offline


    So... if I've banned a player from my server and he owns blocks. How do I "un-own" them so others can claim them?
  4. Offline

    IOn Vash

    This plugin is causing constant block lag that is really bad can you fix that please?
  5. Offline


    well do you use authme or Xauth if you do en you un-register the players the blocks automatically will be un-ownd if you dont have those.
    i have no freaking idea.... sorry

    Show Spoiler
    [SEVERE] [OwnBlocksX] Cant initialize MySQL
    2011-08-08 17:14:58 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

    The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    2011-08-08 17:14:58 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-08-08 17:14:58 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.SQLError.createCommunicationsException(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.MysqlIO.<init>(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.ConnectionImpl.coreConnect(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.ConnectionImpl.createNewIO(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.ConnectionImpl.<init>(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.JDBC4Connection.<init>(
    2011-08-08 17:14:58 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-08-08 17:14:58 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.ConnectionImpl.getInstance(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.NonRegisteringDriver.connect(
    2011-08-08 17:14:58 [SEVERE] at java.sql.DriverManager.getConnection(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at java.sql.DriverManager.getConnection(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at me.cvenomz.OwnBlocks.MysqlDatabase.establishConnection(
    2011-08-08 17:14:58 [SEVERE] at me.cvenomz.OwnBlocks.OwnBlocks.yesMysqlEnable(
    2011-08-08 17:14:58 [SEVERE] at me.cvenomz.OwnBlocks.OwnBlocks.onEnable(
    2011-08-08 17:14:58 [SEVERE] at
    2011-08-08 17:14:58 [SEVERE] at
    2011-08-08 17:14:58 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(
    2011-08-08 17:14:58 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(
    2011-08-08 17:14:58 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(
    2011-08-08 17:14:58 [SEVERE] at net.minecraft.server.MinecraftServer.e(
    2011-08-08 17:14:58 [SEVERE] at net.minecraft.server.MinecraftServer.a(
    2011-08-08 17:14:58 [SEVERE] at net.minecraft.server.MinecraftServer.init(
    2011-08-08 17:14:58 [SEVERE] at
    2011-08-08 17:14:58 [SEVERE] at
    2011-08-08 17:14:58 [SEVERE] Caused by: Connection refused: connect
    2011-08-08 17:14:58 [SEVERE] at Method)
    2011-08-08 17:14:58 [SEVERE] at Source)
    2011-08-08 17:14:58 [SEVERE] at Source)
    2011-08-08 17:14:58 [SEVERE] at Source)
    2011-08-08 17:14:58 [SEVERE] at Source)
    2011-08-08 17:14:58 [SEVERE] at Source)
    2011-08-08 17:14:58 [SEVERE] at Source)
    2011-08-08 17:14:58 [SEVERE] at<init>(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at<init>(Unknown Source)
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.StandardSocketFactory.connect(
    2011-08-08 17:14:58 [SEVERE] at com.mysql.jdbc.MysqlIO.<init>(
    2011-08-08 17:14:58 [SEVERE] ... 27 more

    2011-08-08 17:15:32 [SEVERE] Error occurred while disabling OwnBlocksX v0.2.3 (Is it up to date?): null
    at me.cvenomz.OwnBlocks.MysqlDatabase.closeConnection(
    at me.cvenomz.OwnBlocks.OwnBlocks.onDisable(
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(
    at org.bukkit.plugin.SimplePluginManager.disablePlugins(
    at org.bukkit.craftbukkit.CraftServer.disablePlugins(
    at net.minecraft.server.MinecraftServer.stop(

    i get this error when i installed ownblocksX
    any idea?

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


    As soon as you make it so that you can roll people back, I'll be using your plugin on my BIG server and make people wanna use your plugins even more!
  7. Offline


    This is the beauty of MySQL. You can totally bypass the plugin and edit the database in necessary. Open a terminal and open a connection to your MySQL server. 'Use' your database, then just enter
    DELETE FROM *table_name* WHERE owner=*banned_player_name*
    Block lag doesnt seem to be a common issue at all, so my guess is that there is a problem with your MySQL server.

    It cant connect to your MySQL server. Make sure it is running, and that all the information you provided in the config file is correct.

    For the ability to rollback changes, see the plugin BigBrother. If you just want to be able to remove/edit protection on certain blocks, then use MySQL commands to edit the database
  8. Offline


    it doesn't work for me anymore (it did before)
    i get an error:

    02:26:31 [SEVERE] Could not pass event PLAYER_JOIN to OwnBlocksX
    at me.cvenomz.OwnBlocks.MysqlDatabase.getPlayer(
    at me.cvenomz.OwnBlocks.MysqlDatabase.hasPlayer(
    at me.cvenomz.OwnBlocks.OwnBlocks.addPlayer(
    at me.cvenomz.OwnBlocks.MysqlPlayerListener.onPlayerJoin(MysqlPlayerList
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    at net.minecraft.server.ServerConfigurationManager.c(ServerConfiguration
    at net.minecraft.server.NetLoginHandler.b(
    at net.minecraft.server.NetLoginHandler.a(
    at net.minecraft.server.Packet1Login.a(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(
    at net.minecraft.server.NetLoginHandler.a(
    at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
    at net.minecraft.server.MinecraftServer.h(
  9. Offline


    @FuturaEX: Is this a recurring error? Are you getting any other errors before this one? Can you try restarting your server?
  10. Offline


    I want to start by saying Ownblocks is an AWESOME addon and I have had great luck with it, to an extent.. I run a 60 slot server, but only ever really get 40 people on. I initially started with an older version of ownblocks, not using mysql. This was working great until all of a sudden I noticed severe block lag. Unfortunately I had to remove this, which fixed my lag issue, but I decided to try OBX..

    I upgraded to OBX and am now using a mysql server setup through my host. Again obx worked great for a week or so, then I noticed as I get more and more block edits, I notice the lag getting worse and worse. It got the point where it was almost unplayable. I have since removed OBX and the lag is completely fixed, although I don't understand why this is happening. Everything I read here indicates that the MySql Server should have no problem keeping up, but that obviously isn't the case.. I am not sure what the server says when loading exactly, i do know it mentions that it's using mysql for OB, and no apparent errors..

    Any ideas? As not having protection is no fun, but it gets unplayable.. Thanks for the help!

    One other thing I wanted to mention is that my "builders" had the old permissions Ownblocks.use, and when we upgraded to OBX, the permission wasn't set to OwnblocksX.use but they were still being protected... Why is that?
    Mercury likes this.
  11. Offline


    It would be nice if you could add way to add all non air blocks inside of a cuboid instead of having to click every block.
  12. Offline


    What in the world is mysql? And how do I use it with this plugin? Is there a guide out there or something? This plugin is a little too smart for me. I'm too stupid for this one lol
    kaise123 likes this.
  13. Offline


    Is there any way to use this without mysql, because i have no idea what Mysql is or how to set it up as my server is running on LAN on a laptop with no internet access and i think that mysql needs internet, am i correct? anyhow when i try to use it i get a lot of errors about mysql.

    Also could you give the link to the developer of CraftBukkitUpToDate please?
  14. Offline


    I have same problem but with 10 players. Running this plugin over 1 month (0.2.1 before with MySQL). After server restart it is better but after few hours it starts to lag again.
  15. Offline


    When I start my server, I get:
    13:31:53 [SEVERE] [OwnBlocksX] Cant initialize MySQL
    I have no idea how to use MySQL, any help is appreciated.
  16. Offline

    King Pyro

    Hello i run a small server. My problem is that for permissions its not letting my builders use OBX. I tried giving them all nodes (OwnBlocksX.*) but it still wont let them. then i tried on the default "player" account by giving that player commands to everything( '*' ) and it lets them use it. i tried giving the builders the use and info ones but it does not work only when they have commands for everything. please help me
  17. Offline


    We have a pretty big server and I have been reading through this thread and the old thread. The helpful link you posted in the First post doesn't seem to work.

    Can we PLEASE get a quick walkthrough of upgrading and converting our flatfile to a DB? I know how to create a DB and connect to it and all that but the conversion process is very fuzzy here.

    Do we need to install OBX while we have OB installed and then run the conversion? Any help here would be greatly appreciated :)
  18. Offline


    I tried using this plugin together with Bigborther and it started lagging with 20 people where I can normally handle 120 people. When I removed the plugin I could handle 120 again so there might be something wrong with the plugin?

    I want to add that the plugin does work on MySql but it's just the lag...

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

    King Pyro

    Never mind i figured out why i it wasnt deleteing the blocks from database and sed it still owned the co ordinate...worldedit superpickaxe lolz. also is there a way to stop worldedit from getting thru? please reply with an answer
  20. Offline


    tnx, im love this plugin but can you add please a command to "add friend" that can destroy your buildings?
  21. Offline


    Having some lag,ive had this problem before and its when the database gets around 30 mb the server starts to lag.It happen with ownblocks then I switched over to ownblocksx and now its starting again. Please help.
  22. Offline


    I thought that MySQL would solve the performance issue. Apparently not. At this point in time I dont think I really have any good advice.
    I agree
    MySQL is a database backend. It manages databases for other programs and users. The set up of a MySQL server can get a little complicated for admins that haven't dealt with SQL stuff before.
    MySQL does not require internet, however, regardless, see the previous plugin OwnBlocks (link at the top of the original post) for similar functionality without the need for MySQL

    (Also see my response to Tr33x0rs above). Yes, I believe you guys. I just really thought that MySQL would have been able to handle the load. :\ I hope I dont have to write my own database backend...because I dont think I have the time for that.
    Then you probably dont have a MySQL server set up. See the link for OwnBlocks at the top of the original post. This is a link to the older plugin that doesnt require MySQL.
    Try upgrading to the latest version, and then give them "OwnBlocksX.use"
    helpful link. This talks about the migration. You dont need OBX installed, you just need the MySQL server to be running. The conversion tool should prompt you for all the MySQL information and such
    It seems that BigBrother puts much less of a load on the MySQL server than OwnBlocksX. I do kinda wonder why...
    I think it is more of a limitation of MySQL rather than "something wrong" with this plugin. However, yes, OwnBlocksX would seem to be the cause of the lag you are experiencing
    Not that I know of off the top of my head. I would have to look at the code for how the superpickaxe works.
    If I can find the time to do it, group project support is the next big feature to be added
    At the moment we are not sure of a solution for this

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


    I have modded this plugin to work with the latest dev build of iConomy 6. If anyone is interested let me know. (hope author doesn't mind :p)
  24. Offline


    DAYUM! You did a lot of replies
  25. Offline


    That's awesome. I dont mind at all, thats why I made the source availible in the first place, and published it under the WTFPL license (click the WTFPL link in the original post and you will see what i mean). Actually, it would be awesome if you could do a pull request, so we could merge your mod into the main project.
  26. Offline


    @cvenomz - Running LogBlock & OwnBlocks in parallel is heavy task for my server. I wonder if someone could rewrite OwnBlocks into LogBlock so server don't have to log everything twice.

    That would be amazing.
  27. Offline


    Good idea, I'll have a look at LogBlock source (and OwnBlocks source) to try and combine the two. Might take a little while to go through though.
    Also, I'll be happy to push the iconomy 6 changes, however i've also modded it to be compatible with SuperPerms (Bukkit permissions) and removed permissions 3 support. I can take it out and only push iConomy changes if you would prefer.

    EDIT: I'm still looking into it, might be possible, but the logblock and OwnBlock table would have to be kept separate (logblock wipes it's database periodically). I could still share the mysql that logblock makes, meaning one less connection :D.
    Also, for this to work LogBlockCreations in your LogBlock/world.yml must be enabled. HOWEVER, the data from LogBlock cannot be used as this table is wiped, which means that your database will get quite large in size. I guess this is unavoidable, and in the case of OwnBlocksX (which currently has to store EVERY single protected block as a separate entry from every single player) it is necessary.

    The only problem I've seen with the mod so far is that in within an hour of having it on my server, there were literally thousands of database entries. Looking for a way to avoid this would be interesting.

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

    King Pyro

    thanks cvenomz you helped me with my problem about the permissions and it not working for people. thanks again

  29. Offline


    Why the hell i have to use OwnBlocks.use permission instead of OwnBlocksX.use to make this work? Well, /obx cmd still works, but console spams "[SEVERE] Nag author: 'TheNo1Yeti' of 'Permissions' about the following: This plugin is not properly shutting down its async tasks when it is being reloaded". I'm sure there are no errors in permission groups.yml

    any suggestions?
  30. Offline

    IOn Vash

    Every time a player breaks a block the server lags really bad and mysql maxes out on CPU. How can I fix this?
  31. Offline


    Update to the latest version. About the async, it seems to me that means the MySQL server can't keep up with the requests

    There does not seem to be an easy fix at this point in time

Share This Page