Disable logging console

Discussion in 'Plugin Development' started by OpperElfje, Mar 14, 2018.

Thread Status:
Not open for further replies.
  1. hi,

    I need a help with my code to stop logging /login command and /register

    Code:
            getServer().getLogger().setFilter(new Filter() {
               
                public boolean isLoggable(LogRecord cmd) {
                     return !cmd.getMessage().toLowerCase().contains("/sregister ");
                }
              });
    but this isn't working
     
  2. Offline

    timtower Administrator Administrator Moderator

    RcExtract likes this.
  3. i create a plugin where you can logfin but i want to disable the // issued server command // so dat thay cant see your password

    example
    /login hi
     
  4. Offline

    timtower Administrator Administrator Moderator

    @OpperElfje Why do you need a plugin to login then?
     
  5. I'd personally just recommend switching from sending a password over freetext. It should be encrypted via SHA or atleast MD5.

    You could use the built in hashing function to do this easily

    Code:
    String hashed = Hashing.sha256()
            .hashString("your input", StandardCharsets.UTF_8)
            .toString();
    Just store that to the medium of your choice. Then to check the password you just rehash the password and if they match you're golden.

    Also a quick search brought me to some dude named @timtower who responded in another thread with the same question. Run /gamerule sendCommandFeedback False.
     
  6. Offline

    timtower Administrator Administrator Moderator

  7. You have a valid point. I suppose this is still server side. I'd be afraid of running a plugin on my server that has commands hidden. Someone could make a hidden command like "/spyplugin cocapuffs great" which could give them all permissions or even worse manipulate the file system.
     
  8. Offline

    timtower Administrator Administrator Moderator

    There are ways to do it without commands as well, chat is also a powerful thing.
    Hiding things just should not happen in my opinion.
     
    Matthewenderle likes this.
  9. i create a staff plugin and the /login command is to protect all staff accounts from being hijacked
     
  10. Offline

    timtower Administrator Administrator Moderator

    And the minecraft authentication is not enough then?
     
  11. No because you have always people who says "that was my lidel brother i am sorry"
     
  12. Offline

    timtower Administrator Administrator Moderator

    Use the conversation API
     
  13. I always like to hear about people learning how to make their own plugins but if one already exists why not just use it.

    What I just thought of that might be kindof cool is if you utilize the inventory menu or whatever it is called and put random blocks in and they just remember to click on four blocks in a certain order. Something similar to this flow:
    • first time the player joins and has a permission to use the plugin
      • Generate inventory menu with dirt,stone, and wool colors
      • Click one block
      • regenerate inventory screen
      • click another block
      • regenerate inventory screen
      • click another block
      • regenerate inventory screen
      • click another block
      • grab all the Material types and store that to the config

    • player joins and has a permission to use the plugin and has blocks set
      • Generate inventory menu with dirt,stone, and wool colors
      • Click one block
      • regenerate inventory screen and randomize order
      • click another block
      • regenerate inventory screen and randomize order
    • click another block
    • regenerate inventory screen and randomize order
    • click another block
    • grab all the Material types and check the config if it's correct.
      • If not correct, Log IP, TIME, and kick from the server
      • If correct, welcome to the server
    Something like that is new and might get quite a few downloads if you are interested.
     
  14. Offline

    Zombie_Striker

    @Matthewenderle
    Though a very novel idea, (you may get a couple hundred downloads for something like this), such a thing is most likely not as secure as a password based system and may create problems if players do not remember what they clicked/forget the order (Its hard to forget how to spell a name/word, but easy to forget a random order of blocks.)
     
  15. Just to clarify I meant you would select blocks by the type. Such as my password could be
    Dirt, pinkwool,lapiz,yellowwool
     
Thread Status:
Not open for further replies.

Share This Page