}
if (!entityTickProfiler.startProfiling(new Runnable() {
@Override
public void run() {
if (location) {
TickRegion tickRegion = manager.getEntityRegion(hashCode);
if (tickRegion != null) {
tickRegion.profilingEnabled = false;
}
tickRegion = manager.getTileEntityRegion(hashCode);
if (tickRegion != null) {
tickRegion.profilingEnabled = false;
}
}
sendChat(commandSender, entityTickProfiler.writeStringData(new TableFormatter(commandSender)).toString());
}
}, location ? ProfilingState.CHUNK : ProfilingState.GLOBAL, time, worlds)) {
sendChat(commandSender, "Someone else is currently profiling.");
}
if (location) {
manager.profilingEnabled = false;
TickRegion tickRegion = manager.getEntityRegion(hashCode);
if (tickRegion != null) {
tickRegion.profilingEnabled = true;
}
tickRegion = manager.getTileEntityRegion(hashCode);
if (tickRegion != null) {