Best Way To Clear Chat | SpigotMC - High Performance Minecraft

  • Home
    • Recent Posts
    • Recent Activity
  • Forums
    • Search Forums
    • Recent Posts
  • Resources
    • Search Resources
    • Most Resources
    • Latest Reviews
  • Wiki
    • Wiki Index
    • Page List
    • Recent Activity
  • Team
    • Administrator
    • Moderator
    • Sponsor
    • Developer
    • Wiki Team
    • Services Moderator
    • Junior Moderator
    • Resources Moderator
  • Downloads
    • Spigot / BuildTools
    • BungeeCord
  • Discord
  • Hub
  • Issues
  • Members
    • Notable Members
    • Current Visitors
    • Recent Activity
    • New Profile Posts
  • Donate
Your username or email address: Password: Forgot your password? Stay logged in SpigotMC - High Performance Minecraft Software Home Forums Spigot Spigot Plugin Development Best way to clear chat

Discussion in 'Spigot Plugin Development' started by nayongbin108, Jun 11, 2018.

  1. nayongbin108

    nayongbin108

    I don't know if this the best way but I am doing Code (Java): for(int i=0; i<200; i++) { Bukkit.broadcastMessage(""); } Is there a better way to do this?
    #1 nayongbin108, Jun 11, 2018
  2. JustDJplease

    JustDJplease

    Simple answer: That is the best way. Although, you don't need 200 lines.
    #2 JustDJplease, Jun 11, 2018
    • Agree Agree x 4
  3. MSWS

    MSWS

    There's literally no point in clearing chat as logs exist. Logically speaking, you'd want to spam the player's chat with random words so that it'd be near impossible to find it within the logs. But if you don't want to do that then spamming blank lines also works just fine. Alternatively you could require everyone to install your own client, and from there you could link the server and client to send an order to the client to cler the chat. This'd be completely unnecessary but it would work /shrug
    #3 MSWS, Jun 11, 2018
    • Agree Agree x 1
  4. DavidDevelops

    DavidDevelops Supporter

    nayongbin108 said: ↑
    I don't know if this the best way but I am doing Code (Java): for(int i=0; i<200; i++) { Bukkit.broadcastMessage(""); } Is there a better way to do this?Click to expand...
    That's the best way, But if you're going to be doing it often create a method, (Or even if you use it twice)
    #4 DavidDevelops, Jun 11, 2018
  5. FrostedSnowman

    FrostedSnowman Retired

    Code (Java): Bukkit.broadcastMessage(StringUtils.repeat(" \n", 100));
    #5 FrostedSnowman, Jun 11, 2018
    • Like Like x 4
    • Winner Winner x 3
    • Agree Agree x 1
  6. Optic_Fusion1

    Optic_Fusion1 Resources Mod

    MSWS said: ↑
    There's literally no point in clearing chat as logs exist. Logically speaking, you'd want to spam the player's chat with random words so that it'd be near impossible to find it within the logs. But if you don't want to do that then spamming blank lines also works just fine. Alternatively you could require everyone to install your own client, and from there you could link the server and client to send an order to the client to cler the chat. This'd be completely unnecessary but it would work /shrugClick to expand...
    There's definitely reasons you'd want to clear the chat, like if someone spams racial slurs, advertising, breaking certain rules you might have, spamming in general, stuff like that
    #6 Optic_Fusion1, Jun 12, 2018
  7. MSWS

    MSWS

    Optic_Fusion1 said: ↑
    There's definitely reasons you'd want to clear the chat, like if someone spams racial slurs, advertising, breaking certain rules you might have, spamming in general, stuff like thatClick to expand...
    If people don't want to see stuff that was said in chat then they can do F3+D. Otherwise if they do want to see it then they can just look in chat logs. But sure, can be useful.
    #7 MSWS, Jun 12, 2018
  8. OscarDali

    OscarDali

    Optic_Fusion1 said: ↑
    There's definitely reasons you'd want to clear the chat, like if someone spams racial slurs, advertising, breaking certain rules you might have, spamming in general, stuff like thatClick to expand...
    I think a good way to avoid that would be to detect the words, the problem is that there are different ways of seeing it Example:
    • Easy
    • Ez
    • izi
    • etc...
    #8 OscarDali, Jun 12, 2018
  9. PhaxyWende

    PhaxyWende

    Well, since there are hack clients which stack messages if they are equal to each other, maybe you could also print something like this before: Code (Java): for (int i = 0; i < 100; i++) { Bukkit.broadcastMessage("§0" + ThreadLocalRandom.current().nextDouble()); }
    #9 PhaxyWende, Jun 12, 2018
    • Like Like x 1
  10. Syanko

    Syanko

    o
    #10 Syanko, Jun 12, 2018
    • Optimistic Optimistic x 2
    • Informative Informative x 1
    • Creative Creative x 1
  11. MSWS

    MSWS

    OscarDali said: ↑
    I think a good way to avoid that would be to detect the words, the problem is that there are different ways of seeing it Example:
    • Easy
    • Ez
    • izi
    • etc...
    Click to expand...
    Server management shouldn't use clear chat as a filter, it should be a final last minute emergency fix. There's a major difference between clear chat and a full on filter. I wish everyone the best of luck in making a filter that's as good as a regular human. But good luck. PhaxyWende said: ↑
    Well, since there are hack clients which stack messages if they are equal to each other, maybe you could also print something like this before: Code (Java): for (int i = 0; i < 100; i++) { Bukkit.broadcastMessage("§0" + ThreadLocalRandom.current().nextDouble()); } Click to expand...
    There isn't really a point in doing, if anything it'd just make the clear chat super ugly.
    #11 MSWS, Jun 12, 2018
  12. OscarDali

    OscarDali

    MSWS said: ↑
    Server management shouldn't use clear chat as a filter, it should be a final last minute emergency fix. There's a major difference between clear chat and a full on filter. I wish everyone the best of luck in making a filter that's as good as a regular human. But good luck. There isn't really a point in doing, if anything it'd just make the clear chat super ugly.Click to expand...
    Well clear chat would be avoided, and if it is very difficult, but for servers ip is very useful, you can block all domains, .com, .org, .net ... can detect the message, and cancel the event so that it is not sent to the chat, and tell the staff that someone has said a bad word or mention of another server.
    #12 OscarDali, Jun 12, 2018
  13. Jonnyo101

    Jonnyo101

    Guy asks "Whats the best way to clear chat".. We tell him how to run his/a server :p OP: I would say the way your doing it.. If players did you a hacked client to bypass let that hackers leave haha
    #13 Jonnyo101, Jun 12, 2018
  14. PhaxyWende

    PhaxyWende

    MSWS said: ↑
    There isn't really a point in doing, if anything it'd just make the clear chat super ugly.Click to expand...
    Since you can also clear the chat with normal spaces AFTER (as I wrote), I don't know whats wrong with it ;)
    #14 PhaxyWende, Jun 13, 2018
    • Useful Useful x 1
  15. Strahan

    Strahan Benefactor

    Jonnyo101 said: ↑
    OP: I would say the way your doing it.. If players did you a hacked client to bypass let that hackers leave hahaClick to expand...
    FrostedSnowman's method is more efficient. PhaxyWende said: ↑
    Since you can also clear the chat with normal spaces AFTER (as I wrote), I don't know whats wrong with it ;)Click to expand...
    If you clear with spaces after using the random crap, then what's the point of the random crap? lol
    #15 Strahan, Jun 13, 2018
  16. PhaxyWende

    PhaxyWende

    Strahan said: ↑
    FrostedSnowman's method is more efficient. If you clear with spaces after using the random crap, then what's the point of the random crap? lolClick to expand...
    I already explained this in my post before. Players with clients that stack equal messages get a "cleared" chat aswell.
    #16 PhaxyWende, Jun 13, 2018
  17. Strahan

    Strahan Benefactor

    PhaxyWende said: ↑
    I already explained this in my post before. Players with clients that stack equal messages get a "cleared" chat aswell.Click to expand...
    Ahh, I missed that one heh.
    #17 Strahan, Jun 13, 2018
  18. Choco

    Choco Moderator

    PhaxyWende said: ↑
    I already explained this in my post before. Players with clients that stack equal messages get a "cleared" chat aswell.Click to expand...
    Those are people running modified clients. If they want to run something other than vanilla, what they see is at their discretion.
    #18 Choco, Jun 13, 2018
  19. PhaxyWende

    PhaxyWende

    2008Choco said: ↑
    Those are people running modified clients. If they want to run something other than vanilla, what they see is at their discretion.Click to expand...
    Yes, and thats why they have some "ugly" random numbers on their screen. There are things you want to hide as server admin (server ips, links...)
    #19 PhaxyWende, Jun 13, 2018
  20. solo

    solo

    Best way to clear the chat is by making the player press 'F3+D', Thank me later ;P
    #20 solo, Jun 13, 2018 Last edited: Jun 14, 2018
(You must log in or sign up to post here.) Show Ignored Content Your username or email address: Do you already have an account?
  • No, create an account now.
  • Yes, my password is:
  • Forgot your password?
Stay logged in SpigotMC - High Performance Minecraft Software Home Forums Spigot Spigot Plugin Development SpigotMC - High Performance Minecraft Software Home Forums Spigot Spigot Plugin Development

Tag » How To Clear Chat In Minecraft