@@ -8,23 +8,39 @@ class PAFPlayer
88	private  string  $ name
99	private  int  $ id
1010
11+ 	/** 
12+ 	 * @param string $pUUID 
13+ 	 * @param string $pName 
14+ 	 * @param int $pID 
15+ 	 * 
16+ 	 * This constructor should only be called from within the library. It should never be created by an external class. 
17+ 	 */ 
1118	public  function  __construct (string  $ pUUIDstring  $ pNameint  $ pID
1219	{
1320		$ this uniqueID  = $ pUUID
1421		$ this name  = $ pName
1522		$ this id  = $ pID
1623	}
1724
25+ 	/** 
26+ 	 * @return string The name of the player (not the display name) 
27+ 	 */ 
1828	public  function  getName (): string 
1929	{
2030		return  $ this name ;
2131	}
2232
33+ 	/** 
34+ 	 * @return string The unique id of the player 
35+ 	 */ 
2336	public  function  getUniqueID (): string 
2437	{
2538		return  $ this uniqueID ;
2639	}
2740
41+ 	/** 
42+ 	 * @return PAFPlayer[] Returns an array with all friends of the player 
43+ 	 */ 
2844	public  function  getFriends (): array 
2945	{
3046		$ stmtgetInstance ()->getConnection ()->prepare (
@@ -50,6 +66,9 @@ public function getFriends(): array
5066		return  [];
5167	}
5268
69+ 	/** 
70+ 	 * @return PAFPlayer[] Returns an array with containing all players that have sent a friend request to the player, which have not yet been denied or accepted 
71+ 	 */ 
5372	public  function  getFriendRequests (): array 
5473	{
5574		$ stmtgetInstance ()->getConnection ()->prepare (
@@ -71,6 +90,9 @@ public function getFriendRequests(): array
7190		return  [];
7291	}
7392
93+ 	/** 
94+ 	 * @return PAFPlayer[] Returns an array with all open friend requests this player sent to other players 
95+ 	 */ 
7496	public  function  getSentFriendRequests (): array 
7597	{
7698		$ stmtgetInstance ()->getConnection ()->prepare (
@@ -92,6 +114,17 @@ public function getSentFriendRequests(): array
92114		return  [];
93115	}
94116
117+ 	/** 
118+ 	 * @param int $pSettingsID The id of the setting. Extensions might add more settings, but by default, the plugin has the following settings: 
119+ 	 *                         0 = Friend Request Setting 
120+ 	 *                         1 = Party Invite Setting 
121+ 	 *                         2 = PM Setting 
122+ 	 *                         3 = Offline Setting 
123+ 	 *                         4 = Jump Setting 
124+ 	 *                         6 = Hide Setting 
125+ 	 * 
126+ 	 * @return int Returns the value of the setting 
127+ 	 */ 
95128	public  function  getSettingsWorth (int  $ pSettingsIDint 
96129	{
97130		$ stmtgetInstance ()->getConnection ()->prepare (
@@ -104,6 +137,10 @@ public function getSettingsWorth(int $pSettingsID): int
104137		return  0 ;
105138	}
106139
140+ 	/** 
141+ 	 * @param PAFPlayer $player The player which should be the new friend of this player 
142+ 	 * @return void 
143+ 	 */ 
107144	public  function  addFriend (PAFPlayer $ player
108145	{
109146		$ stmtgetInstance ()->getConnection ()->prepare (
@@ -112,12 +149,19 @@ public function addFriend(PAFPlayer $player)
112149		$ stmtexecute ();
113150	}
114151
152+ 	/** 
153+ 	 * @return int Returns the id of the player as used in the party and friends database 
154+ 	 */ 
115155	public  function  getID (): int 
116156	{
117157		return  $ this id ;
118158	}
119159
120- 	public  function  sendFriendRequest (PAFPlayer $ player
160+ 	/** 
161+ 	 * @param PAFPlayer $player The player which should receive a friend request from this player 
162+ 	 * @return void 
163+ 	 */ 
164+ 	public  function  sendFriendRequest (PAFPlayer $ playervoid 
121165	{
122166		$ stmtgetInstance ()->getConnection ()->prepare (
123167			"INSERT INTO {PAFPlayerManager::getInstance()->getTablePrefix()}friend_assignment   
0 commit comments