Package ch.njol.skript.localization

Examples of ch.njol.skript.localization.Noun


    if (adjectives == null) {
      this.adjectives = adjectives = new Adjective[colors.length];
      for (int i = 0; i < colors.length; i++)
        adjectives[i] = colors[i].getAdjective();
    }
    final Noun name = getName();
    final Adjective age = getAgeAdjective();
    return name.getArticleWithSpace(flags) + (age == null ? "" : age.toString(name.getGender(), flags) + " ")
        + Adjective.toString(adjectives, name.getGender(), flags, false) + " " + name.toString(flags & Language.NO_ARTICLE_MASK);
  }
View Full Code Here


    return baby.isTrue() ? m_baby : baby.isFalse() ? m_adult : null;
  }
 
  @SuppressWarnings("null")
  public String toString(final int flags) {
    final Noun name = info.names[matchedPattern];
    return baby.isTrue() ? m_baby.toString(name, flags) : baby.isFalse() ? m_adult.toString(name, flags) : name.toString(flags);
  }
View Full Code Here

      this.defaultName = defaultName;
      this.entityClass = entityClass;
      this.names = new Noun[codeNames.length];
      for (int i = 0; i < codeNames.length; i++) {
        assert codeNames[i] != null;
        names[i] = new Noun(LANGUAGE_NODE + "." + codeNames[i] + ".name");
      }
     
      Language.addListener(this, LanguageListenerPriority.LATEST); // will initialise patterns, LATEST to make sure that m_age_pattern is updated before this
    }
View Full Code Here

  public ClassInfo(final Class<T> c, final String codeName) {
    this.c = c;
    if (!isVaildCodeName(codeName))
      throw new IllegalArgumentException("Code names for classes must be lowercase and only consist of latin letters and arabic numbers");
    this.codeName = codeName;
    name = new Noun("types." + codeName);
  }
View Full Code Here

TOP

Related Classes of ch.njol.skript.localization.Noun

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.