當前位置: 首頁>>代碼示例>>Java>>正文


Java Text.join方法代碼示例

本文整理匯總了Java中org.spongepowered.api.text.Text.join方法的典型用法代碼示例。如果您正苦於以下問題:Java Text.join方法的具體用法?Java Text.join怎麽用?Java Text.join使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.spongepowered.api.text.Text的用法示例。


在下文中一共展示了Text.join方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getTagColored

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
@Override
public Text getTagColored() {
    TextColor colonColor = TextColors.GRAY;
    if (Config.getBoolean(Config.USE_COLORED_TAGS_BASED_ON_CLAN_KDR)) {
        ClanImpl firstClan = ClansImpl.getInstance().getFirstClan();
        ClanImpl secondClan = ClansImpl.getInstance().getSecondClan();
        ClanImpl thirdClan = ClansImpl.getInstance().getThirdClan();
        if (firstClan != null && firstClan.getTag().equalsIgnoreCase(getTag())) {
            colonColor = TextColors.DARK_RED;
        } else if (secondClan != null && secondClan.getTag().equalsIgnoreCase(getTag())) {
            colonColor = TextColors.GOLD;
        } else if (thirdClan != null && thirdClan.getTag().equalsIgnoreCase(getTag())) {
            colonColor = TextColors.DARK_BLUE;
        }
    }

    return Text.join(
            Text.builder("[").color(colonColor).build(),
            Text.builder(tag).color(tagColor).build(),
            Text.builder("]").color(colonColor).build()
    );
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:23,代碼來源:ClanImpl.java

示例2: sendClanBroadcastMessagePlayerHasEndedTheAllianceWithClan

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendClanBroadcastMessagePlayerHasEndedTheAllianceWithClan(ClanImpl clan, String playerName, String allyClanName) {
    Text message = Text.join(
            Text.builder("Игрок ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(playerName).color(BASIC_HIGHLIGHT).build(),
            Text.builder(" прекратил союз с ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(allyClanName).color(BASIC_HIGHLIGHT).build()
    );
    clan.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:10,代碼來源:Messages.java

示例3: formatKdr

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static Text formatKdr(int total, int high, int medium, int low) {
    return Text.join(
            Text.of(String.valueOf(total)),
            Text.builder(" [").color(TextColors.GRAY).build(),
            Text.of(String.valueOf(high)),
            Text.builder(" : ").color(TextColors.GRAY).build(),
            Text.of(String.valueOf(medium)),
            Text.builder(" : ").color(TextColors.GRAY).build(),
            Text.of(String.valueOf(low)),
            Text.builder("]").color(TextColors.GRAY).build()
    );
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:13,代碼來源:Utils.java

示例4: sendTeleportingInXSeconds

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendTeleportingInXSeconds(CommandSource commandSource, int seconds) {
    Text message = Text.join(
            Text.builder("Телепортация через ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(String.valueOf(seconds)).color(BASIC_HIGHLIGHT).build(),
            Text.of(" "),
            Text.builder((seconds == 1) ? "секунду" : "секунд").color(BASIC_CHAT_COLOR).build()
    );
    commandSource.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:10,代碼來源:Messages.java

示例5: sendYouNeedToUnignoreAllyChatBeforeTalking

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendYouNeedToUnignoreAllyChatBeforeTalking(CommandSource commandSource) {
    Text message = Text.join(
            Text.builder("Чтобы написать в этот чат, нужно разблокировать его. Используйте ").color(WARNING_CHAT_COLOR).build(),
            Text.builder("/clan chat ignore ally").color(WARNING_HIGHLIGHT).build()
    );
    commandSource.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:8,代碼來源:Messages.java

示例6: sendRemovingPermissionFailedRankDoesNotHaveThisPermission

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendRemovingPermissionFailedRankDoesNotHaveThisPermission(CommandSource commandSource, String pcode) {
    Text message = Text.join(
            Text.builder("Removing permission ").color(WARNING_CHAT_COLOR).build(),
            Text.builder(pcode).color(WARNING_HIGHLIGHT).build(),
            Text.builder(" failed: Rank does not have this permission").color(WARNING_CHAT_COLOR).build()
    );
    commandSource.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:9,代碼來源:Messages.java

示例7: sendBroadcastMessageClanDisbandedBy

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendBroadcastMessageClanDisbandedBy(String clanName, Text coloredClanTag, String disbander) {
    Text message = Text.join(
            Text.builder("Клан ").color(BASIC_CHAT_COLOR).build(),
            coloredClanTag,
            Text.builder(" " + clanName).color(BASIC_HIGHLIGHT).build(),
            Text.builder(" распущен игроком ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(disbander).color(BASIC_HIGHLIGHT).build()
    );
    Sponge.getServer().getBroadcastChannel().send(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:11,代碼來源:Messages.java

示例8: sendClanBroadcastMessageClanFriendlyFireProtectionHasBeenActivatedByPlayer

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendClanBroadcastMessageClanFriendlyFireProtectionHasBeenActivatedByPlayer(ClanImpl clan, String playerName) {
    Text message = Text.join(
            Text.builder("Защита от PvP между участниками клана включена игроком ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(playerName).color(BASIC_HIGHLIGHT).build()
    );
    clan.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:8,代碼來源:Messages.java

示例9: sendRemovingPermissionFailedNotAValidPermission

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendRemovingPermissionFailedNotAValidPermission(CommandSource commandSource, String pcode) {
    Text message = Text.join(
            Text.builder("Удалено право ").color(WARNING_CHAT_COLOR).build(),
            Text.builder(pcode).color(WARNING_HIGHLIGHT).build(),
            Text.builder(" failed: Not a valid permission ").color(WARNING_CHAT_COLOR).build()
    );
    commandSource.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:9,代碼來源:Messages.java

示例10: sendClanBroadcastMessagePlayerResignedFromTheClan

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendClanBroadcastMessagePlayerResignedFromTheClan(ClanImpl clan, String playerName) {
    Text message = Text.join(
            Text.builder("Игрок ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(playerName).color(BASIC_HIGHLIGHT).build(),
            Text.builder(" покинул клан").color(BASIC_CHAT_COLOR).build()
    );
    clan.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:9,代碼來源:Messages.java

示例11: sendThisClanHasAlreadyBeenInvitedToBecomeAlliesWithClan

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendThisClanHasAlreadyBeenInvitedToBecomeAlliesWithClan(CommandSource commandSource, String otherInvitingClan) {
    Text message = Text.join(
            Text.builder("Клан уже приглашен стать союзником с ").color(WARNING_CHAT_COLOR).build(),
            Text.builder(otherInvitingClan).color(WARNING_HIGHLIGHT).build(),
            Text.builder(". Повторите попытку после их ответа на другое приглашение").color(WARNING_CHAT_COLOR).build()
    );
    commandSource.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:9,代碼來源:Messages.java

示例12: sendClanBroadcastMessagePlayerJoinedTheClan

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendClanBroadcastMessagePlayerJoinedTheClan(ClanImpl clan, String playerName) {
    Text message = Text.join(
            Text.builder("Игрок ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(playerName).color(BASIC_HIGHLIGHT).build(),
            Text.builder(" присоединился к клану").color(BASIC_CHAT_COLOR).build()
    );
    clan.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:9,代碼來源:Messages.java

示例13: sendClanBroadcastMessagePlayerDeclinedClanInvite

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendClanBroadcastMessagePlayerDeclinedClanInvite(ClanImpl clan, String playerName, String permission) {
    Text message = Text.join(
            Text.builder("Игрок ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(playerName).color(BASIC_HIGHLIGHT).build(),
            Text.builder(" отклонил приглашение в клан").color(BASIC_CHAT_COLOR).build()
    );
    clan.sendMessage(permission, message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:9,代碼來源:Messages.java

示例14: sendClanBankBalance

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendClanBankBalance(CommandSource commandSource, double balance, String currencyName) {
    Text message = Text.join(
            Text.builder("Баланс клана: ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(String.valueOf(balance)).color(BASIC_HIGHLIGHT).build(),
            Text.builder(" " + currencyName).color(BASIC_CHAT_COLOR).build()
    );
    commandSource.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:9,代碼來源:Messages.java

示例15: sendRankSuccessfullyCreated

import org.spongepowered.api.text.Text; //導入方法依賴的package包/類
public static void sendRankSuccessfullyCreated(CommandSource commandSource, String rankName) {
    Text message = Text.join(
            Text.builder("Ранг ").color(BASIC_CHAT_COLOR).build(),
            Text.builder(rankName).color(BASIC_HIGHLIGHT).build(),
            Text.builder(" успешно создан").color(BASIC_CHAT_COLOR).build()
    );
    commandSource.sendMessage(message);
}
 
開發者ID:iLefty,項目名稱:mcClans,代碼行數:9,代碼來源:Messages.java


注:本文中的org.spongepowered.api.text.Text.join方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。