Java Code Examples for net.minecraft.entity.player.EntityPlayerMP#getGameProfile()
The following examples show how to use
net.minecraft.entity.player.EntityPlayerMP#getGameProfile() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TileEntityGlassesBridge.java From OpenPeripheral-Addons with MIT License | 5 votes |
public void registerTerminal(EntityPlayerMP player) { if (!knownPlayersByUUID.containsKey(player.getGameProfile().getId())) { final PlayerInfo playerInfo = new PlayerInfo(getOrCreateGuid(), player); final GameProfile gameProfile = player.getGameProfile(); knownPlayersByUUID.put(gameProfile.getId(), playerInfo); rebuildPlayerNamesMap(); queueEvent(EVENT_PLAYER_ATTACH, player); sentStoredFullDataToPlayer(player); } }
Example 2
Source File: TileEntityGlassesBridge.java From OpenPeripheral-Addons with MIT License | 5 votes |
private static boolean isPlayerLogged(EntityPlayerMP player) { final GameProfile gameProfile = player.getGameProfile(); @SuppressWarnings("unchecked") List<EntityPlayerMP> players = MinecraftServer.getServer().getConfigurationManager().playerEntityList; for (EntityPlayerMP p : players) { if (p.getGameProfile().equals(gameProfile)) return true; } return false; }
Example 3
Source File: TileEntityGlassesBridge.java From OpenPeripheral-Addons with MIT License | 4 votes |
public PlayerInfo(long guid, EntityPlayerMP player) { this.player = new WeakReference<EntityPlayerMP>(player); this.profile = player.getGameProfile(); this.surface = SurfaceServer.createPrivateSurface(guid); }