Two questions.

Discussion in 'Spigot Plugin Development' started by TheMasteredPanda, May 27, 2016.

  1. 1. When using the CommandExecutor implementation, for every command I make do I have to set the Executor. i.e. if I made a command /core and another command /list, would I have to set an executor to both commands even though they are in the same class?

    2. How would I be able to make daily and weekly log.txt files?

    Ty,
    Panda :).
     
  2. 1. Yes
    2. The server already makes logs logging everything from startup to shutdown :p
     
  3. Ahh yeah I know xD. I am making a economy logger that will log the economy (Essentials) and income of players who have jobs (from the job plugin, but I want it all to be in the same file. I'm wanting to know how to do daily and weekly logs as I have never done it before and always wanted to try it. Any easy solution?
     
  4. Not sure how you'd be able to do it without saving a timestamp value outside the plugin, but use a List<String> and just store all the economy output, then in your onDisable check using some code which I don't have an idea for, if a week or a day or whatever has passed, if it has use a FileOutputStream to write out the contents of the list
     
  5. Could be an Idea, I'm looing for something were I can list the block names in a file then only edit the integers so it would be easy for me to calculate some averages to fine tune the economy.