Skip to content

Commit

Permalink
fix: RemoveResourcePack was renamed to RemoveResourcePackPacket
Browse files Browse the repository at this point in the history
  • Loading branch information
jimchen5209 committed Aug 15, 2024
1 parent b03531b commit 407c355
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ class ResourcePackHelper {
val resourcePack = main.config.galaxiesResourcePack[galaxy] ?: return
// workaround Minecraft 1.20.3 not auto unload old resource pack
try {
val packet = Class.forName("com.velocitypowered.proxy.protocol.packet.RemoveResourcePack").getConstructor().newInstance()
val packet = Class.forName("com.velocitypowered.proxy.protocol.packet.RemoveResourcePackPacket").getConstructor().newInstance()
player.sendPacket(packet)
} catch (e: Exception) {
main.logger.error("Send remove resource pack packet error.", e)
}

player.sendResourcePackOffer(
main.proxy.createResourcePackBuilder(resourcePack.uri.toString())
.setHash(resourcePack.hash)
Expand Down

0 comments on commit 407c355

Please sign in to comment.