Fixed a little code in snowbrawl.py... even if its an outdated version.
This commit is contained in:
10
snowbrawl.py
10
snowbrawl.py
@@ -7,7 +7,7 @@ arenas = {}
|
|||||||
ArenaName
|
ArenaName
|
||||||
PlayersPerGame
|
PlayersPerGame
|
||||||
Objective
|
Objective
|
||||||
PlayersInQue
|
PlayersInQueue
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@hook.event("entity.ProjectileHitEvent", "high")
|
@hook.event("entity.ProjectileHitEvent", "high")
|
||||||
@@ -22,8 +22,9 @@ def onHit(event):
|
|||||||
print "Not in minigames"
|
print "Not in minigames"
|
||||||
return"""
|
return"""
|
||||||
print "all good."
|
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")
|
@hook.event("Player.PlayerInteractEvent")
|
||||||
@@ -86,7 +87,8 @@ class Coordinate(Object):
|
|||||||
def inRange(location, range):
|
def inRange(location, range):
|
||||||
xd = location.getBlockX() - getX()
|
xd = location.getBlockX() - getX()
|
||||||
zd = location.getBlockZ() - getZ()
|
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):
|
class Match(Object):
|
||||||
|
|
||||||
names = []
|
names = []
|
||||||
|
|||||||
Reference in New Issue
Block a user