Package org.mctourney.autoreferee

Examples of org.mctourney.autoreferee.AutoRefMatch.broadcast()


        String ename = String.format("%s @ %s", event.getRightClicked().getType().getName(),
          LocationUtil.toBlockCoords(event.getRightClicked().getLocation()));

        // save the entity's unique id
        UUID uid; match.toggleProtection(uid = event.getRightClicked().getUniqueId());
        match.broadcast(ChatColor.RED + ename + ChatColor.RESET + " is " +
          (match.isProtected(uid) ? "" : "not ") + "a protected entity");


        break;
View Full Code Here


    AutoRefMatch match = plugin.getMatch(commandBlock.getWorld());
    if (match == null) return;

    if (event.getCommand().startsWith("say"))
    {
      match.broadcast(ChatColor.DARK_GRAY + "" + ChatColor.ITALIC + "[@] " +
        ChatColor.RESET + event.getCommand().substring(3).trim());
      event.setCommand(""); return;
    }
  }
View Full Code Here

      // if we are logging in to the wrong world, teleport to the correct world
      if (player.getWorld() != match.getWorld()) match.joinMatch(player);
      else match.checkTeamsReady();

      if (!match.getCurrentState().inProgress() || match.isPlayer(player))
        match.broadcast(match.colorMessage(event.getJoinMessage()));
      event.setJoinMessage(null);

      match.sendMatchInfo(player);
      match.setupSpectators(player);
View Full Code Here

  {
    AutoRefMatch match = plugin.getMatch(event.getPlayer().getWorld());
    if (match != null)
    {
      if (!match.getCurrentState().inProgress() || match.isPlayer(event.getPlayer()))
        match.broadcast(match.colorMessage(event.getQuitMessage()));
      event.setQuitMessage(null);

      // set the player back to the main scoreboard
      event.getPlayer().setScoreboard(Bukkit.getScoreboardManager().getMainScoreboard());
    }
View Full Code Here

    if (apl != null && PracticeMenuOption.fromSlot(event.getSlot()) != null)
      switch (PracticeMenuOption.fromSlot(event.getSlot()))
    {
      case ADVANCE_TIME:
        player.getWorld().setFullTime(player.getWorld().getFullTime() + 1000L);
        match.broadcast(ChatColor.DARK_GRAY + "[" + apl.getDisplayName() +
          ChatColor.DARK_GRAY + "] Advanced time by one hour");
        break;

      case SET_TIME_SUNRISE:
        player.getWorld().setTime(0L);
View Full Code Here

          ChatColor.DARK_GRAY + "] Advanced time by one hour");
        break;

      case SET_TIME_SUNRISE:
        player.getWorld().setTime(0L);
        match.broadcast(ChatColor.DARK_GRAY + "[" + apl.getDisplayName() +
          ChatColor.DARK_GRAY + "] Set time to 7am");
        break;

      case SET_TIME_SUNSET:
        player.getWorld().setTime(13000L);
View Full Code Here

          ChatColor.DARK_GRAY + "] Set time to 7am");
        break;

      case SET_TIME_SUNSET:
        player.getWorld().setTime(13000L);
        match.broadcast(ChatColor.DARK_GRAY + "[" + apl.getDisplayName() +
          ChatColor.DARK_GRAY + "] Set time to 9pm");
        break;

      case NIGHT_VISION:
        player.addPotionEffect(new PotionEffect(PotionEffectType.NIGHT_VISION, 8 * 60 * 20, 1));
View Full Code Here

      case TOGGLE_GODMODE:
        boolean b = !apl.isGodMode();
        apl.setGodMode(b);

        match.broadcast(ChatColor.DARK_GRAY + "[" + apl.getDisplayName() +
          ChatColor.DARK_GRAY + "] Toggled invulnerability " + ChatColor.RED + (b ? "ON" : "OFF"));
        break;

      case HEAL: PlayerUtil.heal(player); break;
      case FEED: PlayerUtil.feed(player); break;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.