use of com.mojang.authlib.GameProfile in project PneumaticCraft by MineMaarten.
the class TileEntitySecurityStation method addHacker.
public void addHacker(GameProfile user) {
for (GameProfile hackedUser : hackedUsers) {
if (gameProfileEquals(hackedUser, user)) {
return;
}
}
for (GameProfile sharedUser : sharedUsers) {
if (gameProfileEquals(sharedUser, user))
return;
}
hackedUsers.add(user);
sendDescriptionPacket();
}
use of com.mojang.authlib.GameProfile in project Overloaded by CJ-MC-Mods.
the class BlockPlayerInterface method onBlockActivated.
@Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
if (!worldIn.isRemote && hand == EnumHand.MAIN_HAND) {
TileEntity te = worldIn.getTileEntity(pos);
if (te instanceof TilePlayerInterface) {
UUID placer = ((TilePlayerInterface) te).getPlacer();
GameProfile profile = worldIn.getMinecraftServer().getPlayerProfileCache().getProfileByUUID(placer);
if (profile == null) {
playerIn.sendMessage(new TextComponentString(String.format("Bound to offline player: %s", placer.toString())));
} else {
playerIn.sendMessage(new TextComponentString("Bound to player: " + profile.getName()));
}
}
}
return super.onBlockActivated(worldIn, pos, state, playerIn, hand, facing, hitX, hitY, hitZ);
}
use of com.mojang.authlib.GameProfile in project Denizen-For-Bukkit by DenizenScript.
the class Handler_v1_8_R3 method getPlayerProfile.
@Override
public PlayerProfile getPlayerProfile(Player player) {
GameProfile gameProfile = ((CraftPlayer) player).getProfile();
Property property = Iterables.getFirst(gameProfile.getProperties().get("textures"), null);
return new PlayerProfile(gameProfile.getName(), gameProfile.getId(), property != null ? property.getValue() : null, property != null ? property.getSignature() : null);
}
use of com.mojang.authlib.GameProfile in project Denizen-For-Bukkit by DenizenScript.
the class BlockHelper_v1_8_R3 method getPlayerProfile.
@Override
public PlayerProfile getPlayerProfile(Skull skull) {
GameProfile profile = ((CraftSkull) skull).getTileEntity().getGameProfile();
if (profile == null) {
return null;
}
String name = profile.getName();
UUID id = profile.getId();
Property property = Iterables.getFirst(profile.getProperties().get("textures"), null);
return new PlayerProfile(name, id, property != null ? property.getValue() : null);
}
use of com.mojang.authlib.GameProfile in project Denizen-For-Bukkit by DenizenScript.
the class Handler_v1_9_R2 method getPlayerProfile.
@Override
public PlayerProfile getPlayerProfile(Player player) {
GameProfile gameProfile = ((CraftPlayer) player).getProfile();
Property property = Iterables.getFirst(gameProfile.getProperties().get("textures"), null);
return new PlayerProfile(gameProfile.getName(), gameProfile.getId(), property != null ? property.getValue() : null, property != null ? property.getSignature() : null);
}
Aggregations