public PlayerManager() {
   nonSolid.add(0);
   for (int b = 8; b < 12; b++) nonSolid.add(b);
   nonSolid.add(Material.SNOW.getId());
   nonSolid.add(Material.LONG_GRASS.getId());
   nonSolid.add(Material.RED_MUSHROOM.getId());
   nonSolid.add(Material.RED_ROSE.getId());
   nonSolid.add(Material.YELLOW_FLOWER.getId());
   nonSolid.add(Material.BROWN_MUSHROOM.getId());
   nonSolid.add(Material.SIGN_POST.getId());
   nonSolid.add(Material.WALL_SIGN.getId());
   nonSolid.add(Material.FIRE.getId());
   nonSolid.add(Material.TORCH.getId());
   nonSolid.add(Material.REDSTONE_WIRE.getId());
   nonSolid.add(Material.REDSTONE_TORCH_OFF.getId());
   nonSolid.add(Material.REDSTONE_TORCH_ON.getId());
   nonSolid.add(Material.VINE.getId());
 }
Exemple #2
0
  public void processJoin(Player player) {
    // Last chance to check
    if (!player.isOnline()) {
      return;
    }
    String name = player.getName();
    j2.irc.processJoin(name);
    j2.ip.processJoin(name);
    j2.warps.processJoin(name);
    j2.damage.processJoin(name);
    j2.jail.processJoin(player);
    this.playerReset(name);
    if (player.getInventory().getHelmet().getTypeId() == Material.FIRE.getId()) {
      player.getInventory().setHelmet(new ItemStack(Material.GRASS));
      player.sendMessage(ChatColor.RED + "You fizzle out");
    }
    if (j2.maintenance) {
      player.sendMessage(ChatColor.YELLOW + "We are in maintenance mode");
    }
    try {
      j2.mcbans.processJoin(player);
    } catch (Exception e) {

    }
    for (String line : j2.motd) {
      player.sendMessage(line);
    }
    if (j2.reallyHasFlag(name, Flag.ADMIN)) {
      int count = this.j2.reports.numReports();
      player.sendMessage(ChatColor.LIGHT_PURPLE + "There are " + count + " reports. ");
    }
    j2.minitrue.processJoin(player);
    if (j2.hasFlag(player, Flag.CONTRIBUTOR)) {
      player.sendMessage(
          ChatColor.LIGHT_PURPLE + "We think you're an " + ChatColor.GOLD + "AMAZING CONTRIBUTOR");
      player.sendMessage(
          ChatColor.LIGHT_PURPLE
              + "to the minecraft community as a whole! "
              + ChatColor.RED
              + "<3");
    }
  }