Package com.massivecraft.factions.entity

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


        // Allow PVP vs. Factionless in attacker's faction territory
        return true;
      }
      else if (uconf.disablePVPForFactionlessPlayers)
      {
        if (notify) fattacker.msg("<i>You can't hurt players who are not currently in a faction.");
        return false;
      }
    }

    Rel relation = defendFaction.getRelationTo(attackFaction);
View Full Code Here


    Rel relation = defendFaction.getRelationTo(attackFaction);

    // Check the relation
    if (fdefender.hasFaction() && relation.isFriend() && defenderPsFaction.getFlag(FFlag.FRIENDLYFIRE) == false)
    {
      if (notify) fattacker.msg("<i>You can't hurt %s<i>.", relation.getDescPlayerMany());
      return false;
    }

    // You can not hurt neutrals in their own territory.
    boolean ownTerritory = fdefender.isInOwnTerritory();
View Full Code Here

    boolean ownTerritory = fdefender.isInOwnTerritory();
    if (fdefender.hasFaction() && ownTerritory && relation == Rel.NEUTRAL)
    {
      if (notify)
      {
        fattacker.msg("<i>You can't hurt %s<i> in their own territory unless you declare them as an enemy.", fdefender.describeTo(fattacker));
        fdefender.msg("%s<i> tried to hurt you.", fattacker.describeTo(fdefender, true));
      }
      return false;
    }
View Full Code Here

    command = command.trim();
   
    // ... the command may be denied for members of permanent factions ...
    if (uplayer.hasFaction() && uplayer.getFaction().getFlag(FFlag.PERMANENT) && containsCommand(command, UConf.get(player).denyCommandsPermanentFactionMember))
    {
      uplayer.msg("<b>You can't use \"<h>/%s<b>\" as member of a permanent faction.", command);
      event.setCancelled(true);
      return;
    }
   
    // ... if there is a faction at the players location ...
View Full Code Here

   
    List<String> deniedCommands = UConf.get(player).denyCommandsTerritoryRelation.get(rel);
    if (deniedCommands == null) return;
    if (!containsCommand(command, deniedCommands)) return;
   
    uplayer.msg("<b>You can't use \"<h>/%s<b>\" in %s territory.", Txt.getNicedEnum(rel), command);
    event.setCancelled(true);
  }

  private static boolean containsCommand(String needle, Collection<String> haystack)
  {
View Full Code Here

    if (!FPerm.BUILD.has(uplayer, ps, false) && FPerm.PAINBUILD.has(uplayer, ps, false))
    {
      if (verboose)
      {
        Faction hostFaction = BoardColls.get().getFactionAt(ps);
        uplayer.msg("<b>It is painful to build in the territory of %s<b>.", hostFaction.describeTo(uplayer));
        player.damage(UConf.get(player).actionDeniedPainAmount);
      }
      return true;
    }
   
View Full Code Here

    if (membershipChangeEvent.isCancelled()) return;
   
    // Inform
    if (!samePlayer)
    {
      uplayer.msg("<i>%s <i>moved you into the faction %s<i>.", usender.describeTo(uplayer, true), faction.getName(uplayer));
    }
    faction.msg("<i>%s <i>joined <lime>your faction<i>.", uplayer.describeTo(faction, true));
    usender.msg("<i>%s <i>successfully joined %s<i>.", uplayer.describeTo(usender, true), faction.getName(usender));
   
    // Apply
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.