if (!entity.isDead) {
if (entity instanceof EntityPlayerMP) {
Unsafe $ = UnsafeAccess.$;
Object lock = ((EntityPlayerMP) entity).playerNetServerHandler;
if ($.tryMonitorEnter(lock)) {
try {
world.updateEntity(entity);
} finally {
$.monitorExit(lock);
}