Check player is online as well. Fixes the errors

This commit is contained in:
libraryaddict 2013-12-17 00:11:13 +13:00
parent 3e4f581943
commit e4d71bb6a4

View File

@ -864,7 +864,7 @@ public class PacketsManager {
PacketType.Play.Client.WINDOW_CLICK) {
@Override
public void onPacketReceiving(final PacketEvent event) {
if (event.getPlayer().getVehicle() == null) {
if (event.getPlayer().isOnline() && event.getPlayer().getVehicle() == null) {
Disguise disguise = DisguiseAPI.getDisguise(event.getPlayer(), event.getPlayer());
// If player is disguised, views self disguises and has a inventory modifier
if (disguise != null && disguise.isSelfDisguiseVisible()