Aust1n46 / VentureChat

GNU General Public License v3.0
37 stars 47 forks source link

Support 1.19.1 #32

Closed dlee13 closed 1 year ago

dlee13 commented 1 year ago

First, refactor VersionHandler. ProtocolLib, which is already a hard dependency of this project, has a MinecraftVersion type that handles parsing the Bukkit version string. Using that allows us to more concisely determine the server version. Minecraft versions 1.19 and 1.19.1 have different protocols, so we don't want VersionHandler::is1_19 to be true for 1.19.1.

Then, fix the System Chat Packet which changed in format between 1.19 and 1.19.1.

AxlRose-RX commented 1 year ago

did you try it on 1.19.1 Velocity? that is where most of the issues come

dlee13 commented 1 year ago

did you try it on 1.19.1 Velocity? that is where most of the issues come

Yes, I tested it locally as well as deployed it on a public server with a Velocity network.

thedarkonekiller commented 1 year ago

Hello how can we download the compatible version 1.19.1?

osfanbuff63 commented 1 year ago

Hello how can we download the compatible version 1.19.1?

You'll need to clone the repository and build it - but I'm sure someone would be willing to do it for you (myself included normally, but not right now as I'm on vacation).

AxlRose-RX commented 1 year ago

@thedarkonekiller https://www.gp-mc.net/threads/venturechat-plugin-for-1-19-1.57/

Thank you @dlee13 I am using it on my 1.19.1 Velocity network with back ends 1.19.1 and working pretty good so far

Strahilchu commented 1 year ago

Need this!

Nik0-0 commented 1 year ago

@thedarkonekiller https://www.gp-mc.net/threads/venturechat-plugin-for-1-19-1.57/

Thank you @dlee13 I am using it on my 1.19.1 Velocity network with back ends 1.19.1 and working pretty good so far

For me that's not working:

[16:35:28] [Server thread/WARN]: [ProtocolLib] Loaded class mineverse.Aust1n46.chat.utilities.Format from VentureChat v3.4.1_1.19_patch which is not a depend or softdepend of this plugin. [16:35:28] [Server thread/ERROR]: Error occurred while enabling VentureChat v3.4.1_1.19_patch (Is it up to date?) com.comphenix.protocol.reflect.FieldAccessException: No field with type int exists in class ClientboundSystemChatPacket. at com.comphenix.protocol.reflect.StructureModifier.writeInternal(StructureModifier.java:367) ~[ProtocolLib (6).jar:?] at com.comphenix.protocol.reflect.StructureModifier.write(StructureModifier.java:347) ~[ProtocolLib (6).jar:?] at mineverse.Aust1n46.chat.utilities.Format.createPacketPlayOutChat(Format.java:441) ~[VentureChat-3.4.1_1.19_patch.jar:?] at mineverse.Aust1n46.chat.command.chat.Edit.(Edit.java:24) ~[VentureChat-3.4.1_1.19_patch.jar:?] at mineverse.Aust1n46.chat.command.VentureCommandExecutor.initialize(VentureCommandExecutor.java:113) ~[VentureChat-3.4.1_1.19_patch.jar:?] at mineverse.Aust1n46.chat.MineverseChat.onEnable(MineverseChat.java:123) ~[VentureChat-3.4.1_1.19_patch.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[purpur-api-1.19.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[purpur-api-1.19.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:548) ~[purpur-api-1.19.1-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugin(CraftServer.java:594) ~[purpur-1.19.1.jar:git-Purpur-1749] at org.bukkit.craftbukkit.v1_19_R1.CraftServer.enablePlugins(CraftServer.java:508) ~[purpur-1.19.1.jar:git-Purpur-1749] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:641) ~[purpur-1.19.1.jar:git-Purpur-1749] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:427) ~[purpur-1.19.1.jar:git-Purpur-1749] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:342) ~[purpur-1.19.1.jar:git-Purpur-1749] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1140) ~[purpur-1.19.1.jar:git-Purpur-1749] at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.1.jar:git-Purpur-1749] at java.lang.Thread.run(Thread.java:833) ~[?:?] [16:35:28] [Server thread/INFO]: [VentureChat] Disabling VentureChat v3.4.1_1.19_patch [16:35:28] [Server thread/INFO]: [VentureChat] - Disabling... [16:35:28] [Server thread/INFO]: [VentureChat] - Disabled Successfully

dlee13 commented 1 year ago

From your stacktrace, it looks like you're using the released 3.4.1_1.19_patch build.

The relevant lines of the stacktrace: at mineverse.Aust1n46.chat.utilities.Format.createPacketPlayOutChat(Format.java:441) ~[VentureChat-3.4.1_1.19_patch.jar:?] com.comphenix.protocol.reflect.FieldAccessException: No field with type int exists in class ClientboundSystemChatPacket.

The error is about being unable to write an int, encountered at line 441 of Format.java in the code.

https://github.com/Aust1n46/VentureChat/pull/32/files#diff-c84646b054f36a768a79e05b83e8b85ed561c57c92714c9409b070c5941ac23dL441 Line 441 of 3.4.1_1.19_patch is container.getIntegers().write(0, 1);

Line 441 of my patch is container.getChatComponents().write(0, component);

Pantera07 commented 1 year ago

Can VentureChat support chat message signing?

AxlRose-RX commented 1 year ago

@dlee13 have you tested this on 1.19.2 it should work or better wait before upgrading?

dlee13 commented 1 year ago

Can VentureChat support chat message signing?

Not currently.

@dlee13 have you tested this on 1.19.2 it should work or better wait before upgrading?

I checked on a local 1.19.2 server just now, and it works fine as far as I could tell.