本文整理汇总了Java中org.pircbotx.UserLevel类的典型用法代码示例。如果您正苦于以下问题:Java UserLevel类的具体用法?Java UserLevel怎么用?Java UserLevel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UserLevel类属于org.pircbotx包,在下文中一共展示了UserLevel类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkIfCanKick
import org.pircbotx.UserLevel; //导入依赖的package包/类
public static boolean checkIfCanKick(Channel channel, PircBotX network, User user) {
Record relaybotsplit = DatabaseUtils.getChannelUserProperty(IRCUtils.getNetworkNameByNetwork(network), channel.getName(), PermUtils.authUser(network, user.getNick()), "relaybotsplit");
if (relaybotsplit == null) {
if (channel != null && channel.getUserLevels(network.getUserBot()).contains(UserLevel.OP) && !channel.isOwner(user) && !channel.isSuperOp(user)) {
return true;
} else if (channel != null && channel.getUserLevels(network.getUserBot()).contains(UserLevel.SUPEROP) && !channel.isOwner(user) && !channel.isSuperOp(user)) {
return true;
} else return channel != null && channel.getUserLevels(network.getUserBot()).contains(UserLevel.OWNER);
} else {
return false;
}
}
示例2: checkBot
import org.pircbotx.UserLevel; //导入依赖的package包/类
public static boolean checkBot(AgarBot bot, Channel channel) {
SortedSet<UserLevel> levels = bot.getUserBot().getUserLevels(channel);
return !levels.isEmpty() && levels.last().compareTo(UserLevel.OP) >= 0;
}
示例3: userIsOp
import org.pircbotx.UserLevel; //导入依赖的package包/类
public static boolean userIsOp(Channel channel, User user) {
return user.getUserLevels(channel).contains(UserLevel.OP);
}
示例4: userIsVoice
import org.pircbotx.UserLevel; //导入依赖的package包/类
public static boolean userIsVoice(Channel channel, User user) {
return user.getUserLevels(channel).contains(UserLevel.VOICE);
}
示例5: getUserLevels
import org.pircbotx.UserLevel; //导入依赖的package包/类
@Override
public ImmutableSortedSet<UserLevel> getUserLevels(Channel channel) {
return ImmutableSortedSet.of();
}
示例6: getUserLevels
import org.pircbotx.UserLevel; //导入依赖的package包/类
public ImmutableSortedSet<UserLevel> getUserLevels(User user) {
return ImmutableSortedSet.of();
}