Use bukkit's updateInventory method for restoring NBT data

This commit is contained in:
games647
2016-06-28 11:22:30 +02:00
parent 23836cda6a
commit 2f341029a6
2 changed files with 4 additions and 45 deletions
@@ -2,6 +2,7 @@ package fr.xephi.authme.process.login;
import com.google.common.io.ByteArrayDataOutput;
import com.google.common.io.ByteStreams;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.cache.auth.PlayerAuth;
import fr.xephi.authme.cache.limbo.LimboCache;
@@ -19,6 +20,7 @@ import fr.xephi.authme.settings.properties.RegistrationSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.util.BukkitService;
import fr.xephi.authme.util.TeleportationService;
import org.apache.commons.lang.reflect.MethodUtils;
import org.bukkit.Bukkit;
import org.bukkit.entity.LivingEntity;
@@ -75,7 +77,7 @@ public class ProcessSyncPlayerLogin implements SynchronousProcess {
RestoreInventoryEvent event = new RestoreInventoryEvent(player);
pluginManager.callEvent(event);
if (!event.isCancelled()) {
player.updateInventory();
protocolLibService.sendInventoryPacket(player);
}
}