Make sure that the backend server knows the pack application was successful
accepted, is just the first expected state, we also need to tell that the pack was actually applied on the client in order to allow it to progress in the connection process
This commit is contained in:
@@ -137,8 +137,13 @@ public class ConfigSessionHandler implements MinecraftSessionHandler {
|
|||||||
if (serverConn.getPlayer().resourcePackHandler().hasPackAppliedByHash(toSend.getHash())) {
|
if (serverConn.getPlayer().resourcePackHandler().hasPackAppliedByHash(toSend.getHash())) {
|
||||||
// Do not apply a resource pack that has already been applied
|
// Do not apply a resource pack that has already been applied
|
||||||
if (serverConn.getConnection() != null) {
|
if (serverConn.getConnection() != null) {
|
||||||
|
// We can technically skip these first 2 states, however, for conformity to normal state flow expectations...
|
||||||
serverConn.getConnection().write(new ResourcePackResponsePacket(
|
serverConn.getConnection().write(new ResourcePackResponsePacket(
|
||||||
packet.getId(), packet.getHash(), PlayerResourcePackStatusEvent.Status.ACCEPTED));
|
packet.getId(), packet.getHash(), PlayerResourcePackStatusEvent.Status.ACCEPTED));
|
||||||
|
serverConn.getConnection().write(new ResourcePackResponsePacket(
|
||||||
|
packet.getId(), packet.getHash(), PlayerResourcePackStatusEvent.Status.DOWNLOADED));
|
||||||
|
serverConn.getConnection().write(new ResourcePackResponsePacket(
|
||||||
|
packet.getId(), packet.getHash(), PlayerResourcePackStatusEvent.Status.SUCCESSFUL));
|
||||||
}
|
}
|
||||||
if (modifiedPack) {
|
if (modifiedPack) {
|
||||||
logger.warn("A plugin has tried to modify a ResourcePack provided by the backend server "
|
logger.warn("A plugin has tried to modify a ResourcePack provided by the backend server "
|
||||||
|
Reference in New Issue
Block a user