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


Java Scoreboard.removeObjective方法代码示例

本文整理汇总了Java中net.minecraft.scoreboard.Scoreboard.removeObjective方法的典型用法代码示例。如果您正苦于以下问题:Java Scoreboard.removeObjective方法的具体用法?Java Scoreboard.removeObjective怎么用?Java Scoreboard.removeObjective使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.scoreboard.Scoreboard的用法示例。


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

示例1: handleScoreboardObjective

import net.minecraft.scoreboard.Scoreboard; //导入方法依赖的package包/类
/**
 * May create a scoreboard objective, remove an objective from the scoreboard or
 * update an objectives' displayname
 */
public void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn) {
	PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
	Scoreboard scoreboard = this.clientWorldController.getScoreboard();

	if (packetIn.func_149338_e() == 0) {
		ScoreObjective scoreobjective = scoreboard.addScoreObjective(packetIn.func_149339_c(),
				IScoreObjectiveCriteria.DUMMY);
		scoreobjective.setDisplayName(packetIn.func_149337_d());
		scoreobjective.setRenderType(packetIn.func_179817_d());
	} else {
		ScoreObjective scoreobjective1 = scoreboard.getObjective(packetIn.func_149339_c());

		if (packetIn.func_149338_e() == 1) {
			scoreboard.removeObjective(scoreobjective1);
		} else if (packetIn.func_149338_e() == 2) {
			scoreobjective1.setDisplayName(packetIn.func_149337_d());
			scoreobjective1.setRenderType(packetIn.func_179817_d());
		}
	}
}
 
开发者ID:SkidJava,项目名称:BaseClient,代码行数:25,代码来源:NetHandlerPlayClient.java

示例2: removeObjective

import net.minecraft.scoreboard.Scoreboard; //导入方法依赖的package包/类
protected void removeObjective(ICommandSender p_147191_1_, String p_147191_2_) throws CommandException
{
    Scoreboard scoreboard = this.getScoreboard();
    ScoreObjective scoreobjective = this.getObjective(p_147191_2_, false);
    scoreboard.removeObjective(scoreobjective);
    notifyOperators(p_147191_1_, this, "commands.scoreboard.objectives.remove.success", new Object[] {p_147191_2_});
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:8,代码来源:CommandScoreboard.java

示例3: handleScoreboardObjective

import net.minecraft.scoreboard.Scoreboard; //导入方法依赖的package包/类
/**
 * May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
 */
public void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Scoreboard scoreboard = this.clientWorldController.getScoreboard();

    if (packetIn.func_149338_e() == 0)
    {
        ScoreObjective scoreobjective = scoreboard.addScoreObjective(packetIn.func_149339_c(), IScoreObjectiveCriteria.DUMMY);
        scoreobjective.setDisplayName(packetIn.func_149337_d());
        scoreobjective.setRenderType(packetIn.func_179817_d());
    }
    else
    {
        ScoreObjective scoreobjective1 = scoreboard.getObjective(packetIn.func_149339_c());

        if (packetIn.func_149338_e() == 1)
        {
            scoreboard.removeObjective(scoreobjective1);
        }
        else if (packetIn.func_149338_e() == 2)
        {
            scoreobjective1.setDisplayName(packetIn.func_149337_d());
            scoreobjective1.setRenderType(packetIn.func_179817_d());
        }
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:30,代码来源:NetHandlerPlayClient.java

示例4: handleScoreboardObjective

import net.minecraft.scoreboard.Scoreboard; //导入方法依赖的package包/类
/**
 * May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
 */
public void handleScoreboardObjective(SPacketScoreboardObjective packetIn)
{
    PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
    Scoreboard scoreboard = this.clientWorldController.getScoreboard();

    if (packetIn.getAction() == 0)
    {
        ScoreObjective scoreobjective = scoreboard.addScoreObjective(packetIn.getObjectiveName(), IScoreCriteria.DUMMY);
        scoreobjective.setDisplayName(packetIn.getObjectiveValue());
        scoreobjective.setRenderType(packetIn.getRenderType());
    }
    else
    {
        ScoreObjective scoreobjective1 = scoreboard.getObjective(packetIn.getObjectiveName());

        if (packetIn.getAction() == 1)
        {
            scoreboard.removeObjective(scoreobjective1);
        }
        else if (packetIn.getAction() == 2)
        {
            scoreobjective1.setDisplayName(packetIn.getObjectiveValue());
            scoreobjective1.setRenderType(packetIn.getRenderType());
        }
    }
}
 
开发者ID:NSExceptional,项目名称:Zombe-Modpack,代码行数:30,代码来源:NetHandlerPlayClient.java

示例5: removeObjective

import net.minecraft.scoreboard.Scoreboard; //导入方法依赖的package包/类
protected void removeObjective(ICommandSender sender, String name, MinecraftServer server) throws CommandException
{
    Scoreboard scoreboard = this.getScoreboard(server);
    ScoreObjective scoreobjective = this.convertToObjective(name, false, server);
    scoreboard.removeObjective(scoreobjective);
    notifyCommandListener(sender, this, "commands.scoreboard.objectives.remove.success", new Object[] {name});
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:8,代码来源:CommandScoreboard.java

示例6: removeObjective

import net.minecraft.scoreboard.Scoreboard; //导入方法依赖的package包/类
protected void removeObjective(ICommandSender sender, String p_184905_2_, MinecraftServer server) throws CommandException
{
    Scoreboard scoreboard = this.getScoreboard(server);
    ScoreObjective scoreobjective = this.convertToObjective(p_184905_2_, false, server);
    scoreboard.removeObjective(scoreobjective);
    notifyCommandListener(sender, this, "commands.scoreboard.objectives.remove.success", new Object[] {p_184905_2_});
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:8,代码来源:CommandScoreboard.java


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