1234567891011121314151617181920212223242526272829303132333435363738394041 |
- map = map.new();
- player = read.player("marvinius");
- if(player == null) {
- msg("dev", "marvinius ist nicht online");
- term();
- }
- loc = entity.getLocation(player);
- world = loc.getWorld(loc);
- list = world.getEntities(world);
- size = list.getSize(list);
- living = 0;
- for(i = 0; i < size; i++) {
- element = list.getIndex(list, i);
- if(isLiving(element)) {
- living++;
- //living.removeAi(element);
- entity_type = entity.getType(element);
- n = map.get(map, entity_type);
- if(n == null) {
- map.add(map, entity_type, 1);
- } else {
- map.add(map, entity_type, n + 1);
- }
- }
- }
- msg("dev", "§0-------------------------------------------------");
- msg("dev", "Living: ", living);
- iter = map.iterator(map);
- table = table.new("§b", 14, 14);
- msg("dev", table.getStart(table));
- while(hasNext(iter)) {
- element1 = next(iter);
- if(hasNext(iter)) {
- element2 = next(iter);
- } else {
- element2 = "";
- }
- msg("dev", table.get(table, element1, element2));
- }
- msg("dev", table.getEnd(table));
|