Skip to content

Commit 6c3782d

Browse files
committed
Feat: added UtilPixelmonPlayer
1 parent 11954a6 commit 6c3782d

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.envyful.api.reforged.pixelmon.storage;
2+
3+
import com.pixelmonmod.pixelmon.Pixelmon;
4+
import com.pixelmonmod.pixelmon.api.storage.PCStorage;
5+
import com.pixelmonmod.pixelmon.storage.PlayerPartyStorage;
6+
import net.minecraft.entity.player.EntityPlayerMP;
7+
8+
/**
9+
*
10+
* Static factory class used for easily obtaining player pixelmon information such as their PC
11+
*
12+
*/
13+
public class UtilPixelmonPlayer {
14+
15+
/**
16+
*
17+
* Gets the player's party storage
18+
*
19+
* @param player The player to get the party of
20+
* @return The player's party
21+
*/
22+
public static PlayerPartyStorage getParty(EntityPlayerMP player) {
23+
return Pixelmon.storageManager.getParty(player);
24+
}
25+
26+
/**
27+
*
28+
* Get the player's pc storage
29+
*
30+
* @param player The player
31+
* @return The pc
32+
*/
33+
public static PCStorage getPC(EntityPlayerMP player) {
34+
return Pixelmon.storageManager.getPCForPlayer(player);
35+
}
36+
37+
}

0 commit comments

Comments
 (0)