use of net.minecraft.server.v1_12_R1.CrashReport in project Citizens2 by CitizensDev.
the class NMSImpl method tick.
@Override
public boolean tick(org.bukkit.entity.Entity next) {
Entity entity = NMSImpl.getHandle(next);
Entity entity1 = entity.bB();
if (entity1 != null) {
if ((entity1.dead) || (!entity1.w(entity))) {
entity.stopRiding();
}
} else {
if (!entity.dead) {
try {
entity.world.g(entity);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking player");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Player being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails);
throw new ReportedException(crashreport);
}
}
boolean removeFromPlayerList = ((NPCHolder) entity).getNPC().data().get("removefromplayerlist", Setting.REMOVE_PLAYERS_FROM_PLAYER_LIST.asBoolean());
if (entity.dead) {
entity.world.removeEntity(entity);
return true;
} else if (!removeFromPlayerList) {
if (!entity.world.players.contains(entity)) {
entity.world.players.add((EntityHuman) entity);
}
return true;
} else {
entity.world.players.remove(entity);
}
}
return false;
}
use of net.minecraft.server.v1_12_R1.CrashReport in project Citizens2 by CitizensDev.
the class NMSImpl method tick.
@Override
public boolean tick(org.bukkit.entity.Entity next) {
Entity entity = NMSImpl.getHandle(next);
Entity entity1 = entity.bB();
if (entity1 != null) {
if ((entity1.dead) || (!entity1.w(entity))) {
entity.stopRiding();
}
} else {
if (!entity.dead) {
try {
entity.world.entityJoinedWorld(entity, true);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking player");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Player being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails);
throw new ReportedException(crashreport);
}
}
boolean removeFromPlayerList = ((NPCHolder) entity).getNPC().data().get("removefromplayerlist", Setting.REMOVE_PLAYERS_FROM_PLAYER_LIST.asBoolean());
if (entity.dead) {
entity.world.removeEntity(entity);
return true;
} else if (!removeFromPlayerList) {
if (!entity.world.players.contains(entity)) {
entity.world.players.add((EntityHuman) entity);
}
return true;
} else {
entity.world.players.remove(entity);
}
}
return false;
}
use of net.minecraft.server.v1_12_R1.CrashReport in project Citizens2 by CitizensDev.
the class NMSImpl method tick.
@Override
public boolean tick(org.bukkit.entity.Entity next) {
Entity entity = NMSImpl.getHandle(next);
if (!entity.dead) {
try {
entity.world.g(entity);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking player");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Player being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails);
throw new ReportedException(crashreport);
}
}
boolean removeFromPlayerList = ((NPCHolder) entity).getNPC().data().get("removefromplayerlist", Setting.REMOVE_PLAYERS_FROM_PLAYER_LIST.asBoolean());
if (entity.dead) {
entity.world.removeEntity(entity);
return true;
} else if (!removeFromPlayerList) {
if (!entity.world.players.contains(entity)) {
entity.world.players.add((EntityHuman) entity);
}
return true;
} else {
entity.world.players.remove(entity);
}
return false;
}
use of net.minecraft.server.v1_12_R1.CrashReport in project Citizens2 by CitizensDev.
the class NMSImpl method tick.
@Override
public boolean tick(org.bukkit.entity.Entity next) {
Entity entity = NMSImpl.getHandle(next);
Entity entity1 = entity.bJ();
if (entity1 != null) {
if ((entity1.dead) || (!entity1.w(entity))) {
entity.stopRiding();
}
} else {
if (!entity.dead) {
try {
entity.world.entityJoinedWorld(entity, true);
} catch (Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Ticking player");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Player being ticked");
entity.appendEntityCrashDetails(crashreportsystemdetails);
throw new ReportedException(crashreport);
}
}
boolean removeFromPlayerList = ((NPCHolder) entity).getNPC().data().get("removefromplayerlist", Setting.REMOVE_PLAYERS_FROM_PLAYER_LIST.asBoolean());
if (entity.dead) {
entity.world.removeEntity(entity);
return true;
} else if (!removeFromPlayerList) {
if (!entity.world.players.contains(entity)) {
entity.world.players.add((EntityHuman) entity);
}
return true;
} else {
entity.world.players.remove(entity);
}
}
return false;
}
Aggregations