Beispiel #1
0
  public static Player getPlayer(String playerName) {
    if (SimpleClans.getInstance().hasUUID()) {
      return SimpleClans.getInstance()
          .getServer()
          .getPlayer(UUIDMigration.getForcedPlayerUUID(playerName));
    }

    return SimpleClans.getInstance().getServer().getPlayer(playerName);
  }
Beispiel #2
0
  /**
   * Get a players full color name if he is online
   *
   * @param playerName
   * @return
   */
  public static String getColorName(String playerName) {
    List<Player> players = SimpleClans.getInstance().getServer().matchPlayer(playerName);

    if (players.size() == 1) {
      return SimpleClans.getInstance().getPermissionsManager().getPrefix(players.get(0))
          + players.get(0).getName()
          + SimpleClans.getInstance().getPermissionsManager().getSuffix(players.get(0));
    }

    return playerName;
  }
Beispiel #3
0
 /** Dumps stacktrace to log */
 public static void dumpStackTrace() {
   for (StackTraceElement el : Thread.currentThread().getStackTrace()) {
     SimpleClans.debug(el.toString());
   }
 }