Swear Filter that can be toggled

Discussion in 'Plugin Requests' started by Raigna, Nov 6, 2019.

  1. Offline

    Raigna

    Plugin category: Swear Filter

    Minecraft version: Paper 1.14.4

    Suggested name: anything

    What I want:

    My server allows minor swearing but we have a good friend that hates any swearing at all and we want to be accommodating to him and others like him while also allowing everyone else to express themselves. I would love a simple lightweight swear filter plugin that could be toggled so one person would have unfiltered chat while the other could have their chat filtered of swearing

    I found a plugin that did exactly what I wanted called MCSF (My Christian Swear Filter) but it began to lag my server heavily which i guess was due to it not being optimised for 1.14, a plugin that works similar to the chat filtering of this plugin would be amazing if possible

    If its not too much to ask maybe even a hook to discordsrv to filter chat that shows on the channel linked to that plugin but this is not a priority


    Thank you for any help you guys decide to give.

    Ideas for commands:

    /swear toggle
    /swear add
    /swear remove
    /swear reload

    Ideas for permissions:

    swear.user
    swear.admin

    Ideas for configuration:
    a text file or area to add our own swear words, if its possible and not to hard to do a hook to discordsrv to allow or deny the plugin the ability to filter chat which shows on the channel where discordsrv operates

    When I'd like it by: whenever possible

    Thank you for any help given.
     
  2. Online

    timtower Moderator Moderator

    @Raigna Chat didn't change between versions as far as I know.
    Not much that can be optimized for that plugin either.
     
  3. Offline

    Raigna

    Thanks for your reply, I was thinking it may have been the extra features it had such as filtering signs and books, I was wondering if just a simple straightforward swear filter may have been more streamlined and less resource intensive than a plugin trying to to multiple things at once

    I'll admit I dont know much about what changed between 1.13 and 1.14 it was just a theory i had :p thanks for the quick reply anyways, I might try it out once again and see if its something conflicting
     
  4. Offline

    Banjer_HD

    If you don't have a solution before 12 November, I can make this for you :) (I don't have time before then)
    I already did this once so I can re-use a lot of code and change it to your needs.
     
  5. Offline

    Raigna

    That would be great thank you
     
  6. Offline

    The_Enslayer

  7. Offline

    Raigna

    @The_Enslayer Thank you, it works perfectly i got a error that spammed console so i dont know what that is exactly but other than that the server has been running great with it

    thank you

    Heres the error below, might be from me using towny chat and deluxechat maybe

    Code:
    [15:53:46] [Server thread/INFO]: Foxmore issued server command: /swear toggle
    [15:53:54] [Server thread/WARN]: java.lang.NullPointerException
    [15:53:54] [Server thread/WARN]:     at theenslayer.chatfilter.ChatFilter$1.onPacketSending(ChatFilter.java:55)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:195)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.PacketFilterManager.handlePacket(PacketFilterManager.java:588)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:564)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.netty.ProtocolInjector.packetQueued(ProtocolInjector.java:338)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.netty.ProtocolInjector.onPacketSending(ProtocolInjector.java:298)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.netty.ChannelInjector.processSending(ChannelInjector.java:364)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.netty.ChannelInjector.access$800(ChannelInjector.java:63)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.netty.ChannelInjector$3.handleScheduled(ChannelInjector.java:329)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.netty.ChannelInjector$3.onMessageScheduled(ChannelInjector.java:299)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.netty.ChannelProxy$2.schedulingRunnable(ChannelProxy.java:127)
    [15:53:54] [Server thread/WARN]:     at com.comphenix.protocol.injector.netty.EventLoopProxy.execute(EventLoopProxy.java:95)
    [15:53:54] [Server thread/WARN]:     at net.minecraft.server.v1_14_R1.NetworkManager.b(NetworkManager.java:200)
    [15:53:54] [Server thread/WARN]:     at net.minecraft.server.v1_14_R1.NetworkManager.sendPacket(NetworkManager.java:169)
    [15:53:54] [Server thread/WARN]:     at net.minecraft.server.v1_14_R1.PlayerConnection.a(PlayerConnection.java:1521)
    [15:53:54] [Server thread/WARN]:     at net.minecraft.server.v1_14_R1.PlayerConnection.sendPacket(PlayerConnection.java:1494)
    [15:53:54] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_14_R1.entity.CraftPlayer$1.sendMessage(CraftPlayer.java:2074)
    [15:53:54] [Server thread/WARN]:     at com.github.mrivanplays.announcements.bukkit.util.senders.HotbarSender$1.run(HotbarSender.java:37)
    [15:53:54] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftTask.run(CraftTask.java:84)
    [15:53:54] [Server thread/WARN]:     at org.bukkit.craftbukkit.v1_14_R1.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:452)
    [15:53:54] [Server thread/WARN]:     at net.minecraft.server.v1_14_R1.MinecraftServer.b(MinecraftServer.java:1171)
    [15:53:54] [Server thread/WARN]:     at net.minecraft.server.v1_14_R1.DedicatedServer.b(DedicatedServer.java:417)
    [15:53:54] [Server thread/WARN]:     at net.minecraft.server.v1_14_R1.MinecraftServer.a(MinecraftServer.java:1098)
    [15:53:54] [Server thread/WARN]:     at net.minecraft.server.v1_14_R1.MinecraftServer.run(MinecraftServer.java:925)
    [15:53:54] [Server thread/WARN]:     at java.lang.Thread.run(Thread.java:748)
     
  8. Offline

    The_Enslayer

    I'm not really sure what was causing that problem as i couldn't reproduce it on my server. There should be a new version (1.01) on the bukkit dev at somepoint that should fix it however, so give that a try and let me know!
     

Share This Page