Spigot VentureChat 3.2.2

#1 Channels Chat plugin! Spigot + Bungee. Supports PlaceholderAPI + JSON formatting. New Hex Colors!

  1. Hi austin,

    It turned out venture chat does not work with the latest placeholderapi. I downgraded & it works. Try pasting it into a notepad since i believe it is important.

    This error appears on all my servers with default comfigs when you send a message.
     
  2. Hello,

    I'm rewriting a plugin that once hooked into the old ChannelChat plugin for Bukkit back in 1.8. Now that we're on 1.12, I'm using this chat plugin. This plugin I'm writing deals with land management.

    The old code hooked ChannelChat to create a custom House channel (think Game of Thrones house) and it would act as a router, handling what users saw what. Iow, everyone had access to the house channel, but they could only see the messages sent by members of their own house.

    I'm looking to replicate this functionality, but the API page is sorely in need of an update.

    I've poked around in the files included in the API but I cannot seem to find anything directly related to channels. I hardly expect this section to work like ChannelChat, being two completely different plugins, but I'd like it to operate in the same way for my users once the new plugin is in place.

    Any assistance with this is appreciated.

    Fox
     
  3. Turns out the latest placeholderapi causes that bug & is not venturechats fault. dev builds of placeholderapi work.
     
  4. Is there any documentation for changing the format of the /tell or private messages? I can't seem to find it.

    Thanks.
     
  5. @Foxtrek_64 It's possible but it's going to be a little more involved than just writing a few API methods. You can take a look at the ChatListener class in the source code (linked on the first overview page) and see how I did it for Factions and Towny channels. You basically want to remove recipients based on your own conditional BEFORE VentureChat receives the chat event, and then VChat will do the rest of the parsing work.

    PM me for anything else. I've helped a few people do something similar to this before.
     
  6. So there is no other way to change the You message (playername): messagegoeshere text when using /msg?

    Grammar error with "You message" should be "You messaged". Would be nice to have a config option where I can edit the format of /msg to make it less ugly.
     
  7. @Cisnet You can change it in the config. And I believe the default messages to be fine. You're messaging the player in the present in my opinion. No need to use past tense wording, but you can set it to whatever you want.


    To everyone:
    If I have time over the summer, I will attempt to do some major refactoring of the plugin to update some of the older functions and inner workings, but right now I'm very busy with school, and I will be working over the summer as well. Hopefully VChat is still your top chat plugin!
     
  8. I was looking for this as well, but wanted to change the format completely and the coloring to match my other channels. The only thing for the format I found in the config was 'Default' is there some sort of documentation on changing that? I imagine that it follows the format config like channels, but I couldn't find what the placeholder for the other player was - I image just {player}?

    PS - thank you for the hard work :) It's mucho appreciated.
     
  9. @Rmarmorstein It's {player_to} and {player_from} should be listed above the block in the config comments.
     
  10. Private messages bug out when a player changes their name, it displays their old name instead of the new ones.
     
  11. Code (Text):
    [13:49:09] [Async Chat Thread - #0/ERROR]: Could not pass event AsyncPlayerChatEvent to VentureChat v2.12.2
    org.bukkit.event.EventException: null
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:306) ~[spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:482) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at net.minecraft.server.v1_12_R1.PlayerConnection.chat(PlayerConnection.java:1319) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1257) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at net.minecraft.server.v1_12_R1.PacketPlayInChat$1.run(PacketPlayInChat.java:39) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_161]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_161]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_161]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_161]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
    Caused by: java.util.regex.PatternSyntaxException: Illegal repetition
    {player_name}
        at java.util.regex.Pattern.error(Unknown Source) ~[?:1.8.0_161]
        at java.util.regex.Pattern.closure(Unknown Source) ~[?:1.8.0_161]
        at java.util.regex.Pattern.sequence(Unknown Source) ~[?:1.8.0_161]
        at java.util.regex.Pattern.expr(Unknown Source) ~[?:1.8.0_161]
        at java.util.regex.Pattern.compile(Unknown Source) ~[?:1.8.0_161]
        at java.util.regex.Pattern.<init>(Unknown Source) ~[?:1.8.0_161]
        at java.util.regex.Pattern.compile(Unknown Source) ~[?:1.8.0_161]
        at java.lang.String.replaceAll(Unknown Source) ~[?:1.8.0_161]
        at me.clip.placeholderapi.PlaceholderAPI.setPlaceholders(PlaceholderAPI.java:203) ~[?:?]
        at me.clip.placeholderapi.PlaceholderAPI.setBracketPlaceholders(PlaceholderAPI.java:167) ~[?:?]
        at mineverse.Aust1n46.chat.utilities.Format.convertPlaceholders(Format.java:153) ~[?:?]
        at mineverse.Aust1n46.chat.utilities.Format.convertToJson(Format.java:110) ~[?:?]
        at mineverse.Aust1n46.chat.listeners.ChatListener.onAsyncPlayerChatEvent(ChatListener.java:688) ~[?:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_161]
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_161]
        at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_161]
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ~[spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        ... 11 more
    [13:49:09] [Async Chat Thread - #0/INFO]: [0;31;22m[0;37;22m[[0;31;22m[21mOwner[0;37;22m][0;35;22m [0;30;1m[21mLu[0;37;1m[21mc[0;36;1m[21my[m:[0;33;22m .[m
    [13:49:09] [Async Chat Thread - #0/ERROR]: [VentureChat] Unhandled exception occured in onPacketSending(PacketEvent) for VentureChat
    java.lang.NullPointerException: null
        at mineverse.Aust1n46.chat.listeners.PacketListener.onPacketSending(PacketListener.java:130) ~[VentureChat-2-12-2.jar:?]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:195) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.PacketFilterManager.handlePacket(PacketFilterManager.java:588) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.PacketFilterManager.invokePacketSending(PacketFilterManager.java:564) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.netty.ProtocolInjector.packetQueued(ProtocolInjector.java:338) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.netty.ProtocolInjector.onPacketSending(ProtocolInjector.java:298) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.netty.ChannelInjector.processSending(ChannelInjector.java:398) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.netty.ChannelInjector.access$500(ChannelInjector.java:78) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.netty.ChannelInjector$5.handleScheduled(ChannelInjector.java:364) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.netty.ChannelInjector$5.onMessageScheduled(ChannelInjector.java:332) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.netty.ChannelProxy$2.schedulingRunnable(ChannelProxy.java:127) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at com.comphenix.protocol.injector.netty.EventLoopProxy.execute(EventLoopProxy.java:95) [ProtocolLib-%23390.jar:4.4.0-SNAPSHOT-b390]
        at net.minecraft.server.v1_12_R1.NetworkManager.a(NetworkManager.java:194) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at net.minecraft.server.v1_12_R1.NetworkManager.sendPacket(NetworkManager.java:143) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at net.minecraft.server.v1_12_R1.PlayerConnection.sendPacket(PlayerConnection.java:1138) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.sendRawMessage(CraftPlayer.java:150) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.sendMessage(CraftPlayer.java:157) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at net.minecraft.server.v1_12_R1.PlayerConnection.chat(PlayerConnection.java:1372) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1257) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at net.minecraft.server.v1_12_R1.PacketPlayInChat$1.run(PacketPlayInChat.java:39) [spigot-1.12.2.jar:git-Spigot-3d850ec-f46ccd7]
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_161]
        at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_161]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_161]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_161]
        at java.lang.Thread.run(Unknown Source) [?:1.8.0_161]
    [13:49:09] [Async Chat Thread - #0/ERROR]: Parameters:
      [email protected][
        a=TextComponent{text='', siblings=[TextComponent{text='[', siblings=[], style=Style{hasParent=true, color=§7, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}, TextComponent{text='Owner', siblings=[], style=Style{hasParent=true, color=§4, bold=true, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}, TextComponent{text=']', siblings=[], style=Style{hasParent=true, color=§7, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}, TextComponent{text=' ', siblings=[], style=Style{hasParent=true, color=§5, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}, TextComponent{text='Lu', siblings=[], style=Style{hasParent=true, color=§8, bold=true, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}, TextComponent{text='c', siblings=[], style=Style{hasParent=true, color=§f, bold=true, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}, TextComponent{text='y', siblings=[], style=Style{hasParent=true, color=§b, bold=true, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}, TextComponent{text=':', siblings=[], style=Style{hasParent=true, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}, TextComponent{text=' .', siblings=[], style=Style{hasParent=true, color=§6, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}], style=Style{hasParent=false, color=null, bold=null, italic=null, underlined=null, obfuscated=null, clickEvent=null, hoverEvent=null, insertion=null}}
        components=<null>
        b=SYSTEM
      ]
     
  12. @Lucy_the_Cow Probably a formatting issue or that issue with PlaceholderAPI that was mentioned above.

    @MidnightSugar Probably uses a stored player name or something. I'll check it.
     
  13. Is there a list of valid string color values for Venture Chat? I've tried purple and violet for the &5 color, and light_green, bright_green, and lime for the &a color for the chatcolor config, and none of them work.
     
  14. Thought I should report this as I'm finding this really hard to reproduce each time. I would have a guess a plugin, I suspect PlaceholderAPI, is not loading fast enough sometimes for VentureChat and it is causing the server to crash when the ASyncChat event is fired.

    Code (Text):
    The server has stopped responding!
    Please report this to http://www.spigotmc.org/
    Be sure to include ALL relevant console errors and Minecraft crash reports
    Spigot version: git-Spigot-eadd615-4509a14 (MC: 1.12.2)
    ------------------------------
    Server thread dump (Look for plugins here before reporting to Spigot!):
    ------------------------------
    Current Thread: Server thread
    PID: 16 | Suspended: false | Native: false | State: RUNNABLE
    Stack:
    mineverse.Aust1n46.chat.utilities.Format.convertPlaceholders(Format.java:139)
    mineverse.Aust1n46.chat.utilities.Format.convertToJson(Format.java:110)
    mineverse.Aust1n46.chat.listeners.ChatListener.onAsyncPlayerChatEvent(ChatListener.java:688)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:498)
    org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
    org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500)
    org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485)
    net.minecraft.server.v1_12_R1.PlayerConnection.chat(PlayerConnection.java:1319)
    org.bukkit.craftbukkit.v1_12_R1.entity.CraftPlayer.chat(CraftPlayer.java:239)
    mineverse.Aust1n46.chat.listeners.CommandListener.onPlayerCommandPreprocess(CommandListener.java:208)
    sun.reflect.GeneratedMethodAccessor175.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    java.lang.reflect.Method.invoke(Method.java:498)
    org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302)
    org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500)
    org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485)
    net.minecraft.server.v1_12_R1.PlayerConnection.handleCommand(PlayerConnection.java:1389)
    net.minecraft.server.v1_12_R1.PlayerConnection.a(PlayerConnection.java:1232)
    net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:45)
    net.minecraft.server.v1_12_R1.PacketPlayInChat.a(PacketPlayInChat.java:1)
    net.minecraft.server.v1_12_R1.PlayerConnectionUtils$1.run(SourceFile:13)
    java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    23:51:32 net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406)
    net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:679)
    net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:577)
    java.lang.Thread.run(Thread.java:748)
    ------------------------------
    Current Thread: Server Infinisleeper
    PID: 17 | Suspended: false | Native: false | State: TIMED_WAITING
    Stack:
    java.lang.Thread.sleep(Native Method)
    net.minecraft.server.v1_12_R1.DedicatedServer$1.run(DedicatedServer.java:60)
    ------------------------------
    Current Thread: Snooper Timer
    PID: 13 | Suspended: false | Native: false | State: TIMED_WAITING
    Stack:
    java.lang.Object.wait(Native Method)
    java.util.TimerThread.mainLoop(Timer.java:552)
    java.util.TimerThread.run(Timer.java:505)
    ------------------------------
    Current Thread: Signal Dispatcher
    PID: 4 | Suspended: false | Native: false | State: RUNNABLE
    Stack:
    ------------------------------
    Current Thread: Finalizer
    PID: 3 | Suspended: false | Native: false | State: WAITING
    Stack:
    java.lang.Object.wait(Native Method)
    java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
    java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
    java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)
    ------------------------------
    Current Thread: Reference Handler
    PID: 2 | Suspended: false | Native: false | State: WAITING
    Stack:
    java.lang.Object.wait(Native Method)
    java.lang.Object.wait(Object.java:502)
    java.lang.ref.Reference.tryHandlePending(Reference.java:191)
    java.lang.ref.Reference$ReferenceHandler.run(Reference.java:153)
    ------------------------------
    This happens I would say 80% of the time I start the server. Once I type something in a chat channel it will then crash the server. I have to restart a few times until it will eventually work. There is no other error in the console until it crashes.

    I have the latest build of PlaceholderAPI and Spigot 1.12.2 installed also. The only variables I am using in jsonformating are {vault_eco_balance_fixed} and {player_name}.
     
  15. I was having a similar issue regarding PlaceholderAPI when I tried to use the placeholders, it didn't crash the server however, I just set it up differently. I'll get the exact error as soon as possible.

    I hope this gets resolved!

    EDIT

    It seems I can't replicate the error, but placeholders don't work in the chat, it just displays the placeholder (such as %server_online%). No worries however, I simply have the chat format configured differently.

    Should I take this up with the developer of PlaceholderAPI? Or is it a VentureChat issue?

    Thanks!
     
    #6096 TortillaSquad, Apr 16, 2018
    Last edited: Apr 17, 2018
  16. @Aust1n46
    Is it possible to edit the title of the moderation GUI? If not, would you consider adding that feature?

    Thanks!
     
  17. Code (Text):
    [Tue, 17. Apr 2018 19:23:19 PDT INFO] [387] [[3mImmune] [21m[3mCJC[21m[3mraf[21m[3mter: I agree!
    [Tue, 17. Apr 2018 19:23:19 PDT ERROR] io.netty.handler.codec.EncoderException: String too big (was 34424 bytes encoded, max 32767)
    [Tue, 17. Apr 2018 19:23:19 PDT ERROR] io.netty.handler.codec.EncoderException: String too big (was 34424 bytes encoded, max 32767)
    [Tue, 17. Apr 2018 19:23:19 PDT ERROR] io.netty.handler.codec.EncoderException: String too big (was 34424 bytes encoded, max 32767)
    [Tue, 17. Apr 2018 19:23:19 PDT ERROR] io.netty.handler.codec.EncoderException: String too big (was 34654 bytes encoded, max 32767)
    [Tue, 17. Apr 2018 19:23:19 PDT INFO] Jmau1 lost connection: Disconnected
    [Tue, 17. Apr 2018 19:23:19 PDT INFO] Jmau1 has left the Wasteland!
    [Tue, 17. Apr 2018 19:23:19 PDT INFO] aFadedPotato lost connection: Disconnected
    [Tue, 17. Apr 2018 19:23:19 PDT INFO] aFadedPotato has left the Wasteland!
    [Tue, 17. Apr 2018 19:23:19 PDT INFO] Lucy_the_Cow lost connection: Disconnected
    [Tue, 17. Apr 2018 19:23:20 PDT INFO] Lucy_the_Cow has left the Wasteland!
    [Tue, 17. Apr 2018 19:23:20 PDT INFO] CJCrafter lost connection: Disconnected
    [Tue, 17. Apr 2018 19:23:20 PDT INFO] CJCrafter has left the Wasteland!
    I've had this issue happen a few times with nicknames, also with the hovering over a user's tag - if an affected user talks in chat, it kicks everyone from the server.
     
  18. @Lucy_the_Cow How did you manage to exceed the byte limit of the packets..? Are you using the most updated version. I fixed a bug that would multiply the packet size by the number of servers and potentially exceed the limit.
     
  19. Most recent version, (2.12.2) yeah. It's happened a few times with players using too many colour codes in their nicks. Say they have Bold, Italic and a color code for a couple of letters it causes it.