Examples of Faction


Examples of com.massivecraft.factions.entity.Faction

  public void perform()
  {
    Double amount = this.arg(0, ARDouble.get());
    if (amount == null) return;
   
    Faction from = this.arg(1, ARFaction.get(sender));
    if (from == null) return;
   
    Faction to = this.arg(2, ARFaction.get(sender));
    if (to == null) return;
   
    boolean success = Econ.transferMoney(usender, from, to, amount);

    if (success && MConf.get().logMoneyTransactions)
    {
      Factions.get().log(ChatColor.stripColor(Txt.parse("%s transferred %s from the faction \"%s\" to the faction \"%s\"", usender.getName(), Money.format(from, amount), from.describeTo(null), to.describeTo(null))));
    }
  }
View Full Code Here

Examples of gwlpr.database.entities.Faction

        factionstat.getFactionstatPK().setAccountID(factionstat.getAccount().getId());
        EntityManager em = null;
        try {
            em = getEntityManager();
            em.getTransaction().begin();
            Faction faction = factionstat.getFaction();
            if (faction != null) {
                faction = em.getReference(faction.getClass(), faction.getId());
                factionstat.setFaction(faction);
            }
            Account account = factionstat.getAccount();
            if (account != null) {
                account = em.getReference(account.getClass(), account.getEMail());
                factionstat.setAccount(account);
            }
            em.persist(factionstat);
            if (faction != null) {
                faction.getFactionstatCollection().add(factionstat);
                faction = em.merge(faction);
            }
            if (account != null) {
                account.getFactionstatCollection().add(factionstat);
                account = em.merge(account);
View Full Code Here

Examples of lineage2.gameserver.templates.npc.Faction

        org.dom4j.Element secondElement = secondIterator.next();
        String nodeName = secondElement.getName();
        if (nodeName.equalsIgnoreCase("faction"))
        {
          String factionId = secondElement.attributeValue("name");
          Faction faction = new Faction(factionId);
          int factionRange = Integer.parseInt(secondElement.attributeValue("range"));
          faction.setRange(factionRange);
          for (Iterator<org.dom4j.Element> nextIterator = secondElement.elementIterator(); nextIterator.hasNext();)
          {
            final org.dom4j.Element nextElement = nextIterator.next();
            int ignoreId = Integer.parseInt(nextElement.attributeValue("npc_id"));
            faction.addIgnoreNpcId(ignoreId);
          }
          template.setFaction(faction);
        }
        else if (nodeName.equalsIgnoreCase("rewardlist"))
        {
View Full Code Here

Examples of smack.down.Faction

  public SeaDogs() {
    super("Sea Dogs", Faction.Pirates, Target.Base);
  }
 
  public void play(Base base, Callback callback) {
    Faction faction = callback.selectFaction();
    Base destBase = callback.selectBaseInPlay("Select destination Base", false, Callback.anyOtherBase(base));
   
    for (Minion minion : base.getMinions())
      if (minion.getFaction() == faction)
        minion.setBase(destBase);
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.