Need intuition on Apache Console Filter

Discussion in 'Plugin Development' started by hasunemiku2015, Mar 24, 2020.

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

    hasunemiku2015

    I am a java noob , developing a plugin that requires the use vanilla commands , how can I filter those message containing a certain string to the log.

    I heard that theres a apache filter that can do it , serched it on google amd i dont understand those posts , can anyone give me some intuition on how to use it ?

    Dont tell me to use another plugin cuz i wanna incoporate it into the same thing
     
  2. Online

    timtower Administrator Administrator Moderator

  3. Offline

    hasunemiku2015

    Teleported Minecart to x y z
     
  4. Online

    timtower Administrator Administrator Moderator

    Isn't it easier to use a commandblock for that or just code to teleport it?
     
  5. Offline

    hasunemiku2015

    yes, but like there is quite a bit of code before that.......

    cart.teleport does NOT work , it does not teleport the player in it

    if you wanna to displace players between different minecarts, i have tested it and the experience is not smooth
     
  6. Online

    timtower Administrator Administrator Moderator

    Where does the message come from?
     
  7. Offline

    hasunemiku2015

  8. Online

    timtower Administrator Administrator Moderator

    No idea about the second thing.
    Have you tried getting a commandblock (somewhere in the world) and running it through that?
     
  9. Offline

    hasunemiku2015

    yes, but like i need to place the command block in world
     
  10. Online

    timtower Administrator Administrator Moderator

    That is correct, only need to do it once though
     
  11. Offline

    hasunemiku2015

    but different minecarts have different teleportation speed?
     
  12. Online

    timtower Administrator Administrator Moderator

    You put the commandblock in the world.
    With your code you get that block, you get its commandsender.
    Unless you can extend the ConsoleCommandSender and use that.
     
  13. Offline

    hasunemiku2015

    it doesnt really work , cuz there maybe different minecart running at the same time , also , not many server are willing to do so cuz the command block need to be chunkload and those stuff

    like , anyway, how to use a log4j filter

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Mar 24, 2020
  14. Online

    timtower Administrator Administrator Moderator

    You use the same code as you are doing now, the only thing that is different is the commandexector.
    Spawn area is always loaded.
    https://bukkit.org/threads/logging-filters.433571/
     
  15. Offline

    hasunemiku2015

    Like i dont really understand all those codes, like its so different from what i was working on , would you mind telling me exactly what to change? (a.k.a from what to what)

    I want this to disappear
    [18:10:03] [Server thread/INFO]: Teleported Minecart to 405.5, 39.0625, -819.5840319635727

    Also ,do i need to bridge it to the main class , if yes , how to
     
  16. Online

    timtower Administrator Administrator Moderator

  17. Offline

    hasunemiku2015

  18. Online

    timtower Administrator Administrator Moderator

  19. Offline

    hasunemiku2015

  20. Online

    timtower Administrator Administrator Moderator

    From the spigot thread.
     
  21. Offline

    hasunemiku2015

    like EXACTLY what to do?
     
  22. Online

    timtower Administrator Administrator Moderator

    No, I won't spoon feed.
    1. Then it would be better for you to make a plugin request.
    2. I just don't spoonfeed, developer that just gets spoonfed will never become good.
    3. I don't have an IDE in front of me able to work with Bukkit
     
  23. Offline

    hasunemiku2015


    Where to put the Logger#setFilter , in the main class?

    Also, like how to USE the Logger.setFilter?
    I dont see this methood is avalible for Log4j , do i need to import java.util.logging?
     
    Last edited: Mar 24, 2020
  24. Online

    timtower Administrator Administrator Moderator

  25. Offline

    hasunemiku2015

    upload_2020-3-24_19-22-59.png

    Cannot make a Static refrence to a not static methood
     
  26. Online

    timtower Administrator Administrator Moderator

Thread Status:
Not open for further replies.

Share This Page