mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-16 11:54:47 +00:00
NpcAPI:
-Added millisToTime(long) and ticksToTime(long) functions to return time formatted strings from long values. IPlayerQuestData: -Added last completed time functions for repeating quests. IQuest: -Added repeat functions for repeating quests. ServerCloneController: -Fixed cloned NPCs having identical UUIDs.
This commit is contained in:
1 parent
73ceeab907
commit
a895c8bd24
7 files changed
+105
-1
No files matched your search
@@ -11,6 +11,7 @@ import net.minecraft.nbt.NBTTagList;
|
||||
import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.NoppesUtilPlayer;
|
||||
import noppes.npcs.Server;
|
||||
import noppes.npcs.api.entity.IPlayer;
|
||||
import noppes.npcs.constants.EnumPacketClient;
|
||||
import noppes.npcs.constants.EnumQuestCompletion;
|
||||
import noppes.npcs.constants.EnumQuestType;
|
||||
@@ -213,4 +214,18 @@ public class PlayerQuestData implements IPlayerQuestData {
|
||||
|
||||
return (IQuest[])quests.toArray(new IQuest[0]);
|
||||
}
|
||||
|
||||
public long getLastCompletedTime(int id) {
|
||||
if (this.hasFinishedQuest(id)) {
|
||||
return this.finishedQuests.get(id);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void setLastCompletedTime(int id,long time) {
|
||||
Quest quest = QuestController.instance.quests.get(id);
|
||||
if (quest == null)
|
||||
return;
|
||||
this.finishedQuests.put(id,time);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user