[REQ] Player Command Log

Discussion in 'Archived: Plugin Requests' started by strupan, Jan 29, 2012.

  1. Offline

    strupan

    Just like the title describes it, a simple plugin that logs every command used by the players! Or if possible, a config of only certain groups or OP status command log, using bPerm groups.

    Using java logger,

    Showing Playername and the command?

    Ex.

    [Date/Time]: Strupan: /item
    [Date/Time]: Strupan: /god

    etc.
     
  2. Offline

    ThatBox

    Private or Public plugin?
     
    strupan likes this.
  3. Offline

    strupan

    Public, I don't mind.
     
  4. Offline

    ThatBox

    I'll get started tomorow.
     
    strupan likes this.
  5. Offline

    strupan

    Great! Let me know when you are done!

    Thanks for taking the request.
     
  6. Offline

    ThatBox

    strupan likes this.
  7. Offline

    Wolfy9247

    Speaking of 'CommandLog' this was actually something someone already requested, and I picked up on it but so did someone else, the topic is posted in the submissions here: http://forums.bukkit.org/threads/ch...-time-someone-types-a-command-1-0-1-r1.57419/

    I'll be probably contributing to that project (if possible or allowed by the author) with an onCommand() function as well as a HashMap that isn't included in the source for toggling besides permissions. This isn't to say that ThatBox didn't make anything functional for now, but this is something that'll most likely keep updated.
     
  8. Offline

    ThatBox

    That one doesn't seem to have a date and time in the console :)
     
    strupan likes this.
  9. Offline

    Wolfy9247

    You're right about that! It could easily be added though! I've still yet to get together with the author of it to add some things to the source, it'd be a lot easier if it was GitHub based.
     
    ThatBox likes this.
  10. Offline

    strupan

    Thanks, ThatBox, and Wolfy, btw Box, is it okay if you provide a source with that? I am really interested in learning how you log them with java logger if that is what your using.

    Quick question box, where does the log get saved to?
     
  11. Offline

    Wolfy9247

    If you want to log something to the console you just use:
    public static Logger log = Logger.getLogger("Minecraft");
    log.info(date + event.getPlayer.getName() + " executed "+commandLabel);

    To broadcast a message to certain users:
    Bukkit.broadcast(String, permission);

    I assume that's what you mean by logging though, unless you're talking about logging to a file, which would be different.
     
  12. Offline

    ThatBox

    Forgot that part. /facepalm.
    Getting on it right away.
    EDIT: Couldn't do it. I have always had trouble with the IO. sorry.
     
  13. Offline

    strupan


    Wait.. soo what does that mean lol.

    Does it save a log or it doesn't do anything?
     
  14. Offline

    ThatBox

    Nope it doesn't.
     
  15. Offline

    strupan


    Awh, so what does commandlog actually do?

    I mean ain't it the whole point of doing so though?

    Thanks

    Bump?

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

    Wolfy9247

    I assume it's just printing out something like one of my previous posts.
     
    ThatBox likes this.
  17. Offline

    strupan

    Printing it out where though? Just in game? Or.. I don't really understand.

    Does the command log that you recommanded contain a log? Or at least add to to server log?
     
  18. Offline

    Wolfy9247

    Code:
    log.info(date + event.getPlayer.getName() + " executed "+commandLabel);
    
    This would print out in the console.

    Code:
    Bukkit.broadcast("Message", permission.node);
    
    This would broadcast to both in-game and console.

    As for how the one made for you functions, I've no idea. As far as I understand he wasn't able to get it to write to a file.
     
  19. Offline

    strupan


    Thanks for the help wolfy, as for commandlog, is there possible way to disable broadcast to global but just show up in console? That way it will log itself in the server log yeah?
     
  20. Offline

    Wolfy9247

    If you *just* want it to broadcast to the console and no one in game, you'd go with the first method. ^_^
     
  21. Offline

    strupan


    Well the thing is, I am not coding it or have any experience yet lol.

    But I was just wondering if command log has that event to be disabled?
     
  22. Offline

    Wolfy9247

    ThatBox never included the source so I couldn't tell you what needs to be enabled/disabled.
     
  23. Offline

    strupan

  24. Offline

    Wolfy9247

  25. Offline

    strupan

    Thanks wolfy, you've been a great help. I will look into using it now.
     
  26. Offline

    mrcheesete0

    search the forums for PlgLogCmd

    I like all of Plg's plugins ,and if I remember correctly (its been awhile so I don't remember 100%) it logs commands in the server console (which gets saved to server.log)
     

Share This Page