remove unnecesary check on checktask

This commit is contained in:
Esmorall 2019-12-21 12:48:07 -03:00
parent 7e31f4bab2
commit e38f3a5a3f
2 changed files with 6 additions and 10 deletions

View File

@ -40,11 +40,9 @@ public class CheckTask extends BukkitRunnable {
int d = ConfigMain.getTrackingRange();
for(Player player : Bukkit.getWorld(worldName).getPlayers()) {
for(Entity ent : player.getNearbyEntities(d, d, d)) {
if(!cps.playerChunkMap.trackedEntities.containsKey(ent.getEntityId())) {
trackAgain.add(((CraftEntity)ent).getHandle());
if(ConfigMain.isDisableTickUntracked()) {
EntityTickManager.getInstance().enableTicking(((CraftEntity)ent).getHandle(), worldName);
}
trackAgain.add(((CraftEntity)ent).getHandle());
if(ConfigMain.isDisableTickUntracked()) {
EntityTickManager.getInstance().enableTicking(((CraftEntity)ent).getHandle(), worldName);
}
}
}

View File

@ -40,11 +40,9 @@ public class CheckTask extends BukkitRunnable {
int d = ConfigMain.getTrackingRange();
for(Player player : Bukkit.getWorld(worldName).getPlayers()) {
for(Entity ent : player.getNearbyEntities(d, d, d)) {
if(!cps.playerChunkMap.trackedEntities.containsKey(ent.getEntityId())) {
trackAgain.add(((CraftEntity)ent).getHandle());
if(ConfigMain.isDisableTickUntracked()) {
EntityTickManager.getInstance().enableTicking(((CraftEntity)ent).getHandle(), worldName);
}
trackAgain.add(((CraftEntity)ent).getHandle());
if(ConfigMain.isDisableTickUntracked()) {
EntityTickManager.getInstance().enableTicking(((CraftEntity)ent).getHandle(), worldName);
}
}
}