<commit_before>#Snowbrawl
from helpers import *

arenas = {}

"""
ArenaName
PlayersPerGame
Objective
PlayersInQue
"""

@hook.event("org.bukkit.event.entity.ProjectileHitEvent", "high")
def onHit(event):
    print "thrown"
    if event.getEntity().getType() != EntityType.SNOWBALL:
        print "Not a snowball?"
        return
    if event.getWorld().getName() != "minigames":
        print "Not in minigames"
        return
    print "all good."
    event.getWorld().createExplosion(event.getLocation(),1)

        



@hook.event("PlayerInteractEvent")
def onClick(event):
    if (event.getAction() != Action.RIGHT_CLICK_BLOCK):
        return
    block = event.getClickedBlock()
    if not block.getMaterial() in [Material.SIGN_POST, Material.WALL_SIGN]:
        return
    sign_state = block.getState()
    lines      = bukkit.block.Sign.getLines(sign_state)
    


class Queue(Object):
    
    queue = []
    
    def __init__(self):

    def add(name):
        queue.append(name)
    def rem(names):
        for name in names:
            queue.remove(name)
    def shrink():
        queue.remove(0)
        
class Arena(Object):

    queue = Queue()
    size = 0
    coordinate = Coordinate(0, 0)

    def __init__(self, coordinate, size):
        self.coordinate = coordinate
        self.size = size

    def getLocation():
        return coordinate
    def getSize():
        return size
    def getQueue():
        return queue

class Coordinate(Object):

    x = 0
    z = 0

    def __init__(self, x, z):
        self.x = x
        self.z = z

    def getX():
        return x
    def getZ():
        return z

    def inRange(location, range):
        xd = location.getBlockX() - getX()
        zd = location.getBlockZ() - getZ()
        return xd >= 0 and xd <= range_ and zd >= 0 and zd <= range_
"""
class Match(Object):

    names = []

    def __init__(self, ):
"""
def getArena(location):
    for name in arenas:
        arena = arenas.get(name)
        if arena.getLocation().inRange(location, arena.getSize() - 1)
            return arena
    return None<commit_msg>commented un needed stuff<commit_after>#Snowbrawl
from helpers import *

arenas = {}

"""
ArenaName
PlayersPerGame
Objective
PlayersInQue
"""

@hook.event("Entity.ProjectileHitEvent", "high")
def onHit(event):
    print "thrown"
    if event.getEntity().getType() != EntityType.SNOWBALL:
        print "Not a snowball?"
        return
    if event.getWorld().getName() != "minigames":
        print "Not in minigames"
        return
    print "all good."
    event.getWorld().createExplosion(event.getLocation(),1)

        

@hook.event("PlayerInteractEvent")
def onClick(event):
    if (event.getAction() != Action.RIGHT_CLICK_BLOCK):
        return
    block = event.getClickedBlock()
    if not block.getMaterial() in [Material.SIGN_POST, Material.WALL_SIGN]:
        return
    sign_state = block.getState()
    lines      = bukkit.block.Sign.getLines(sign_state)
    

"""
class Queue(Object):
    
    queue = []
    
    def __init__(self):

    def add(name):
        queue.append(name)
    def rem(names):
        for name in names:
            queue.remove(name)
    def shrink():
        queue.remove(0)
        
class Arena(Object):

    queue = Queue()
    size = 0
    coordinate = Coordinate(0, 0)

    def __init__(self, coordinate, size):
        self.coordinate = coordinate
        self.size = size

    def getLocation():
        return coordinate
    def getSize():
        return size
    def getQueue():
        return queue

class Coordinate(Object):

    x = 0
    z = 0

    def __init__(self, x, z):
        self.x = x
        self.z = z

    def getX():
        return x
    def getZ():
        return z

    def inRange(location, range):
        xd = location.getBlockX() - getX()
        zd = location.getBlockZ() - getZ()
        return xd >= 0 and xd <= range_ and zd >= 0 and zd <= range_
class Match(Object):

    names = []

    def __init__(self, ):
def getArena(location):
    for name in arenas:
        arena = arenas.get(name)
        if arena.getLocation().inRange(location, arena.getSize() - 1)
            return arena
    return None
"""
{'fraction_non_alphanumeric': 0.11912751677852348, 'fraction_numerical': 0.004793863854266539, 'mean_word_length': 2.2806603773584904, 'pattern_counts': {'":': 2, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2676147', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1301, 'n_words': 334}