9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-26 10:09:10 +00:00

Add experience synchronisation

This commit is contained in:
William
2021-10-21 18:49:55 +01:00
parent 9198cd648f
commit 99ce0898da
7 changed files with 25 additions and 12 deletions

View File

@@ -29,6 +29,7 @@ public class PlayerSetter {
player.setSaturation(data.getSaturation());
player.setExhaustion(data.getSaturationExhaustion());
player.getInventory().setHeldItemSlot(data.getSelectedSlot());
player.setTotalExperience(data.getExperience());
//todo potion effects not working
setPlayerPotionEffects(player, DataSerializer.potionEffectArrayFromBase64(data.getSerializedEffectData()));

View File

@@ -35,7 +35,8 @@ public class EventListener implements Listener {
player.getSaturation(),
player.getExhaustion(),
player.getInventory().getHeldItemSlot(),
DataSerializer.getSerializedEffectData(player)));
DataSerializer.getSerializedEffectData(player),
player.getTotalExperience()));
}
@EventHandler