Programe Jython

Se intra folosind Google Chrome sau Internet Explorer pe www.minecluj.com:8000

Apoi, la Host scrieti minecluj.com
port 44445
password swordfish
si faceti clic pe butonul “Connect”

Copiati programele de mai jos, pe rand, si …succes la modificari !

Serverul e activ (online) doar intre orele 14 si 19 !!!!!!!!!!

Program 1

from org.bukkit import Bukkit
from org.bukkit import Location
from org.bukkit.util import Vector
from org.bukkit.entity import EntityType
s = Bukkit.getServer()
players=Bukkit.getOnlinePlayers()
player=players[2]
w=player.getLocation().getWorld()
loc=player.getLocation()
for x in range(100, 120):

w.spawnEntity(loc, EntityType.RABBIT)

Program 2

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 Entity
s = Bukkit.getServer()
players=Bukkit.getOnlinePlayers()
player=players[0]
loc=player.getLocation()
w=loc.getWorld()
ent=w.getEntities()
nr=0
for e in ent:
print e.getLocation().distance(loc)
nr=nr+1
e.teleport(loc)

Program 3

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 Entity
s = Bukkit.getServer()
players=Bukkit.getOnlinePlayers()
player=players[0]
w=player.getLocation().getWorld()
ent=w.getEntities()
for e in ent:
if (e.getType()==EntityType.RABBIT):
e.remove()

 

Program 4

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 *
from time import *
from org.bukkit import Effect
s = Bukkit.getServer()
players=Bukkit.getOnlinePlayers()
player=players[0]
loc=player.getLocation()
w=player.getLocation().getWorld()
w.strikeLightning(loc)

Program 5

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
s = Bukkit.getServer()
players=Bukkit.getOnlinePlayers()
player=players[0]
loc=player.getLocation()
w=player.getLocation().getWorld()
player.launchProjectile(Snowball)

Sper sa reusiti sa corectati erorile (am lasat cateva pe acolo , sa nu va plictisiti)!

Leave a comment