当前位置: 首页>>代码示例>>Java>>正文


Java AdvancementProgress类代码示例

本文整理汇总了Java中org.bukkit.advancement.AdvancementProgress的典型用法代码示例。如果您正苦于以下问题:Java AdvancementProgress类的具体用法?Java AdvancementProgress怎么用?Java AdvancementProgress使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


AdvancementProgress类属于org.bukkit.advancement包,在下文中一共展示了AdvancementProgress类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: awardAdvancements

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
/**
 * Awards advancements created by Advanced Achievements. This method can be seen as a synchronisation to give
 * advancements which were generated after the corresponding achievement was received for a given player.
 * 
 * @param player
 */
private void awardAdvancements(Player player) {
	Advancement advancement = Bukkit.getServer()
			.getAdvancement(new NamespacedKey(plugin, AdvancementManager.ADVANCED_ACHIEVEMENTS_PARENT));
	// If no parent, user has not used /aach generate, do not do anything.
	if (advancement != null) {
		AdvancementProgress advancementProgress = player.getAdvancementProgress(advancement);
		if (!advancementProgress.isDone()) {
			advancementProgress.awardCriteria(AchievementAdvancement.CRITERIA_NAME);
		}
		for (String achName : plugin.getDatabaseManager().getPlayerAchievementNamesList(player.getUniqueId())) {
			advancement = Bukkit.getServer()
					.getAdvancement(new NamespacedKey(plugin, AdvancementManager.getKey(achName)));
			// Matching advancement might not exist if user has not called /aach generate.
			if (advancement != null) {
				advancementProgress = player.getAdvancementProgress(advancement);
				if (!advancementProgress.isDone()) {
					advancementProgress.awardCriteria(AchievementAdvancement.CRITERIA_NAME);
				}
			}
		}
	}
}
 
开发者ID:PyvesB,项目名称:AdvancedAchievements,代码行数:29,代码来源:AchieveConnectionListener.java

示例2: getAdvancementProgress

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
@Override
public AdvancementProgress getAdvancementProgress(Advancement advancement) {
    return implementation.getAdvancementProgress(advancement);
}
 
开发者ID:shawlaf,项目名称:Banmanager,代码行数:5,代码来源:CraftBanmanagerUser.java

示例3: getAdvancementProgress

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
@Override
public AdvancementProgress getAdvancementProgress(Advancement advancement)
{
	// TODO Auto-generated method stub
	throw new UnimplementedOperationException();
}
 
开发者ID:seeseemelk,项目名称:MockBukkit,代码行数:7,代码来源:PlayerMock.java

示例4: getAdvancements

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
/**
 * Return the number of advancements the player has completed.
 * @param player
 * @return count
 */
private static int getAdvancements(Player player) {
    List<Advancement> advancements = new ArrayList<>();
    Bukkit.advancementIterator().forEachRemaining(advancements::add);
    return (int) advancements.stream().map(player::getAdvancementProgress).filter(AdvancementProgress::isDone).count();
}
 
开发者ID:Kneesnap,项目名称:Kineticraft,代码行数:11,代码来源:CommandRankup.java

示例5: getAdvancementProgress

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
@Override
public AdvancementProgress getAdvancementProgress( Advancement advancement ) {
    return null;
}
 
开发者ID:lukas81298,项目名称:FlexMC,代码行数:5,代码来源:FlexPlayer.java

示例6: getAdvancementProgress

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
@Override
public AdvancementProgress getAdvancementProgress(Advancement advancement) {
    return player.getAdvancementProgress(advancement);
}
 
开发者ID:CyR1en,项目名称:Minecordbot,代码行数:5,代码来源:DiscordPlayerCommandSender.java

示例7: getAdvancementProgress

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
@Override
public AdvancementProgress getAdvancementProgress(Advancement advancement) {
    return null;
}
 
开发者ID:Proximyst,项目名称:Bukkit2Sponge,代码行数:5,代码来源:LinkedPlayer.java

示例8: getAdvancementProgress

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
@Override
public AdvancementProgress getAdvancementProgress(Advancement arg0) {
	return null;
}
 
开发者ID:DevotedMC,项目名称:HiddenOre,代码行数:5,代码来源:FakePlayer.java

示例9: getAdvancementProgress

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
@Override
public AdvancementProgress getAdvancementProgress(Advancement advancement) {
	throw Pokkit.unsupported();
}
 
开发者ID:rutgerkok,项目名称:Pokkit,代码行数:5,代码来源:PokkitPlayer.java

示例10: getAdvancementProgress

import org.bukkit.advancement.AdvancementProgress; //导入依赖的package包/类
@Override
public AdvancementProgress getAdvancementProgress(Advancement arg0) {
    throw new UnsupportedOperationException();

}
 
开发者ID:rutgerkok,项目名称:BlockLocker,代码行数:6,代码来源:TestPlayer.java


注:本文中的org.bukkit.advancement.AdvancementProgress类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。