本文整理汇总了Java中com.massivecraft.factions.struct.Role类的典型用法代码示例。如果您正苦于以下问题:Java Role类的具体用法?Java Role怎么用?Java Role使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Role类属于com.massivecraft.factions.struct包,在下文中一共展示了Role类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getOfficers
import com.massivecraft.factions.struct.Role; //导入依赖的package包/类
@Override
public Set<FPlayer> getOfficers() {
Set<FPlayer> officers = new TreeSet<FPlayer>();
for (com.massivecraft.factions.FPlayer oplayer : this.faction.getFPlayersWhereRole(Role.MODERATOR)) {
officers.add(FPlayers.getById(oplayer.getId()));
}
return officers;
}
示例2: getRole
import com.massivecraft.factions.struct.Role; //导入依赖的package包/类
@Override
public Rel getRole() {
Role role = this.factionsfplayer.getRole();
if (role == Role.ADMIN) return Rel.LEADER;
if (role == Role.MODERATOR) return Rel.OFFICER;
return Rel.MEMBER;
}
示例3: setRole
import com.massivecraft.factions.struct.Role; //导入依赖的package包/类
@Override
public void setRole(Rel role) {
if (role == Rel.LEADER) {
this.factionsfplayer.setRole(Role.ADMIN);
return;
}
if (role == Rel.OFFICER) {
this.factionsfplayer.setRole(Role.MODERATOR);
return;
}
this.factionsfplayer.setRole(Role.NORMAL);
}
示例4: getPlayerRank
import com.massivecraft.factions.struct.Role; //导入依赖的package包/类
@Override
public MyRel getPlayerRank(Object player) {
Role role = FPlayers.getInstance().getByPlayer(player).getRole();
if (role.equals(Role.ADMIN)) {
return MyRel.LEADER;
} else if (role.equals(Role.MODERATOR)) {
return MyRel.OFFICER;
} else if (role.equals(Role.NORMAL)) {
return MyRel.MEMBER;
} else {
return MyRel.NEUTRAL;
}
}
示例5: canUseChest
import com.massivecraft.factions.struct.Role; //导入依赖的package包/类
public boolean canUseChest(Player p, FPlayer f, Sign s) {
if(f.getRole().equals(Role.ADMIN)||f.getRole().equals(Role.MODERATOR)) return true;
String IGN = p.getName();
if(s.getLine(0).equals(color("&a[Subclaim]"))) {
if(s.getLine(1).indexOf(IGN)!=-1||s.getLine(2).indexOf(IGN)!=-1||s.getLine(3).indexOf(IGN)!=-1) return true;
return false;
}
return true;
}