Package com.massivecraft.factions.entity

Examples of com.massivecraft.factions.entity.UPlayer.msg()


    usenderFaction.setInvited(uplayer, newInvited);
   
    // Inform
    if (newInvited)
    {
      uplayer.msg("%s<i> invited you to %s", usender.describeTo(uplayer, true), usenderFaction.describeTo(uplayer));
      usenderFaction.msg("%s<i> invited %s<i> to your faction.", usender.describeTo(usenderFaction, true), uplayer.describeTo(usenderFaction));
    }
    else
    {
      uplayer.msg("%s<i> revoked your invitation to <h>%s<i>.", usender.describeTo(uplayer), usenderFaction.describeTo(uplayer));
View Full Code Here


      uplayer.msg("%s<i> invited you to %s", usender.describeTo(uplayer, true), usenderFaction.describeTo(uplayer));
      usenderFaction.msg("%s<i> invited %s<i> to your faction.", usender.describeTo(usenderFaction, true), uplayer.describeTo(usenderFaction));
    }
    else
    {
      uplayer.msg("%s<i> revoked your invitation to <h>%s<i>.", usender.describeTo(uplayer), usenderFaction.describeTo(uplayer));
      usenderFaction.msg("%s<i> revoked %s's<i> invitation.", usender.describeTo(usenderFaction), uplayer.describeTo(usenderFaction));
    }
  }
 
}
View Full Code Here

    double amount = Money.get(faction);
    String amountString = Money.format(faction, amount);
   
    Econ.transferMoney(usender, faction, usender, amount, true);
   
    usender.msg("<i>You have been given the disbanded faction's bank, totaling %s.", amountString);
    Factions.get().log(usender.getName() + " has been given bank holdings of "+amountString+" from disbanding "+faction.getName()+".");
  }
 
  // -------------------------------------------- //
  // PAY FOR ACTION
View Full Code Here

    event.run();
    if (event.isCancelled()) return;

    // Inform
    uplayerFaction.msg("%s<i> kicked %s<i> from the faction! :O", usender.describeTo(uplayerFaction, true), uplayer.describeTo(uplayerFaction, true));
    uplayer.msg("%s<i> kicked you from %s<i>! :O", usender.describeTo(uplayer, true), uplayerFaction.describeTo(uplayer));
    if (uplayerFaction != usenderFaction)
    {
      usender.msg("<i>You kicked %s<i> from the faction %s<i>!", uplayer.describeTo(usender), uplayerFaction.describeTo(usender));
    }
View Full Code Here

    // ... and powerloss can happen here ...
    Faction faction = BoardColls.get().getFactionAt(PS.valueOf(player));
   
    if (!faction.getFlag(FFlag.POWERLOSS))
    {
      uplayer.msg("<i>You didn't lose any power since the territory you died in works that way.");
      return;
    }
   
    if (MConf.get().worldsNoPowerLoss.contains(player.getWorld().getName()))
    {
View Full Code Here

      return;
    }
   
    if (MConf.get().worldsNoPowerLoss.contains(player.getWorld().getName()))
    {
      uplayer.msg("<i>You didn't lose any power due to the world you died in.");
      return;
    }
   
    // ... alter the power ...
    double newPower = uplayer.getPower() + uplayer.getPowerPerDeath();
View Full Code Here

   
    uplayer.setPower(newPower);
   
    // ... and inform the player.
    // TODO: A progress bar here would be epic :)
    uplayer.msg("<i>Your power is now <h>%.2f / %.2f", newPower, uplayer.getPowerMax());
  }
 
  // -------------------------------------------- //
  // CAN COMBAT DAMAGE HAPPEN
  // -------------------------------------------- //
View Full Code Here

      if (eattacker instanceof Player)
      {
        if (notify)
        {
          UPlayer attacker = UPlayer.get(eattacker);
          attacker.msg("<i>PVP is disabled in %s.", defenderPsFaction.describeTo(attacker));
        }
        return false;
      }
      return defenderPsFaction.getFlag(FFlag.MONSTERS);
    }
View Full Code Here

    // ... PVP flag may cause a damage block ...
    // (just checking the defender as above isn't enough. What about the attacker? It could be in a no-pvp area)
    // NOTE: This check is probably not that important but we could keep it anyways.
    if (attackerPsFaction.getFlag(FFlag.PVP) == false)
    {
      if (notify) fattacker.msg("<i>PVP is disabled in %s.", attackerPsFaction.describeTo(fattacker));
      return false;
    }

    // ... are PVP rules completely ignored in this world? ...
    if (MConf.get().worldsIgnorePvP.contains(defenderPs.getWorld())) return true;
View Full Code Here

    Faction attackFaction = fattacker.getFaction();
    UConf uconf = UConf.get(attackFaction);

    if (attackFaction.isNone() && uconf.disablePVPForFactionlessPlayers)
    {
      if (notify) fattacker.msg("<i>You can't hurt other players until you join a faction.");
      return false;
    }
    else if (defendFaction.isNone())
    {
      if (defenderPsFaction == attackFaction && uconf.enablePVPAgainstFactionlessInAttackersLand)
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.