summaryrefslogtreecommitdiff
path: root/snowbrawl.py
diff options
context:
space:
mode:
authorDico200 <dico.karssiens@gmail.com>2015-02-21 15:55:41 +0100
committerDico200 <dico.karssiens@gmail.com>2015-02-21 15:55:41 +0100
commit1fd3d591f94df9fb32c6474346f28c909b94d467 (patch)
tree41d0175eb4b0c84b7cd4488ffabc12fb04fbd7b5 /snowbrawl.py
parent2246b9f5a8aa1a11130cd5740181b0ce696672ba (diff)
Fixed a little code in snowbrawl.py... even if its an outdated version.
Diffstat (limited to 'snowbrawl.py')
-rw-r--r--snowbrawl.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/snowbrawl.py b/snowbrawl.py
index ba97774..8bb8f31 100644
--- a/snowbrawl.py
+++ b/snowbrawl.py
@@ -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 = []