Update fake player inventory when modified

This commit is contained in:
hhhzzzsss 2023-06-19 20:53:00 -05:00
parent fa76bb4d96
commit 8db9603e22

View file

@ -92,6 +92,7 @@ public class SongHandler {
loaderThread = null; loaderThread = null;
} }
// Run cached command if timeout reached
checkCommandCache(); checkCommandCache();
// Check if no song is playing and, if necessary, handle cleanup // Check if no song is playing and, if necessary, handle cleanup
@ -116,6 +117,9 @@ public class SongHandler {
if (!Config.getConfig().showFakePlayer && SongPlayer.fakePlayer != null) { if (!Config.getConfig().showFakePlayer && SongPlayer.fakePlayer != null) {
SongPlayer.removeFakePlayer(); SongPlayer.removeFakePlayer();
} }
if (SongPlayer.fakePlayer != null) {
SongPlayer.fakePlayer.getInventory().clone(SongPlayer.MC.player.getInventory());
}
SongPlayer.MC.player.getAbilities().allowFlying = true; SongPlayer.MC.player.getAbilities().allowFlying = true;
wasFlying = SongPlayer.MC.player.getAbilities().flying; wasFlying = SongPlayer.MC.player.getAbilities().flying;