Package org.mctourney.autoreferee.util

Examples of org.mctourney.autoreferee.util.PlayerKit


    if (this.getColor() != ChatColor.RESET) elt.setAttribute("color", this.getColor().name());
    if (this.maxsize != null) elt.setAttribute("maxsize", Integer.toString(this.maxsize));
    if (this.minsize != null) elt.setAttribute("minsize", Integer.toString(this.minsize));
    if (this.playerlives > 0) elt.setAttribute("lives", Integer.toString(this.playerlives));

    PlayerKit teamKit = this.getKit();
    if (teamKit != null) elt.setAttribute("kit", teamKit.getName());

    if (this.spawnRegions != null)
    {
      Element spawnElement = new Element("spawn");
      for (AutoRefRegion reg : this.spawnRegions)
View Full Code Here


    // if there is no match, quit
    if (match == null) return false;

    // get the kit with this name (case sensitive)
    PlayerKit kit = match.getKit(args[0]);
    if (kit == null) { sender.sendMessage("Not a valid kit: " + args[0]); return true; }

    // get the receiver
    AutoRefPlayer apl = match.getPlayer(args[1]);
    if (apl == null) { sender.sendMessage("Not a valid player: " + args[1]); return true; }

    kit.giveTo(apl);
    sender.sendMessage("Gave kit " + ChatColor.GOLD + kit.getName() +
      ChatColor.RESET + " to player " + apl.getDisplayName());
    return true;
  }
View Full Code Here

    Player p = getPlayer();
    if (p != null) PlayerUtil.reset(p);

    if (getTeam() != null)
    {
      PlayerKit kit = getTeam().getKit();
      if (kit != null) kit.giveTo(this);
    }
  }
View Full Code Here

    kits = Maps.newHashMap();

    // parse kits before parsing teams
    if (kitsElt != null) for (Element kitElt : kitsElt.getChildren("kit"))
    {
      PlayerKit kit = new PlayerKit(kitElt);
      kits.put(kit.getName(), kit);
    }

    teams = Sets.newHashSet();
    for (Element e : worldConfig.getChild("teams").getChildren("team"))
      teams.add(AutoRefTeam.fromElement(e, this));
View Full Code Here

TOP

Related Classes of org.mctourney.autoreferee.util.PlayerKit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.