- Quick fix. Safely update player's inventory.

* because it bugs me when i have items with custom NBT Tag
This commit is contained in:
DNx5 2016-06-27 16:50:45 +07:00
parent 75f64624bb
commit 99704e7c29

View File

@ -70,8 +70,8 @@ public class ProcessSyncPlayerLogin implements SynchronousProcess {
private void restoreInventory(Player player) {
RestoreInventoryEvent event = new RestoreInventoryEvent(player);
pluginManager.callEvent(event);
if (!event.isCancelled() && plugin.inventoryProtector != null) {
plugin.inventoryProtector.sendInventoryPacket(player);
if (!event.isCancelled()) {
player.updateInventory();
}
}