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


Java EntityPlayer.getUniqueID方法代码示例

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


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

示例1: createActionOptions

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public int createActionOptions(World world, BlockPos pos, EnumFacing side, @Nullable EntityPlayer player) {
    List<MeeCreepActionType> types = new ArrayList<>();
    List<MeeCreepActionType> maybeTypes = new ArrayList<>();
    for (MeeCreepsApi.Factory type : MeeCreeps.api.getFactories()) {
        if (Config.allowedActions.contains(type.getId())) {
            if (type.getFactory().isPossible(world, pos, side)) {
                types.add(new MeeCreepActionType(type.getId()));
            } else if (type.getFactory().isPossibleSecondary(world, pos, side)) {
                maybeTypes.add(new MeeCreepActionType(type.getId()));
            }
        }
    }
    int actionId = newId();
    ActionOptions opt = new ActionOptions(types, maybeTypes, pos, side, world.provider.getDimension(), player == null ? null : player.getUniqueID(), actionId);
    options.add(opt);
    optionMap.put(actionId, opt);
    save();
    return actionId;
}
 
开发者ID:McJty,项目名称:MeeCreeps,代码行数:20,代码来源:ServerActionManager.java

示例2: setPlayer

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public void setPlayer(EntityPlayer player)
{
	if (player != null)
	{
		this.stackOwner = player.getUniqueID();
	} else
	{
		this.stackOwner = null;
	}
	markDirty();
}
 
开发者ID:raphydaphy,项目名称:ArcaneMagic,代码行数:12,代码来源:TileEntityAnalyzer.java

示例3: shouldAttackPlayer

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
private boolean shouldAttackPlayer(EntityPlayer player) {
	if (isTamed() && player.getUniqueID() == getOwnerId()) {
		return false;
	}
	if (getAttackingEntity() != null && getAttackingEntity() == player) {
		if (isTamed() && isSitting()) {
			setSitting(false);
		}
	}
	return getAttackingEntity() != null && getAttackingEntity() == player;
}
 
开发者ID:p455w0rd,项目名称:EndermanEvolution,代码行数:12,代码来源:EntityFrienderman.java

示例4: isBot

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public static boolean isBot(EntityPlayer entity) {
    if (entity.getUniqueID().toString().startsWith(entity.getCommandSenderName()))
        return true;
    if (!StringUtils.stripControlCodes(entity.getGameProfile().getName()).equals(entity.getCommandSenderName()))
        return true;
    if (entity.getGameProfile().getId() != entity.getUniqueID())
        return true;

    return false;
}
 
开发者ID:SerenityEnterprises,项目名称:SerenityCE,代码行数:11,代码来源:AntiBot.java

示例5: isValid

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public boolean isValid(EntityPlayer player) {
    boolean valid = isPlayerValid(player);

    UUID uuid = player.getUniqueID();
    boolean suspicious = !(pingUpdatedUUIDs.contains(uuid) || sneakUpdatedUUIDs.contains(uuid) || sprintUpdatedUUIDs.contains(uuid));

    return valid && !AntiBot.isBot(player) && !suspicious && onFloorUUIDs.contains(uuid);
}
 
开发者ID:SerenityEnterprises,项目名称:SerenityCE,代码行数:9,代码来源:BotDetector.java

示例6: setPlayer

import net.minecraft.entity.player.EntityPlayer; //导入方法依赖的package包/类
public void setPlayer(EntityPlayer player) {
        playerUUID = player.getUniqueID();
        playerName = player.getName();
//        playerProfile = updateGameprofile(player.getGameProfile());
    }
 
开发者ID:CreeperShift,项目名称:WirelessCharger,代码行数:6,代码来源:TilePersonalCharger.java


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