public static boolean isLinked(Player p){
String uuid = p.getUniqueId().toString();
UtilsStorage storageType = Utils.getStorageType();
if(storageType == UtilsStorage.FILE){
if(UltimateTs.linkedPlayers.getConfigurationSection("linked") == null) UltimateTs.linkedPlayers.createSection("linked");
ConfigurationSection cs = UltimateTs.linkedPlayers.getConfigurationSection("linked");
if((cs.contains(uuid)) && (cs.getInt(uuid) > 0)) return true;
}else if(storageType == UtilsStorage.SQL){
if(UltimateTs.main().sql.isUUIDLinked(uuid)){
int linkedId = UltimateTs.main().sql.getLinkedId(uuid);
if(linkedId > 0){
return true;
}
}
}
return false;
}
PlayerManager.java 文件源码
java
阅读 34
收藏 0
点赞 0
评论 0
项目:UltimateTs
作者:
评论列表
文章目录