From bcd4d141c04768c2ed3d00d4963e4f40424b5bc4 Mon Sep 17 00:00:00 2001 From: fatpigsarefat Date: Sat, 21 Jul 2018 21:25:00 +0100 Subject: Now using Maven - pom.xml was added - Source files moved - .gitignore adjusted to allow .xml - All Title classes changed to use Bukkit method instead --- .../player/questprogressfile/QuestProgress.java | 106 --------------------- 1 file changed, 106 deletions(-) delete mode 100644 src/me/fatpigsarefat/quests/player/questprogressfile/QuestProgress.java (limited to 'src/me/fatpigsarefat/quests/player/questprogressfile/QuestProgress.java') 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 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 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; - } -} -- cgit v1.2.3-70-g09d2