本文整理汇总了Java中sx.blah.discord.handle.obj.IGuild.getName方法的典型用法代码示例。如果您正苦于以下问题:Java IGuild.getName方法的具体用法?Java IGuild.getName怎么用?Java IGuild.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sx.blah.discord.handle.obj.IGuild
的用法示例。
在下文中一共展示了IGuild.getName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: serverElement
import sx.blah.discord.handle.obj.IGuild; //导入方法依赖的package包/类
public static String serverElement(IGuild g, Account acc) {
String s = "<table class='table_list usermod'><tr class='table_list_top'>"
+ "<td>"+Main.lang.getLangage("tools.usermod.guild.icon")+"</td>"
+ "<td>"+Main.lang.getLangage("tools.usermod.guild.name")+"</td>";
if(acc.hasPerm("guildmod"))s+="<td class='usermod_gtool'>"+Main.lang.getLangage("tools.usermod.guild.tool")+"</td>";
s+="<td class='usermod_id'>"+Main.lang.getLangage("tools.usermod.guild.id")+"</td></tr>"
+ "\n<tr>"
+ "\n<td class='usermod_gimg'><img src='"+g.getIconURL()+"' alt='"+Main.lang.getLangage("tools.usermod.guild.icon")+"' /></td>"
+ "\n<td>"+g.getName()+"</td>";
if(acc.hasPerm("guildmod")) s+="\n<td>\n <ul>"
+ "\n <a href='tools.ap?app=guildmod&guild="+g.getLongID()+"#text_edit'><li>"+Main.lang.getLangage("tools.guildmod.channel.text")+"</li></a>"
+ "\n <a href='tools.ap?app=guildmod&guild="+g.getLongID()+"#voice_edit'><li>"+Main.lang.getLangage("tools.guildmod.channel.voice")+"</li></a>"
+ "\n <a href='tools.ap?app=guildmod&guild="+g.getLongID()+"#role_edit'><li>"+Main.lang.getLangage("tools.guildmod.role")+"</li></a>"
+ "\n <a href='tools.ap?app=usermod&guild="+g.getLongID()+"#user_edit'><li>"+Main.lang.getLangage("tools.usermod")+"</li></a>"
+ "\n </ul>\n</td>";
s+="\n<td>"+g.getLongID()+"</td>"
+ "\n</tr></table>";
return s;
}
示例2: getGuild
import sx.blah.discord.handle.obj.IGuild; //导入方法依赖的package包/类
public DbGuild getGuild(IGuild guild){
if(Karren.conf.getAllowSQLRW()){
if(!dbGuildCache.containsKey(guild.getStringID())) {
String sql = "INSERT IGNORE Guild (GuildID, GuildOwner, GuildName, CommandPrefix, RollDifficulty, MaxVolume, RandomRange, OverrideChannel) VALUES (?, ?, ?, null, -1, 40, 0, 0)";
Object[] params = {guild.getStringID(), guild.getOwner().getName(), guild.getName()};
Yank.execute(sql, params);
sql = "SELECT * FROM Guild WHERE GuildID=?";
Object[] params2 = {guild.getStringID()};
DbGuild dbGuild = Yank.queryBean(sql, DbGuild.class, params2);
dbGuildCache.put(guild.getStringID(), dbGuild);
return dbGuild;
} else {
return dbGuildCache.get(guild.getStringID());
}
}
return null;
}
示例3: fromGuild
import sx.blah.discord.handle.obj.IGuild; //导入方法依赖的package包/类
public WebGuild fromGuild(IGuild g) {
id = g.getStringID();
name = g.getName();
iconUrl = g.getIconURL();
botNick = Main.client.getOurUser().getNicknameForGuild(g);
settings = DatabaseManager.getManager().getSettings(g.getLongID());
//Handle lists and stuffs
for (IRole r : g.getRoles()) {
roles.add(new WebRole().fromRole(r, settings));
}
WebChannel all = new WebChannel();
all.setId(0);
all.setName("All Channels");
all.setDiscalChannel(settings.getDiscalChannel().equalsIgnoreCase("all"));
channels.add(all);
for (IChannel c : g.getChannels()) {
channels.add(new WebChannel().fromChannel(c, settings));
}
announcements.addAll(DatabaseManager.getManager().getAnnouncements(g.getLongID()));
calendar = new WebCalendar().fromCalendar(DatabaseManager.getManager().getMainCalendar(Long.valueOf(id)), settings);
return this;
}
示例4: getGuild
import sx.blah.discord.handle.obj.IGuild; //导入方法依赖的package包/类
public synchronized static Guild getGuild(IGuild discordGuild, boolean forceCache){
Guild guild = getGuilds().get(discordGuild.getStringID());
if (guild == null && forceCache){
guild = new Guild(discordGuild.getStringID(), discordGuild.getName(), Constants.defaultLanguage);
guild.addToDatabase();
}
return guild;
}
示例5: DiscordGuild
import sx.blah.discord.handle.obj.IGuild; //导入方法依赖的package包/类
public DiscordGuild(IGuild guild) {
this.id = guild.getID();
this.name = guild.getName();
}