public PlayerData getPlayerData(EntityPlayer player) {
    PlayerData data = (PlayerData) player.getExtendedProperties("CustomNpcsData");
    if (data == null) {
      player.registerExtendedProperties("CustomNpcsData", data = new PlayerData());
      data.player = player;
      data.loadNBTData((NBTTagCompound) null);
    }

    return data;
  }
Exemplo n.º 2
0
 /**
  * Returns ExtendedPlayer properties for player This method is for convenience only; it will make
  * your code look nicer
  */
 public static final ExtendedPlayer get(EntityPlayer player) {
   return (ExtendedPlayer) player.getExtendedProperties(EXT_PROP_NAME);
 }
 public static TFPlayerDataNew getData(EntityPlayer player) {
   return (TFPlayerDataNew) player.getExtendedProperties(IDENTIFIER);
 }
 public static final HarvestRodPlayerProps get(EntityPlayer player) {
   return (HarvestRodPlayerProps) player.getExtendedProperties(EXT_PROP_NAME);
 }
Exemplo n.º 5
0
 public static final PlayerResearch get(EntityPlayer player) {
   return (PlayerResearch) player.getExtendedProperties(tagName);
 }