1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Change Default Ban Message

Discussion in 'Help' started by EerieAlchemist, Feb 22, 2020.

  1. EerieAlchemist

    EerieAlchemist Spider Jockey

    Messages:
    36
    I was wondering if it is possible to change the default ban/kick message a player receives when kicked/banned. I know you can do it with plugins, but I would like to change the default "banned by admin" or "kicked by admin" text, and reformat the reason layout. Is there a way to do this by going to src-defaults-commands? Thank you for the help.
     
  2. DaRealPandaz

    DaRealPandaz Silverfish

    Messages:
    24
    GitHub:
    mrpandaz
    If you listen to PlayerPreLoginEvent you will be able to detect if a player is banned or not. For kicking however you would need to override the Kick command to change it when someone uses /kick
     
  3. EerieAlchemist

    EerieAlchemist Spider Jockey

    Messages:
    36
    But how would I do that? It’s getting annoying when I use a tempban plugin and it says the following:

    Kicked by admin. Reason: You have been banned for 5 hours, 6 minutes.

    I’m trying to get rid of the first part. It would be much smoother if it wasn’t there.
     
  4. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    It isn't. The only way is through plugins.
     
  5. EerieAlchemist

    EerieAlchemist Spider Jockey

    Messages:
    36
    So how? What code would I need to add/edit to the tempban plugin to remove the first “default” part?
     
  6. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    If you think the plugin could be better, then contact plugin's author and tell him what you want to make better...

    ..I can't tell you what you should edit if I haven't any code.
     
  7. EerieAlchemist

    EerieAlchemist Spider Jockey

    Messages:
    36
    Alright, I’ll keep looking.
     
  8. DaRealPandaz

    DaRealPandaz Silverfish

    Messages:
    24
    GitHub:
    mrpandaz
    What plugin is it? Its an easy fix. I'll open a PR on their GitHub
     
  9. EerieAlchemist

    EerieAlchemist Spider Jockey

    Messages:
    36
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.