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

    cvenomz

    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

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

    Changelog:

    • 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

    ghost15

    No Problem, I've been 'troubleshooting' another problem I've noticed with the move to mySQL. I think i've narrowed it down, but here is the Problem with what I've discovered/tested.

    Issue: When Destroyed blocks that I own, the block re-appears for a few seconds and then disappears correctly. (The same issue when you have server lag)

    Tests/Troubleshooting:

    • Destroying the block and moving on to the next always works, the server always shows the block but then destroys it a moment later.
    • Happens 90%+ of the time when it's a block I own (Protected)
    • Rarely happens <5% when I break a 'neutral' block (one seeded by the game initially)

    My *guess* is the 'hold up' might be a delete SQL Command (as I have 100k + protected blocks in my database). If possible that should be moved to a 'background worker thread' as this isn't really time sensitive to the destruction of the block. Although this could open up a run-condition where thread A hasn't deleted the block yet but Thread B is trying to add the block the user just placed over the one they destroyed. I think this is very unlikely since Thread A should just instantly run the SQL command, which should be faster than any human could re-place a new block.

    This one might be a hard one to track down, hope this might help give you some insight. let me know if you want me to test/try anything else.

    Note: this was with version 0.1.1 , I will upgrade to 0.2 now
     
  3. Offline

    IOn Vash

    Umm well from my calculations the converter program is doing about 20,000 entries a day and that means it will take.... around 80 days to finish... umm ya... somehow i think im not gonna be upgrading to this plugin. not until 1.8 anyway.
     
  4. Offline

    Guniv

    still no group support?
     
  5. Offline

    ledhead900

    Should give it some thought I been thru around all the region type protection and I did not regions I just wanted blocks to be sellable when ur done building or maybe even rentable space that would not intterfear with the current Faction plugin build rights/Territory
     
  6. Offline

    Hacr

    Code:
    #Set whether OwnBlocks is activated on player login (enabled by default) or if
    #players must enable OwnBlocks themselves (disabled by default)
    enabled-on-login=true
    
    It still dosent enable on login ? Help me :(
     
  7. Offline

    Docxx

    Hello, apologies if the answer is obvious. I'm pretty crap when it comes to MySQL but when we try to install this plugin on our server it throws up an errors and I don't believe a Table is being created or is that something we need to do ourselves? If so how do we go about it, I created a table called OwnBlocksX bit it still did not work.

    Here is the error we are getting:

    Show Spoiler

    2011-07-15 16:53:42 [SEVERE] [OwnBlocksX] Failed to get block. Probably SQL error
    2011-07-15 16:53:42 [SEVERE] java.lang.NullPointerException
    2011-07-15 16:53:42 [SEVERE] at me.cvenomz.OwnBlocks.MysqlDatabase.getBlock(MysqlDatabase.java:92)
    2011-07-15 16:53:42 [SEVERE] at me.cvenomz.OwnBlocks.MysqlBlockListener.onBlockBreak(MysqlBlockListener.java:39)
    2011-07-15 16:53:42 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader$36.execute(JavaPluginLoader.java:490)
    2011-07-15 16:53:42 [SEVERE] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    2011-07-15 16:53:42 [SEVERE] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.ItemInWorldManager.c(ItemInWorldManager.java:157)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.ItemInWorldManager.a(ItemInWorldManager.java:44)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.EntityPlayer.m_(EntityPlayer.java:103)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.World.entityJoinedWorld(World.java:1190)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.WorldServer.entityJoinedWorld(WorldServer.java:48)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.World.playerJoinedWorld(World.java:1172)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.World.cleanUp(World.java:1102)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:447)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    2011-07-15 16:53:42 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)



    This is the Config (minus some details for obvious reasons). Unsure if the Port needs to go in there somewhere

    Show Spoiler

    #OwnBlocks Properties File

    #MySQL CONFIG
    host=sql.minecraft.cm
    databaseName=mccraig
    username=******
    password=***********

    \n#Exclude certain items from being added to the database when a player places them.
    #Please note this does not retro-actively affect the database. (comma separated; no spaces)
    #This default excludes Dirt(03), Sand(12), and Saplings(06) from being added to the database
    exclude=03,12,06


    #To charge players a basic rate to their iConomy accounts, enter the amount (Integer)
    #that you wish to charge them per block they protect. Values <= 0 disable iConomy
    iConomy=0

    #Debug mode
    debug=false

    #status-message is the message sent to players telling them when OwnBlocks has
    #been activated or deactivated for them. Options are: [enable, disable, simple]
    status-message=enable

    #Id of material that when used will display the owner of a placed block.
    #default value is 269, which is a wooden shovel
    info-id=269

    #Id of material that when used will add block to the database to be protected
    #default value is 268, which is a wooden sword
    add-id=268

    #Set whether OwnBlocks is activated on player login (enabled by default) or if
    #players must enable OwnBlocks themselves (disabled by default)
    enabled-on-login=true



    Many thanks for any help, waiting for this plugin to open up our Freebuild world :)
     
  8. Offline

    Shwazzers

    If this works, that'd be great and sorry about this post:
    Just a suggestion, but support for worldedit and lazyroad and such building plugins would be great. I have been wanting to create a road and not have it greifed and this would be GREAT if worldedit and/or LazyRoad worked with it!
    Thanks~
     
  9. Offline

    yaitsbilly

    Keap getting
    ,What happening? Ive set up at the mysql database. And ive imported the flatfile database from ownblocks over to the mysql database. im on build 953.
     
  10. Offline

    elf rouge

    can you add a tool to remove a block to the database,
    Permissions nodes to allow removing of own/all protection with this tool,
    and an option to switch the blacklist into whitelist?

    it's a good plugin:), thank!
     
  11. Offline

    ledhead900

    Why do you have double of every line in the config ? at least you get that far mine wont even connect to my database when everything else connects to it just fine it just tells me "using password :NO" I have tried localhost, localhost:3306,jdbc:mysql://localhost:3306/ the last one throws a different error about a mysql contstuctor but its starting to piss me off now. Iv never had such trouble with Mysql in any other plugin but this.

    @op
    I have a beef with this right now, I don't want ppl owning blocks the existed before this using the tool why can't this be set to only allowe protection on blocks placed by the user and not block they have not placed.
     
  12. Offline

    Docxx

    ty for pointing that, I just pasted twice for some reason
     
  13. Offline

    Hacr

    Bump :/
     
  14. Offline

    Eminam

    I'm having the same problem with it not autoenabling on startup. I set everything up correctly. When I changed over to ownblocksx things didn't seem to want to work properly. I changed everything over to what they need to be. I can manually add blocks just fine but when i place blocks they don't go into the database like they are supposed to.
     
  15. Offline

    yaitsbilly

    me to but sa

    Me to but sadly it doesnt record world edit include if you paste stuff.
     
  16. Offline

    Eminam

    Anything?
     
  17. Offline

    cvenomz

    I will take a look at this as soon as I have a chance

    Did you make sure to create a MySQL database first?
     
  18. Offline

    Docxx

    I have created a Database, We have BigBrother, LWC amongst others and they are all working fine :)
     
  19. Offline

    Kanuuu

    Good Morning,

    i become an error:

    "Exception in thread "main" java.lang.NullPointerException
    at me.cvenomz.OwnBlocksDatabaseConverter.OBDBConvert.addToDatabase(OBDBConvert.java:167)
    at me.cvenomz.OwnBlocksDatabaseConverter.OBDBConvert.main(OBDBConvert.java:44)
    "
    Here the full console output:

    "java -jar OwnBlocksDatabaseConverter.jar
    This is the OwnBlocks Database Converter version: 0.1.1
    This utility will input your OwnBlocks flatfile data into a MySQL database
    If you know what you are doing, press enter to continue

    I am now going to ask for your MySQL information

    Please enter your database host: localhost
    Please enter your MySQL database name: DBD
    Please enter your MySQL account username: USER
    Please enter your MySQL account password: PWD
    It is recommended you now try to add a test block before the real deal.
    This can be removed momentarily, or manually at any time.
    The test block's data will be World='Sweden' Owner='Notch' (0,0,0)
    Try adding test block? (yes/no) : yes
    ---
    Please now double check that this test block has been added to your database
    than press enter to continue and remove the block...

    Now I just need to open up your FlatFile database.
    Please enter the path to your Database.db file.
    > /home/minecraft/plugins/OwnBlocks
    File not found.
    Now I just need to open up your FlatFile database.
    Please enter the path to your Database.db file.
    > /home/minecraft/plugins/OwnBlocks/Database.db
    Flatfile has been read in
    The original flatfile didnt store the name of the world
    the blocks belonged to. Please enter the name of the world
    you would like to assign them to in the MySQL database: world
    Exception in thread "main" java.lang.NullPointerException
    at me.cvenomz.OwnBlocksDatabaseConverter.OBDBConvert.addToDatabase(OBDBConvert.java:167)
    at me.cvenomz.OwnBlocksDatabaseConverter.OBDBConvert.main(OBDBConvert.java:44)
    "

    Please help me.
     
  20. Offline

    Eminam

    Still nothing?
     
  21. Offline

    Kanuuu

    Nobody knows the error? When i tryed to compile the .java file, the compiler couldnt find the MysqlBlock file ^^ So, please help...
     
  22. Offline

    Docxx

    Seems the Dev has given up helping us.
     
  23. Offline

    Mercury

    Going to install this
    Going to install this plugin soon and I will tell you.

    I have found with your previous Ownblocks plugin bug. it might be here also.
    With pistons you can move or so called grief blocks which are protected with /ob.
     
  24. Offline

    yaitsbilly

    Can you please make the mysql option cause I still want to use the flatfile db,Manly cause my db file now has up 1 million block placements and that's going to take a long time?

    And when I do use the converter,Which I am,Im still using the old ownblocks plugin cause the new isnt working me for. Will it also converter blocks that are added to the db after I start the conversion?
     
  25. Offline

    Lucasium

    Thankyou ill check it out now :D
     
  26. Offline

    Teh Kitteh

  27. Offline

    cvenomz

    I will add finding the cause of this to my list of things to do. This is using the precompiled jar, right?

    Wait, compile what? Trying to compile the plugin from source?

    See the original plugin, OwnBlocks. It is designed for use without MySQL. there is a link in the original post above
     
  28. Offline

    Kanuuu

    Okay, my first Error are coming because the Database.db file where damaged. So, there cant be converted or importet. For the compiling, i have tryed to search for an error, but my java are to small for this xD. We have now no Database.db file and had have placed the blocks new. The OwnBlocksX working now for me, but they dont work with the Permission 2.x -.-
     
  29. Offline

    Chains

    Hey when u will fix the problem with automatic protection? i cant publish my server until they are automatic protected...
     
  30. Offline

    Shnozzy

    Can you add something where you could toggle on/off the ability to place blocks on a block someone else has built? Would solve the new griefing of having your buildings/structures encased by other players and make it possible to protect yourself a little easier from said griefers.

    If the tool would also allow us to decide which blocks can be placed on opponents blocks, much like the ownblock exclusions that would be perfect for my pvp server. (We want people to have to use dynamite to get inside bases and picks or dynamite for the locks/doors. But being able to encase their chests seems to be the more popular play method. Looking for a work around)
     
  31. Offline

    tireONfire

    I am sry, but I'm new to this plugins and all that stuff. I'm using a hamachi server, but how to I add this plugin, I have other plugins, but with the folders a JAR file as in it. where do I get that JAR file from this folder??
    Thanks

    Hi, I'm new to plugins and all that stuff, can someone explain to me how to install it? I have installed some other plugins to my server, but in the other plugins a JAR file was following in the folder, all I had to do was to put the JAR file in my plugin folder. What do I do?
    Thanks

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

Share This Page