JyCraft

from org.bukkit import Bukkit
from org.bukkit import Location
from org.bukkit.util import Vector
from org.bukkit.entity import EntityType
from org.bukkit.entity import Snowball
from org.bukkit.entity import *
from org.bukkit.projectiles import *
from time import *
from org.bukkit import Effect
from mcapi_spigot import *
from org.bukkit.event.block import BlockPlaceEvent
s = Bukkit.getServer()
players=Bukkit.getOnlinePlayers()
player=players[0]
loc=player.getLocation()
w=player.getLocation().getWorld()
x1=int(loc.x)
z1=int(loc.z)
i=1
for x in range(x1,x1+20):
for z in range(z1,z1+10):
setblock(x, 4, z, Material.values()[i])
i=i+1
print i

ent=w.getEntities()
nr=0
for e in ent:
e.remove()
nr=nr+1
print nr

nr=0
for p in players:
print p.getLocation().distance(loc)
nr=nr+1
print nr

nr=0
min=1000
entnr=0
for e in ent:
dist= e.getLocation().distance(loc)
if dist min=dist
entnr=nr
ent=e
nr=nr+1
print entnr,min,ent