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:
@@ -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()));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user