Fix resource packs not working after first time jumping back in time

This commit is contained in:
Jonas Herzig
2017-08-19 15:20:40 +02:00
parent 933ee5f866
commit 0b9c56cdfd

View File

@@ -242,6 +242,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
try {
channelInactive(ctx);
ctx.channel().pipeline().close();
FileUtils.deleteDirectory(tempResourcePackFolder);
} catch(Exception e) {
e.printStackTrace();
}
@@ -490,12 +491,6 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
super.channelActive(ctx);
}
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
FileUtils.deleteDirectory(tempResourcePackFolder);
super.channelInactive(ctx);
}
/**
* Whether the replay is currently paused.
* @return {@code true} if it is paused, {@code false} otherwise