diff options
| author | fatpigsarefat <fatpigsarefat@outlook.com> | 2018-07-21 21:25:00 +0100 |
|---|---|---|
| committer | fatpigsarefat <fatpigsarefat@outlook.com> | 2018-07-21 21:25:01 +0100 |
| commit | bcd4d141c04768c2ed3d00d4963e4f40424b5bc4 (patch) | |
| tree | b79a965aaa19bee8f859f1de5272feae2fbb0153 /src/me/fatpigsarefat/quests/player/questprogressfile/QuestProgress.java | |
| parent | 56aae6d737aa523f23160256b5022b8cce8fe9c5 (diff) | |
Now using Maven
- pom.xml was added
- Source files moved
- .gitignore adjusted to allow .xml
- All Title classes changed to use Bukkit method instead
Diffstat (limited to 'src/me/fatpigsarefat/quests/player/questprogressfile/QuestProgress.java')
| -rw-r--r-- | src/me/fatpigsarefat/quests/player/questprogressfile/QuestProgress.java | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/src/me/fatpigsarefat/quests/player/questprogressfile/QuestProgress.java b/src/me/fatpigsarefat/quests/player/questprogressfile/QuestProgress.java deleted file mode 100644 index 97e0b517..00000000 --- a/src/me/fatpigsarefat/quests/player/questprogressfile/QuestProgress.java +++ /dev/null @@ -1,106 +0,0 @@ -package me.fatpigsarefat.quests.player.questprogressfile; - -import java.util.Collection; -import java.util.HashMap; -import java.util.Map; -import java.util.UUID; - -public class QuestProgress { - - private Map<String, TaskProgress> taskProgress = new HashMap<>(); - private String questid; - private boolean started; - private boolean completed; - private boolean completedBefore; - private long completionDate; - private UUID player; - private boolean modified; - - public QuestProgress(String questid, boolean completed, boolean completedBefore, long completionDate, UUID player, boolean started) { - this.questid = questid; - this.completed = completed; - this.completedBefore = completedBefore; - this.completionDate = completionDate; - this.player = player; - this.started = started; - } - - public QuestProgress(String questid, boolean completed, boolean completedBefore, long completionDate, UUID player, boolean started, boolean modified) { - this(questid, completed, completedBefore, completionDate, player, started); - this.modified = modified; - } - - public String getQuestId() { - return questid; - } - - public boolean isCompleted() { - return completed; - } - - public void setCompleted(boolean completed) { - this.completed = completed; - this.modified = true; - } - - public boolean isStarted() { - return started; - } - - public void setStarted(boolean started) { - this.started = started; - this.modified = true; - } - - public long getCompletionDate() { - return completionDate; - } - - public void setCompletionDate(long completionDate) { - this.completionDate = completionDate; - this.modified = true; - } - - public UUID getPlayer() { - return player; - } - - public boolean isCompletedBefore() { - return completedBefore; - } - - public void setCompletedBefore(boolean completedBefore) { - this.completedBefore = completedBefore; - this.modified = true; - } - - public void addTaskProgress(TaskProgress taskProgress) { - this.taskProgress.put(taskProgress.getTaskId(), taskProgress); - } - - public Collection<TaskProgress> getTaskProgress() { - return taskProgress.values(); - } - - public TaskProgress getTaskProgress(String taskId) { - TaskProgress tP = taskProgress.getOrDefault(taskId, null); - if (tP == null) { - repairTaskProgress(taskId); - tP = taskProgress.getOrDefault(taskId, null); - } - return tP; - } - - public void repairTaskProgress(String taskid) { - TaskProgress taskProgress = new TaskProgress(taskid, null, player, false); - this.addTaskProgress(taskProgress); - } - - public boolean isWorthSaving() { - return modified; - } - - public void setWorthSaving(boolean modified) { - this.modified = modified; - } -} |
