本文整理汇总了Java中org.pircbotx.Colors.BLUE属性的典型用法代码示例。如果您正苦于以下问题:Java Colors.BLUE属性的具体用法?Java Colors.BLUE怎么用?Java Colors.BLUE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.pircbotx.Colors
的用法示例。
在下文中一共展示了Colors.BLUE属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prism
public static String prism(char c, int number) {
String result = null;
System.out.println(number);
switch (number) {
case 1:
result = Colors.RED + c;
break;
case 2:
result = Colors.YELLOW + c;
break;
case 3:
result = Colors.DARK_GREEN + c;
break;
case 4:
result = Colors.CYAN + c;
break;
case 5:
result = Colors.BLUE + c;
break;
case 6:
result = Colors.MAGENTA + c;
break;
}
return result;
}
示例2: onMessage
@Override
public void onMessage(MessageEvent event) throws Exception {
if (event.getMessage().startsWith(Helix.botPrefix + Commands.checkMinecraftAccount + " ") && event.getMessage().length() > (Commands.checkMinecraftAccount.length() + 2)) {
String a = event.getMessage().split(" ", 2)[1].replace(" ", "");
String m;
try {
JSONObject r = new JSONObject(Util.getHTTPResponse("https://api.mojang.com/users/profiles/minecraft/" + URLEncoder.encode(a, "UTF-8")));
String name = r.getString("name");
String id = r.getString("id");
JSONArray h = new JSONArray(Util.getHTTPResponse("https://api.mojang.com/user/profiles/" + id + "/names"));
m = "Username: " + Colors.GREEN + name + Colors.NORMAL + " UUID: " + Colors.MAGENTA + id + Colors.NORMAL + " Username history: " + Colors.BLUE + h.getJSONObject(0).getString("name") + Colors.NORMAL;
for (int i = 1; i < h.length(); i++){
m += ", " + Colors.BLUE + h.getJSONObject(i).getString("name") + Colors.NORMAL;
}
} catch (JSONException e) {
m = Colors.RED + "User " + a + " not found!";
}
event.getChannel().send().message(m);
}
}
示例3: determineColor
private String determineColor(ItemClass color2) {
switch(color2) {
case Normal: case Newbie: return Colors.NORMAL;
case Animal: return Colors.BOLD + Colors.BROWN;
case Spiritual: return Colors.BOLD + Colors.BLUE;
case Saint: return Colors.BOLD + Colors.DARK_BLUE;
case Avatar: return Colors.BOLD + Colors.DARK_GREEN;
case Special: return Colors.BOLD + Colors.PURPLE;
case Retro: return Colors.BOLD + Colors.BLACK;
case Idle: return Colors.BOLD + Colors.MAGENTA;
}
return Colors.MAGENTA;
}