LogBLock issues

Discussion in 'Bukkit Help' started by 7cardcha, Apr 9, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    7cardcha

    I am using ubuntu.

    I installed logblock and mysql and configured both.

    When logblock starts up it says this in the console.

    23:03:51 [INFO] [LogBlock] Loading LogBlock v1.52
    23:03:51 [INFO] [LogBlock] [LogBlock] Version check: Your version is up to date
    23:03:51 [INFO] [LogBlock] [LogBlock] Connecting to [email protected]:mysql://localhost:3306/lb...
    Logblock can connect and use the database because I see that the database has these tables in it.
    Code:
    mysql> show tables in lb
        -> ;
    +-----------------------+
    | Tables_in_lb          |
    +-----------------------+
    | lb-players            |
    | lb-world              |
    | lb-world-chest        |
    | lb-world-sign        |
    | lb-world_nether      |
    | lb-world_nether-chest |
    | lb-world_nether-sign  |
    +-----------------------+
    7 rows in set (0.00 sec)
    
    However my problem is whenever I issue a command.
    Code:
    /lb rollback player 7cardcha since 5m
    
    (7cardcha is my minecraft username)
    It says 0 blocks found which is obviously not true since I just edited some.

    Oh yeah and LogBlock complains that there is no permissions plugin even tough I have PEX if that is related.
     
  2. Offline

    r0306

    Try accessing the SQL database from your SQL Explorer. If you see any data in the tables, then it should be a problem with the config.
     
    7cardcha likes this.
  3. Offline

    7cardcha

    I am using ubuntu and don't have a GUI available. How would I do this with command line SQL commands? (sorry new to SQL)
     
  4. Offline

    r0306

    Well I'm not too sure on this but try typing:
    Code:
    show databases; 
    V
    Code:
    use lb-world;
    V
    Code:
    show tables;
    V
    Code:
    DESCRIBE <any table name that is listed>;
    If there is nothing on there, you may have a problem.
     
    7cardcha likes this.
  5. Offline

    7cardcha

    Well it seems that trying to list a table with a hyphen in it throws a error. I googled it and it apears mysql tables are not allowed to have hyphens in them.
     
  6. Offline

    r0306

    Ahh. Good to hear that your problem is solved. :)
     
    7cardcha likes this.
  7. Offline

    7cardcha

    Well not quite lol. Is there a way I can tell logblock to use different table names or something? Maybe that would fix it. Thanks a ton for helping me let me rep you.
     
  8. Offline

    r0306

    Try going into your config.yml file and changing the paths to the databases to something new like "players." It should then generate brand new tables.
     
  9. Offline

    7cardcha

    What paths I dont see any
     
  10. Offline

    r0306

    Can you pastebin a copy of your config.yml?
     
  11. Offline

    7cardcha

    http://pastebin.com/4u31JpqZ

    Sorry that I am so n00by. Thanks a million.
     
  12. Offline

    r0306

    I'm not really sure what exactly I'm doing either. :pBut can you try renaming the tables?
    Code:
    ALTER TABLE table_name
    RENAME TO new_table_name;
    Not too sure on where logblock is storing its paths.
     
  13. Offline

    7cardcha

    Your doing a hell of a lot better then me.

    Code:
    mysql> ALTER TABLE lb-world RENAME TO lb_world;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-world RENAME TO lb_world' at line 1
    
    no hyphens ):
     
  14. Offline

    r0306

    http://www.diddiz.de/minecraft/download/LogBlock/tables.sql

    Well, I found out that those were the default tables after all so it shouldn't be that. Do you have mysql-connector.jar downloaded?
     
  15. Offline

    7cardcha

  16. Offline

    r0306

    Actually, what is the name of your current world that you are using. Let's say it was Minecraft. Can you go into the logblock folder, find the Minecraft.yml file and pastebin it below?
     
  17. Offline

    7cardcha

    Wait, Wait! I see a option in the world.yml to change the table it logs to. One sec!
     
  18. Offline

    r0306

    Yup. Lol. I just figured that out when I read the documentation.
     
  19. Offline

    7cardcha

    When I change it it throws errors about that table not existing. When I create the table it complains about rows not existing. The file is.

    Code:
    logging:
      TNTEXPLOSION: false
      LEAVESDECAY: false
      MISCEXPLOSION: false
      SNOWFORM: false
      NATURALSTRUCTUREGROW: false
      KILL: false
      FIRE: false
      CHAT: false
      WATERFLOW: false
      BONEMEALSTRUCTUREGROW: false
      BLOCKPLACE: false
      ENDERDRAGON: true
      DIODEINTERACT: false
      SNOWFADE: false
      CHESTACCESS: false
      ENDERMEN: false
      SIGNTEXT: false
      LAVAFLOW: false
      CAKEEAT: false
      BLOCKBREAK: false
      SWITCHINTERACT: false
      NOTEBLOCKINTERACT: false
      GHASTFIREBALLEXPLOSION: false
      CREEPEREXPLOSION: false
      DOORINTERACT: false
    table: lb-world
    
    thanks for being so amazing
     
  20. Offline

    r0306

    Try this config. Replace your current world.yml with this:

    Code:
    logging:
      TNTEXPLOSION: true
      LEAVESDECAY: true
      MISCEXPLOSION: true
      SNOWFORM: true
      NATURALSTRUCTUREGROW: true
      KILL: true
      FIRE: true
      CHAT: true
      WATERFLOW: true
      BONEMEALSTRUCTUREGROW: true
      BLOCKPLACE: true
      ENDERDRAGON: true
      DIODEINTERACT: true
      SNOWFADE: true
      CHESTACCESS: true
      ENDERMEN: true
      SIGNTEXT: true
      LAVAFLOW: true
      CAKEEAT: true
      BLOCKBREAK: true
      SWITCHINTERACT: true
      NOTEBLOCKINTERACT: true
      GHASTFIREBALLEXPLOSION: true
      CREEPEREXPLOSION: true
      DOORINTERACT: true
    table: lb-world
    The thing was that I just noticed that everything was set to false on your logging config, accounting for why it didn't have anything to undo. This should work now. (Don't mess around any more with the SQL tables they're fine.) :p
     
  21. Offline

    7cardcha

    Reply IT WORKED. if there is anything I can do for you let me know(I have tons of programming experience, sql n00b)
     
    r0306 likes this.
  22. Offline

    r0306

    Well, if you know Java, I'm sorta stuck on a delayed event. Basically, I put it inside an event handler and the event returned true but it simply skipped the delayed event. I don't know what's wrong lol. Here's the code snippet:

    Code:
                    plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
                        public void run() {
                            isDamaged = false;   
                        }
                    }, 60L);
     
  23. Offline

    7cardcha

    This is probably worthless but always try everything.

    I have a plugin that does something similar except it uses a repeating task and it goes in onEnable. Try making a static function in your main java file that does this. First try replace plugin with Bukkit.getPluginManager().getPlugin("<your plugin name>")
     
  24. Offline

    r0306

    Ok. I found that the delayed task works but the boolean is not being updated. For example, I put a print to console message of HI after a player is hit and then the boolean should have been set from true to false. Well what happened was that after the player was hit, the server broadcasted "HI" and but then the printconsole still showed that the boolean was set to true. :C
     
  25. Offline

    7cardcha

    Can you pastebin your full code? If it's a million java files just post the relevant ones.
     
  26. Offline

    r0306

  27. Offline

    7cardcha

    Can you tell me what the plugins supposed to do? Hard to understand otherwise.
     
  28. Offline

    r0306

    It's a PVP plugin. The very basic thing that it's supposed to do is to listen for an event when one player gets hit by another player. If the player get's hit, it prevents the player from "escaping" by using commands and warping to another place before he gets killed. This forces the players to fight to the death. So what the first class does is to listen for whenever two players fight. It then sets the boolean to true if the entity damage event occurs. After a set amount of time, the boolean is set to false again. The second class then checks whenever a player enters a command. If the boolean is true, the server denies the player from using any commands. If the boolean is false, the commands are processed as usual. However, it seems that after I hit someone, the boolean gets stuck in true and they can't do anything even after a server reload.
     
  29. Offline

    7cardcha

    Well one problem I see is if you gte hit and 2.5 seconds later you get hit in .5 seconds you will get the isDamaged turn back on. Working on why it's not working in the first place.
     
  30. Offline

    r0306

    The point is to not allow players to use any commands while in battle which is a good thing because whenever you get hit, the counter resets itself. If we get this to work, I'm also going to add a Death listener to check if the player dies and then reset the boolean to false.
     
Thread Status:
Not open for further replies.

Share This Page