Skip to content

Instantly share code, notes, and snippets.

@boy0001
Created December 7, 2015 05:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boy0001/2711e4472907a47f9abd to your computer and use it in GitHub Desktop.
Save boy0001/2711e4472907a47f9abd to your computer and use it in GitHub Desktop.
var Runnable = Java.type('java.lang.Runnable');
var iter = PS.getBasePlots().iterator();
var timout = 1;
var countEntities = Java.extend(Runnable, {
run: function() {
var plot = iter.next();
plot.setSign();
var entities = MainUtil.class.static.countEntities(plot);
print("Amount of entities in `" + plot + "`: " + entities[0]);
if (iter.hasNext()) {
TaskManager.taskLater(task ,timout);
}
}
});
var task = new countEntities();
task.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment