Search in sources :

Example 1 with Faction

use of com.massivecraft.factions.Faction in project WildLoaders by BG-Software-LLC.

the class ClaimsProvider_FactionsUUID method hasClaimAccess.

@Override
public boolean hasClaimAccess(UUID player, Chunk chunk) {
    FPlayer fPlayer = FPlayers.getInstance().getById(player.toString());
    FLocation fLocation = new FLocation(chunk.getWorld().getName(), chunk.getX(), chunk.getZ());
    Faction faction = Board.getInstance().getFactionAt(fLocation);
    return !faction.isWilderness() && faction.getFPlayers().contains(fPlayer);
}
Also used : FPlayer(com.massivecraft.factions.FPlayer) FLocation(com.massivecraft.factions.FLocation) Faction(com.massivecraft.factions.Faction)

Example 2 with Faction

use of com.massivecraft.factions.Faction in project Conquer by xXAndrew28Xx.

the class FOClaim method setTo.

@Override
public void setTo(ClaimType type) {
    Faction faction;
    switch(type) {
        case WILDERNESS:
            faction = factions.get(FOPlugin.WILDERNESS_ID);
            break;
        case SAFE_ZONE:
            faction = factions.get(FOPlugin.SAFE_ZONE_ID);
            break;
        case WAR_ZONE:
            faction = factions.get(FOPlugin.WAR_ZONE_ID);
            break;
        default:
            return;
    }
    Board.setFactionAt(faction, fLocation);
}
Also used : Faction(com.massivecraft.factions.Faction)

Example 3 with Faction

use of com.massivecraft.factions.Faction in project UltimateChat by FabioZumbi12.

the class UCSFactionsHook method formatFac.

@Override
public String formatFac(String text, Player sender, Object receiver) {
    FPlayer fp = FPlayers.getInstance().getByPlayer(sender);
    if (!fp.getFaction().isWilderness()) {
        Faction fac = fp.getFaction();
        text = text.replace("{fac-id}", fac.getId()).replace("{fac-name}", fac.getTag()).replace("{fac-description}", fac.getDescription());
        // Saber doesn't have MOTD support
        if (receiver instanceof Player) {
            FPlayer recmp = FPlayers.getInstance().getByPlayer((Player) receiver);
            text = text.replace("{fac-relation-name}", fac.getTag(recmp)).replace("{fac-relation-color}", fac.getColorTo(recmp).toString());
        }
    }
    return text;
}
Also used : FPlayer(com.massivecraft.factions.FPlayer) Player(org.bukkit.entity.Player) FPlayer(com.massivecraft.factions.FPlayer) Faction(com.massivecraft.factions.Faction)

Example 4 with Faction

use of com.massivecraft.factions.Faction in project Conquer by xXAndrew28Xx.

the class FUClaim method setTo.

@Override
public void setTo(ClaimType type) {
    Faction faction;
    switch(type) {
        case WILDERNESS:
            faction = factions.getWilderness();
            break;
        case SAFE_ZONE:
            faction = factions.getSafeZone();
            break;
        case WAR_ZONE:
            faction = factions.getWarZone();
            break;
        default:
            return;
    }
    board.setFactionAt(faction, fLocation);
}
Also used : Faction(com.massivecraft.factions.Faction)

Example 5 with Faction

use of com.massivecraft.factions.Faction in project Conquer by xXAndrew28Xx.

the class SFClaim method setTo.

@Override
public void setTo(ClaimType type) {
    Faction faction;
    switch(type) {
        case WILDERNESS:
            faction = factions.getWilderness();
            break;
        case SAFE_ZONE:
            faction = factions.getSafeZone();
            break;
        case WAR_ZONE:
            faction = factions.getWarZone();
            break;
        default:
            return;
    }
    board.setFactionAt(faction, fLocation);
}
Also used : Faction(com.massivecraft.factions.Faction)

Aggregations

Faction (com.massivecraft.factions.Faction)5 FPlayer (com.massivecraft.factions.FPlayer)2 FLocation (com.massivecraft.factions.FLocation)1 Player (org.bukkit.entity.Player)1