Advertisement
Guest User

Untitled

a guest
Jul 8th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. /**
  2. * Restores the owner from other variables if he is null on loading.
  3. */
  4. public void restoreOwnerIfNull()
  5. {
  6. final Map.Entry<UUID, Player> owner = getOwnerEntry();
  7. if (owner == null && ownerUUID != null)
  8. {
  9. final GameProfile player = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerProfileCache().getProfileByUUID(ownerUUID);
  10.  
  11. if (player != null)
  12. {
  13. players.put(ownerUUID, new Player(ownerUUID, player.getName(), Rank.OWNER));
  14. }
  15. }
  16. markDirty();
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement