Inactive [INFO/ADMIN] LogBlock v1.54 - Enderdragon Logging! Tree Grow Logging! [1.4.5]

Discussion in 'Inactive/Unsupported Plugins' started by DiddiZ, Feb 15, 2011.

  1. Offline

    DiddiZ

    Version: 1.50​
    [​IMG]
    [​IMG]
    Find and Backroll those Damn Griefers
    LogBlock release are on DevBukkit:
    http://dev.bukkit.org/server-mods/logblock/

    LogBlock dev builds:
    http://ci.kitteh.org/job/LogBlock/

    Please read the installation guide

    I won't port LogBlock myself to mcAPI. Source code is available, so it shouldn't be to difficult for someone else to do it, also I'm still here. so I can answer questions. If there is more than one willing, that's up to you to handle that.




    The reasons I take this step, are the usual: I quit playing Minecraft about 5 months ago and lastly I was struggling to keep up with updates. The developement of Guardian made slow progress, so I fear it won't be ready to fully replace LB in time.


    Download latest dev build: Jenkins
    View the source code: GitHub
    Table of contents:
    1. Description
    2. Features
    3. Why to use LogBlock
    4. Example command
    5. Older versions
    6. Change log
    7. Todo list / feature requests
    8. Permission nodes
    9. Plugins supporting this
    10. Support the dev
    11. How to post error messages
    12. Advertizing
    Description:

    LogBlock logs block changes into a MySQL database. Block changes can be placed or destroyed block, explosions, burned blocks, sign text changes, chest access, leaves decay etc.
    It can be used as griefer identification tool, to find out who build a particular building, or even roll back changes by certain players. Other purposes can be e.g: Undoing of forest fires
    All additional features are optional, to keep the database as short as possible. All database actions run in their own threads to avoid server lags.
    The use of permissions plugin (or any clone) is possible, but not necessary.
    Uses Spout for chest logging (but it's fully optional, and there is no need for the client mod at all).

    Features:
    • Logging for block placing, block braking, fire, explosions, leaves decay, signtexts, lava flow and chest content
    • Very mighty commands system, not only allowing to rollback and redo, but also to tp to blockchanges, delete log ingame etc. Full list of commands.
    • Many parameters for lookup/rollback/redo/tp/clearlog commands: Block changes of one ore more player, in a specific area, in a world edit selection, specific block types only, block changes older or newer that a specific date, destroyed/created block only, in a different world and combinations of all these parameters. Full list of parameters.
    • Rebuilding map after importing a backup (/lb redo)
    • Last parameter to use the parameters of the last command
    • Quick ingame lookup of block history a wood pickaxe or a bedrock block.
    • All commands accessible from console (exept tools :D)
    • Custom queries for tools.
    • Different tool modes (lookup, rollback, redo, writelogfile and clearlog)
    • Saves block data like wool color, log type, torch adjustment, etc
    • Multiworld and multiserver support (some servers sharing the same database)
    • BigBrother log import
    • Loggable super pickaxe plugin (not to confuse with WorldEdit's super pickaxe)
    • API
    • Webstats
    Why to use LogBlock:

    Example commands: (thanks to tha d0ctor, read more about commands here)

    /lb rollback player fire since 1d3h – rolls back fire 1 day 3 hours
    /lb rollback player fire since 1d3h area 15 – rolls back fire 1 day 3 hours within a radius of 15 blocks

    /lb rollback player thad0ctor since 1h - rolls back thad0ctor 1 hour
    /lb rollback player thad0ctor since 1d area 5 – rolls back thad0ctor actions for the last day within 5 blocks
    /lb rollback area 10 since 1h30m - rolls back all modifications within 10 blocks since the list 1 hours and 30 mins
    /lb rollback area 10 before 06.11.2011 - roll back all changes in an area of 1o before June 11th, 2011
    /lb rollback player thad0ctor since 05:36:00 - roll back all changes of thad0ctor since 05:36 (server time)


    Download, Command, Configuration and Details:
    [​IMG]http://diddiz.insane-architects.net/logblock.php

    Changelog:
    -> Full changelog
    • LogBlock v1.50 # 81 (Dez. 13, 2011)
      Works with CraftBukkit 1.0.1-R1
      • Feature: /lb me shows the total block count
      • Feature: Chest logging without spout
      • Feature: Enderdragon logging
      • Feature: Logging for tree and mushroom grow (thanks to MD5 for the api)
      • Fix: Area param works again with default radius
      • Fix: Rollbacks got slowed down a bit to avoid rare server crashes
      • Fix: If mysql username, password or database only consist of unquoted numbers, LB will read them now
      • Config: World configs changed totally, some names changed and all logging options are now in an own section
    • LogBlock v1.41 #63 (Nov. 15, 2011)
      Works with CraftBukkit recommended build #1337
      • Fix: Players with spawnTools permission are no longer allowed to spawn all tools.
      • Fix: Added a check to avoid "The permission xy is already defined!" errors
    • LogBlock v1.40 #60 (Nov. 09, 2011)
      Works with CraftBukkit recommended build #1337
      • Feature: Custom auto ClearLog
      • Feature: Reduced error spam. Instead of like 40 line of error code, there is now just a warning stating the MySQL con
      • Feature: The queue will now be dumped after 10 tries even when the MySQL server is connected
      • Feature: Custom material names, allows naming custom blocks
      • Feature: LogBlock will now respond to messages when started without MySQL connection
      • Fix: Log import runs now async
      • Fix: Log import errors won't crash the server
      • Fix: Console commands work again
      • Fix: You can now use upper case letter in tool names (I don't know why you even should, but ...)
      • Config: Added clearlog.auto, clearlog.enableAutoClearlog in main config. Added materials.yml. Removed clearlog.keepLogDays
      • Permissions: Added 'logblock.spawnTools'
    • LogBlock v1.32 (Oct. 04, 2011)
      Works with CraftBukkit recommended build #1240
      • Feature: Player info logging: firstLogin, lastLogin, onlinetime, ip. No ingame lookup yet.
      • Feature: /lb queuesize to see the current queue size
      • Fix: Door logging logs now also fence gates
      • Fix: Bukkit api break in CB #1191
      • Fix: time restriction works now as intended. Thanks to xrobau
      • Fix: Players with insufficient permissions can't smuggle bedrock from one world to another
      • Config: Added logPlayerInfo
    • LogBlock v1.30 (Sep. 22, 2011)
      Works with CraftBukkit recommended build #1185
      • Feature: Chat lookup /lb chat player diddiz search +admin +sucks +dicks (more info)
      • Feature: Door logging
      • Feature: Dynamic tools, define your own tools
      • Feature: Use since and before to define a timespan
      • Feature: Enderman logging
      • Feature: cake logging (who ate it)
      • Config: Added logEndermen, logCakes and logDoors to world config and moved the tool section in main config.
      • Permissions: logblock.tool changed to logblock.tools.tool and
        logblock.toolblock to logblock.tools.toolblock.
    Todo List:

    https://github.com/LogBlock/LogBlock/issues

    Permission Nodes:
    https://github.com/LogBlock/LogBlock/wiki/Permissions

    Plugins supporting Logblock:
    List (open)

    When you want to appear your plugin here, tell me about



    Support the developer (that's me :D):
    If you want to support me writing plugins or want to thank me for the plugin/support, you can: Suggest features I missed, report bugs (best with fix :D), donate via PayPal, flattr my plugins, gift me The Witcher 2 (thanks to newyoukdaily), 2x 1GB DDR1 modules (thanks to HonestFlames), or send me the inner life of a laptop or netbook with a broken display (need it to build a model aircraft, so there is no need for parts like display and keyboard).

    [​IMG]


    How to post error messages:


    I won't aswer questions to general MySQL setup/installation/what is MySQL (there are lots of good tutorials out there, use google)
    Please read the installation guide before asking a question about installation problems.
    Please read the FAQ before posting a error report. It may be solved there.
    In case of rollback or lookup problems: Type /lb savequeue and try again (when it's fixed then, it was a consumer problem, see FAQ)
    When you post error messages, it's important to paste the whole stack trace!

    Advertizing:
    Newyorkdailys Plugin Support Buisness (open)
    Still can't get LogBlock working, or any other plugin? Are you getting errors in your console and cant figure out why? Newyorkdaily offers Basic/Advanced Plugin support.
    • General/Advanced troubleshooting: FREE!
    • Plugin Installations: 1-2 Plugins - FREE!
    • 3 or More Plugins - $2
    Click on the link below to connect to him now!
    http://wbe001.mibbit.com/?settings=7cb4fd3cdd72754df475fb92a0b65f6c&server=irc.Mibbit.Net&channel=#CBPluginSupport


    There is a LogBlock irc channel: #logblock at irc.esper.net.
    You can ask me on skype. My name is 'hawky.diddiz'.
     
  2. Offline

    jammasterz

    Does it do anything that i only have bukkit permissions and the file permissions.yml is empty?
     
  3. Offline

    DiddiZ

    No. It just can't find a class that should be present in bukkit, so I still think it's an outdated CB version.
     
  4. Offline

    MalcolmLC

    I am only getting one error .
    [LogBlock Consumer] Queue overloaded.
    and I checked the faq on you github , and it still happens .
    I am using version 1.4
     
  5. Offline

    DiddiZ

    If local MySQL server, further increase time per run, else increase forceToProcess.
     
  6. Offline

    paganmist

    LogBlock is ignoring changes that I make to the config file under the "loggedWorlds" section. It keeps trying to log "world" and "world_nether" instead.

    If I change "world" to something else, like "myworld", LogBlock will install tables such as lb-world instead of lb-myworld. And at the bottom of the file, it will add ANOTHER "loggedWorlds:" section, with "world" and "world_nether" in it.

    Why on earth does it keep doing this? I've reinstalled it, I've double and triple checked the config, I've used a parser to make sure the YAML is correct. It just keeps ignoring my world names. And this is probably why whenever I use an /lb command, I get error, check server log.

    Help, please!
     
  7. Offline

    MalcolmLC

    Alright I tried that , seems to work . Thank youuuu
    I switched back to your plugin after trying out hawkeye :D
     
    DiddiZ likes this.
  8. Offline

    Sayshal

    @DiddiZ
    How do I use the new autoclearlog feature? I miss it automatically deleting logs older than 14 days... :(
     
  9. Offline

    DiddiZ

    That means that you do have a error in the config, otherwise it would use existing loggedWorlds instead of creating a new one.
    Sure, the parser says your config is valid, bacause it is a valid YAML file (LB can read and write it), but the indention may still be messed up.
    I recommend to rename you config, restart the server and apply the changes again.
    No problem :D
    Did you see the changes in the clearlog section?
    Enable autoclearlog and set auto to something like:
    world "world" before 14d

    You can use every params that also work in console, like player names, certain blocks, etc.
     
  10. Offline

    Sayshal

    I've never been able to UNDO a rollback. Could you give a complete example using my name?
     
  11. Offline

    DiddiZ

    /lb rb player Sayshal since 1d

    /lb redo player Sayshal since 1d
    or
    /lb redo last
     
  12. Offline

    Sayshal

    Life. Saver. Any word on Guardian?
     
  13. Offline

    DiddiZ

    It's coming slow, but when it comes it'll be awesome. :D

    I'll keep adding new Guardian features to LB as long as it's simple enough, like the custom tool names.
     
  14. Offline

    Sayshal

    Oooh I had a question about that.. :p
    Permissions file: http://pastebin.com/N8YHdDnu
    None of my Mods/Admins/Co-Owners/Owners can use /lb tool or /lb toolblock
    ... :(
     
  15. Offline

    DiddiZ

    Update to v1.41 and give them logblock.spawnTools permission, should work then.
    Wait, could also be a missing permissions bridge. If LB says at server start something like "permissions not found" you are missing the bridge.
     
  16. Offline

    Sayshal

    I reaally want to avoid another plugin.. This was work prior to 1.40

    2011-11-15 01:03:05 [INFO] [LogBlock] Permissions plugin found.

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

    DiddiZ

    Then it has to be the spawnTools permission, no other things changed
     
  18. Offline

    Sayshal

    But, I know what you're saying.. If you check that file under mods is..
    Code:
      - logblock.lookup
      - logblock.me
      - logblock.rollback
      - logblock.spawnTools
      - logblock.tools.tool
      - logblock.tools.toolblock
      - logblock.tp
     
  19. Offline

    DiddiZ

    That should work ...
    Using 1.40 or 1.41?
    What's the exact message?
     
  20. Offline

    DeanR

    I get the error:
    Code:
    [SEVERE] [LogBlock] Error while loading: while parsing a block mapping; expected <block end>, but found BlockMappingStart
    
     
  21. Offline

    DiddiZ

    Syntax error in config.
    http://yaml-online-parser.appspot.com/
     
  22. Offline

    DeanR

    can you help me pls? I can't find the syntax error.
    Code:
    loggedWorlds:
    - MineCity
    - Nether
    - Skylands
    mysql:
      port: 3306
      host: localhost
      password: ***
      user: root
      database: lb
    logging:
        logPlayerInfo: true
        logCreeperExplosionsAsPlayerWhoTriggeredThese: false
        logKillsLevel: PLAYERS
        hiddenPlayers: []
        hiddenBlocks:
        - 0
    clearlog:
        dumpDeletedLog: false
      auto:
      - world "world" before 365 days all
      - world "world" player lavaflow waterflow leavesdecay before 7 days all
      - world world_nether before 365 days all
      - world world_nether player lavaflow ghast before 7 days all
      - world "world" player diddiz all
      enableAutoClearLog: false
    questioner:
        askRedos: true
        askClearLogs: true
        askRollbacks: true
        askClearLogAfterRollback: true
    rollback:
        replaceAnyway:
        - 8
        - 9
        - 10
        - 11
        - 51
        dontRollback:
        - 10
        - 11
        - 46
        - 51
        maxTime: 2 days
        maxArea: 50
    consumer:
        delayBetweenRuns: 5
        forceToProcessAtLeast: 20
        timePerRun: 200
        useBukkitScheduler: true
    lookup:
        toolID: 270
        toolQuery: area 0 all sum none limit 15 desc silent
        toolblockID: 62
        toolBlockQuery: area 0 all sum none limit 15 desc silent
        defaultDist: 20
        defaultTime: 30 minutes
        linesPerPage: 15
        linesLimit: 1500
    tools:
        tool:
            item: 270
            leftClickBehavior: NONE
            params: area 0 all sum none limit 15 desc silent
            rightClickBehavior: TOOL
            aliases:
            - t
            defaultEnabled: true
            mode: LOOKUP
            permissionDefault: OP
        toolblock:
            item: 62
            leftClickBehavior: TOOL
            params: area 0 all sum none limit 15 desc silent
            rightClickBehavior: BLOCK
            aliases:
            - tb
            defaultEnabled: true
            mode: LOOKUP
            permissionDefault: OP
    Edit:// in the original log I have the same error
     
  23. Offline

    DiddiZ

    I'd guess it's the use of mixed number of indent spaces.
    Code:
    loggedWorlds:
    - MineCity
    - Nether
    - Skylands
    mysql:
      port: 3306
      host: localhost
      password: ***
      user: root
      database: lb
    logging:
      logPlayerInfo: true
      logCreeperExplosionsAsPlayerWhoTriggeredThese: false
      logKillsLevel: PLAYERS
      hiddenPlayers: []
      hiddenBlocks:
      - 0
    clearlog:
      dumpDeletedLog: false
      auto:
      - world "world" before 365 days all
      - world "world" player lavaflow waterflow leavesdecay before 7 days all
      - world world_nether before 365 days all
      - world world_nether player lavaflow ghast before 7 days all
      - world "world" player diddiz all
      enableAutoClearLog: false
    questioner:
      askRedos: true
      askClearLogs: true
      askRollbacks: true
      askClearLogAfterRollback: true
    rollback:
      replaceAnyway:
      - 8
      - 9
      - 10
      - 11
      - 51
      dontRollback:
      - 10
      - 11
      - 46
      - 51
      maxTime: 2 days
      maxArea: 50
    consumer:
      delayBetweenRuns: 5
      forceToProcessAtLeast: 20
      timePerRun: 200
      useBukkitScheduler: true
    lookup:
      defaultDist: 20
      defaultTime: 30 minutes
      linesPerPage: 15
      linesLimit: 1500
    tools:
      tool:
        item: 270
        leftClickBehavior: NONE
        params: area 0 all sum none limit 15 desc silent
        rightClickBehavior: TOOL
        aliases:
        - t
        defaultEnabled: true
        mode: LOOKUP
        permissionDefault: OP
      toolblock:
        item: 62
        leftClickBehavior: TOOL
        params: area 0 all sum none limit 15 desc silent
        rightClickBehavior: BLOCK
        aliases:
        - tb
        defaultEnabled: true
        mode: LOOKUP
        permissionDefault: OP
     
  24. Offline

    jammasterz

    Now i got to know that the server is using multicraft
    I think this is the problem. Was the missing class in build 1185?
     
  25. Offline

    DiddiZ

    Outdated CB version, as I said :D

    Config management totally changed since then. Either update CB to 1337, or downgrade LB to v1.30.
     
  26. Offline

    Infectedd

    @DiddiZ : Well, shit. Setting version to 1.30 didn't work. Here's what comes up on startup :
    Code:
    20:05:58 [SEVERE] [LogBlock Updater] Error:
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name
     'lastlogin'
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Sou
    rce)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
            at com.mysql.jdbc.Util.getInstance(Util.java:382)
            at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
            at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
            at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
            at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
            at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
            at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:779)
            at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:622)
            at de.diddiz.LogBlock.Updater.update(Updater.java:56)
            at de.diddiz.LogBlock.LogBlock.onLoad(LogBlock.java:82)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:139)
            at org.bukkit.craftbukkit.CraftServer.<init>(CraftServer.java:112)
            at net.minecraft.server.ServerConfigurationManager.<init>(ServerConfigur
    ationManager.java:52)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:136)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:348)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    After this it reverts the version back to 1.40
     
  27. Offline

    jammasterz

    Yeah but the problem is that the bukkit is allready updated to 1337 :p It must be multicraft. TY for your help!
     
    DiddiZ likes this.
  28. Offline

    DiddiZ

    But the columns should be present now, so it can't complain about missing columns anymore.
     
  29. Offline

    paganmist

    I reported a problem. I was told that the problem was on my end. I spent hours trying to fix whatever mistake I supposedly made. Finally, I just went ahead and debugged the LogBlock code.

    The problem is not with my YAML, the problem is that you forgot to load the edited config.yml in the data folder into memory.

    Code:
    org.bukkit.configuration.file.FileConfiguration fileconfiguration = logblock.getConfig();
    
    At no point do you load the actual contents of the edited config.yml in the data folder into memory. Bukkit suggests doing this by using reloadConfig() if you're going to assign getConfig() instead of just using plugin.getConfig().whatever.

    So when the dowhiletrue loop at line Config.class 124 runs for the first time, fileconfiguration is empty. Because you haven't loaded anything into memory, nor have you set any defaults by that point. So everything evaluates incorrectly on the first loop through.

    That is why my config which looks like this:

    Code:
    loggedWorlds:
    - myworld1
    - myworld1_nether
    (...fast forward)
            defaultEnabled: true
            mode: LOOKUP
            permissionDefault: OP
    
    ends up being changed into THIS:

    Code:
    loggedWorlds:
    - myworld1
    - myworld1_nether
    (...fast forward)
            defaultEnabled: true
            mode: LOOKUP
            permissionDefault: OP
    loggedWorlds:
    - world
    - world_nether
    missingKey: 'missingvalue'
    missingKey2: 'missingvalue2'
    
    And of course, having a second "loggedWorlds" statement at the bottom is going to override my settings at the top.

    The easiest fix for this is to allow Config.class to generate a config.yml file (ignoring all the mysql errors when LogBlock attempts to log in using the settings generated in your hashmap.) It's just a big old mess in there, no offense.

    And dude, next time, just be forthright and say that you don't don't know or care to find the bug in your code. I foolishly thought that when you told me the mistake was on my end, you'd actually checked to make sure it wasn't your error first. Silly me.
     
  30. Offline

    Infectedd

    It does.
     
  31. Offline

    paganmist

    As a follow up, 1.41 doesn't add loggedWorlds to the bottom any more.

    Now it simply overwrites whatever changes are made on file:

    Code:
    Here is the config.yml file from LogBlock.zip, after I've made edits:
    
    loggedWorlds:
    - myWorld
    - myWorld_nether
    mysql:
      port: 3306
      host: localhost
      password: *******
      user: paganmist
      database: minecraft
    
    Code:
    Here is the config.yml after I start the server, and Config.class overwrites my changes:
    
    loggedWorlds:
    - world
    - world_nether
    mysql:
      port: 3306
      host: localhost
      password: *******
      user: paganmist
      database: minecraft
    
    The easiest fix for this remains to ignore the config.yml inside of the LogBlock folder in the .zip file (when was that file last generated, anyhow?), and allow LogBlock to run once so it can generate a file. There will be errors, since LogBlock attempts to connect to mysql the very first time it run, whether or not config.yml existed or had to be generated.

    Do not alter the file structure by moving sections around. Simply make your edits to the values, and then start your server up again. LogBlock will create the correct tables ("lb-yourworldname") and the correct world config files ("yourworldname.yml") if you do this. This just might solve some other problems as well.
     

Share This Page