@@ -0,0 +1,2873 @@
+/*%0A * Copyright (c) 2016, Kevin Phoenix%0A * All rights reserved.%0A *%0A * Redistribution and use in source and binary forms, with or without%0A * modification, are permitted provided that the following conditions are met:%0A *%0A * 1. Redistributions of source code must retain the above copyright notice, this%0A *    list of conditions and the following disclaimer.%0A * 2. Redistributions in binary form must reproduce the above copyright notice,%0A *    this list of conditions and the following disclaimer in the documentation%0A *    and/or other materials provided with the distribution.%0A *%0A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS %22AS IS%22 AND%0A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED%0A * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE%0A * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR%0A * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES%0A * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;%0A * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND%0A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS%0A * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A */%0A%0Apackage in.twizmwaz.cardinal.util;%0A%0Aimport org.bukkit.Bukkit;%0Aimport org.bukkit.OfflinePlayer;%0Aimport org.bukkit.entity.Player;%0Aimport org.bukkit.inventory.ItemStack;%0A%0Aimport javax.annotation.Nonnull;%0Aimport javax.annotation.Nullable;%0Aimport java.util.UUID;%0A%0Apublic class Players %7B%0A%0A  /**%0A   * @param name The player's name containing modifiers.%0A   * @return The matched OfflinePlayer based on the modifiers.%0A   */%0A  @Nullable%0A  public static OfflinePlayer match(@Nonnull String name) %7B%0A    if (name.startsWith(%22@%22)) %7B%0A      return Bukkit.getOfflinePlayer(name.substring(1));%0A    %7D else if (name.startsWith(%22#%22)) %7B%0A      return Bukkit.getOfflinePlayer(UUID.fromString(name.substring(1)));%0A    %7D%0A    Player player = Bukkit.getPlayer(name);%0A    if (player != null) %7B%0A      return player;%0A    %7D%0A    return Bukkit.getOfflinePlayer(name);%0A  %7D%0A%0A  /**%0A   * @param player The player to be reset.%0A   */%0A  public static void reset(@Nonnull Player player) %7B%0A    player.getActivePotionEffects().forEach(effect -%3E player.removePotionEffect(effect.getType()));%0A    player.setExhaustion(0);%0A    player.setExp(0);%0A    player.setFireTicks(0);%0A    player.setFlySpeed(0.1F);%0A    player.setFoodLevel(20);%0A    player.setHealth(player.getMaxHealth());%0A    player.getInventory().clear();%0A    player.getInventory().setArmorContents(new ItemStack%5B%5D%7Bnull, null, null, null%7D);%0A    player.setRemainingAir(player.getMaximumAir());%0A    player.setSaturation(0);%0A    player.setTotalExperience(0);%0A    player.setWalkSpeed(0.2F);%0A  %7D%0A%0A%7D%0A

Add players util