Fixed a little code in snowbrawl.py... even if its an outdated version.

This commit is contained in:
Dico200
2015-02-21 15:55:41 +01:00
parent 2246b9f5a8
commit 1fd3d591f9

View File

@@ -7,7 +7,7 @@ arenas = {}
ArenaName
PlayersPerGame
Objective
PlayersInQue
PlayersInQueue
"""
@hook.event("entity.ProjectileHitEvent", "high")
@@ -22,8 +22,9 @@ def onHit(event):
print "Not in minigames"
return"""
print "all good."
event.getEntity().getWorld().createExplosion(event.getEntity().getLocation().getX(), event.getEntity().getLocation().getY(),event.getEntity().getLocation().getZ(),float(5),False,True)
entity = event.getEntity()
location = entity.getLocation()
entity.getWorld().createExplosion(location.getX(), location.getY(), location.getZ(), float(5), False, True)
@hook.event("Player.PlayerInteractEvent")
@@ -86,7 +87,8 @@ class Coordinate(Object):
def inRange(location, range):
xd = location.getBlockX() - getX()
zd = location.getBlockZ() - getZ()
return xd >= 0 and xd <= range_ and zd >= 0 and zd <= range_
return xd >= 0 and xd <= range and zd >= 0 and zd <= range
class Match(Object):
names = []