本文整理匯總了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;
}