mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-18 17:19:05 +00:00
PlayerData:
-Renamed loadPlayerDataFromFile() to load(), and moved it next to the save() function for later addition to the API. -Moved saving/loading to EP functions where they used to be. -Removed now unused PlayerData.get() and loadPlayerDataOld() functions ServerEventsHandler: -Added new EntityConstructing event to add the PlayerData EP earlier. NoppesUtilPlayer: -questCompletion() now saves player data right before its return statement.
This commit is contained in:
1 parent
dc42beee15
commit
cbf99be297
5 files changed
+30
-84
No files matched your search
@@ -5,6 +5,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import noppes.npcs.NBTTags;
|
||||
import noppes.npcs.api.entity.ICustomNpc;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.api.handler.IPlayerFactionData;
|
||||
import noppes.npcs.api.handler.data.IFaction;
|
||||
import noppes.npcs.controllers.FactionController;
|
||||
import noppes.npcs.controllers.PlayerDataController;
|
||||
@@ -133,8 +134,8 @@ public class Faction implements IFaction {
|
||||
}
|
||||
|
||||
public int playerStatus(IPlayer player) {
|
||||
PlayerFactionData data = PlayerData.get((EntityPlayer) player.getMCEntity()).factionData;
|
||||
int points = data.getFactionPoints(this.id);
|
||||
IPlayerFactionData data = player.getData().getFactionData();
|
||||
int points = data.getPoints(this.id);
|
||||
if (points >= this.friendlyPoints) {
|
||||
return 1;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user