mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-11 23:07:37 +00:00
Ensure Tracked Quest does not equal null when updating
This commit is contained in:
1 parent
0b7bd2f009
commit
60dbcc7146
1 file changed
+11
-10
@@ -343,18 +343,19 @@ public class NoppesUtilPlayer {
|
||||
|
||||
public static void sendTrackedQuestData(EntityPlayerMP player) {
|
||||
Quest trackedQuest = (Quest) PlayerDataController.instance.getPlayerData(player).questData.getTrackedQuest();
|
||||
if(trackedQuest != null){
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setTag("Quest",trackedQuest.writeToNBT(new NBTTagCompound()));
|
||||
compound.setString("CategoryName", trackedQuest.getCategory().getName());
|
||||
compound.setString("TurnInNPC", trackedQuest.getNpcName());
|
||||
NBTTagList nbtTagList = new NBTTagList();
|
||||
for (IQuestObjective objective : trackedQuest.questInterface.getObjectives(player)) {
|
||||
nbtTagList.appendTag(new NBTTagString(objective.getText()));
|
||||
}
|
||||
compound.setTag("ObjectiveList",nbtTagList);
|
||||
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setTag("Quest",trackedQuest.writeToNBT(new NBTTagCompound()));
|
||||
compound.setString("CategoryName", trackedQuest.getCategory().getName());
|
||||
compound.setString("TurnInNPC", trackedQuest.getNpcName());
|
||||
NBTTagList nbtTagList = new NBTTagList();
|
||||
for (IQuestObjective objective : trackedQuest.questInterface.getObjectives(player)) {
|
||||
nbtTagList.appendTag(new NBTTagString(objective.getText()));
|
||||
Server.sendData(player, EnumPacketClient.OVERLAY_QUEST_TRACKING, compound);
|
||||
}
|
||||
compound.setTag("ObjectiveList",nbtTagList);
|
||||
|
||||
Server.sendData(player, EnumPacketClient.OVERLAY_QUEST_TRACKING, compound);
|
||||
}
|
||||
|
||||
public static void sendQuestLogData(EntityPlayerMP player) {
|
||||
|
||||
Reference in new issue
Block a user