aboutsummaryrefslogtreecommitdiffstats
path: root/src/me/fatpigsarefat/quests/player/QPlayer.java
diff options
context:
space:
mode:
authorfatpigsarefat <fatpigsarefat@outlook.com>2018-05-05 20:51:44 +0100
committerfatpigsarefat <fatpigsarefat@outlook.com>2018-05-05 21:19:32 +0100
commitc3561041cecfb014e46b4b345200bb698795bbfe (patch)
treed74309947325dee97d81c73dfe152e86bab721b0 /src/me/fatpigsarefat/quests/player/QPlayer.java
parentf4997269badc3197dc8be93f1c3b84a83d9d9c19 (diff)
Can now modify data (/q a moddata).
Diffstat (limited to 'src/me/fatpigsarefat/quests/player/QPlayer.java')
-rw-r--r--src/me/fatpigsarefat/quests/player/QPlayer.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/me/fatpigsarefat/quests/player/QPlayer.java b/src/me/fatpigsarefat/quests/player/QPlayer.java
index 27e9283d..e797d7bb 100644
--- a/src/me/fatpigsarefat/quests/player/QPlayer.java
+++ b/src/me/fatpigsarefat/quests/player/QPlayer.java
@@ -21,10 +21,16 @@ public class QPlayer {
private UUID uuid;
private QuestProgressFile questProgressFile;
+ private boolean onlyDataLoaded;
public QPlayer(UUID uuid, QuestProgressFile questProgressFile) {
+ this(uuid, questProgressFile, false);
+ }
+
+ public QPlayer(UUID uuid, QuestProgressFile questProgressFile, boolean onlyDataLoaded) {
this.uuid = uuid;
this.questProgressFile = questProgressFile;
+ this.onlyDataLoaded = onlyDataLoaded;
}
public UUID getUuid() {
@@ -32,6 +38,10 @@ public class QPlayer {
}
public void openCategory(Category category) {
+ if (onlyDataLoaded) {
+ return;
+ }
+
Player player = Bukkit.getPlayer(uuid);
if (player == null) {
return;
@@ -53,6 +63,10 @@ public class QPlayer {
}
public void openQuests() {
+ if (onlyDataLoaded) {
+ return;
+ }
+
Player player = Bukkit.getPlayer(uuid);
if (player == null) {
return;
@@ -91,6 +105,14 @@ public class QPlayer {
}
}
+ public boolean isOnlyDataLoaded() {
+ return onlyDataLoaded;
+ }
+
+ public void setOnlyDataLoaded(boolean onlyDataLoaded) {
+ this.onlyDataLoaded = onlyDataLoaded;
+ }
+
public QuestProgressFile getQuestProgressFile() {
return questProgressFile;
}